# Check Deposits
> Check Deposits allow you to deposit images of paper checks into your account.

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `check_deposit.created` and `check_deposit.updated`.

## The Check Deposit object
### Example
```json
{
  "account_id": "account_in71c4amph0vgo2qllky",
  "amount": 1000,
  "back_image_file_id": "file_26khfk98mzfz90a11oqx",
  "created_at": "2020-01-31T23:59:59Z",
  "deposit_acceptance": {
    "account_number": "987654321",
    "amount": 1000,
    "auxiliary_on_us": "101",
    "check_deposit_id": "check_deposit_f06n9gpg7sxn8t19lfc1",
    "currency": "USD",
    "routing_number": "101050001",
    "serial_number": null
  },
  "deposit_adjustments": [],
  "deposit_rejection": null,
  "deposit_return": null,
  "deposit_submission": {
    "back_file_id": "file_frhw4s443nh7noss55kq",
    "front_file_id": "file_j7ed9mrve741m6yui9ju",
    "submitted_at": "2020-02-01T00:59:59+00:00"
  },
  "description": null,
  "front_image_file_id": "file_makxrc67oh9l6sg7w9yc",
  "id": "check_deposit_f06n9gpg7sxn8t19lfc1",
  "idempotency_key": null,
  "inbound_funds_hold": null,
  "inbound_mail_item_id": null,
  "lockbox_id": null,
  "status": "submitted",
  "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
  "type": "check_deposit"
}
```
### Attributes
- `account_id` (string)
  The Account the check was deposited into.

- `amount` (integer)
  The deposited amount in USD cents.

- `back_image_file_id` (string, nullable)
  The ID for the File containing the image of the back of the check.

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created.

- `deposit_acceptance` (dictionary, nullable)
  Once your deposit is successfully parsed and accepted by Increase, this will contain details of the parsed check.

  - `deposit_acceptance.account_number` (string)
    The account number printed on the check. This is an account at the bank that issued the check.

  - `deposit_acceptance.amount` (integer)
    The amount to be deposited in the minor unit of the transaction's currency. For dollars, for example, this is cents.

  - `deposit_acceptance.auxiliary_on_us` (string, nullable)
    An additional line of metadata printed on the check. This typically includes the check number for business checks.

  - `deposit_acceptance.check_deposit_id` (string)
    The ID of the Check Deposit that was accepted.

  - `deposit_acceptance.currency` (enum)
    The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency.
    Cases:
    * `USD` (US Dollar (USD))

  - `deposit_acceptance.routing_number` (string)
    The routing number printed on the check. This is a routing number for the bank that issued the check.

  - `deposit_acceptance.serial_number` (string, nullable)
    The check serial number, if present, for consumer checks. For business checks, the serial number is usually in the `auxiliary_on_us` field.

- `deposit_adjustments` (array of objects)
  If the deposit or the return was adjusted by the receiving institution, this will contain details of the adjustments.

  - `deposit_adjustments.adjusted_at` (string)
    The time at which the adjustment was received.

  - `deposit_adjustments.amount` (integer)
    The amount of the adjustment.

  - `deposit_adjustments.reason` (enum)
    The reason for the adjustment.
    Cases:
    * `adjusted_amount` (The check was deposited with a different amount than what was written on the check.)
    * `non_conforming_item` (The recipient was not able to process the check. This usually happens for e.g., low quality images.)
    * `paid` (The check has already been deposited elsewhere and so this is a duplicate.)

  - `deposit_adjustments.transaction_id` (string)
    The id of the transaction for the adjustment.

- `deposit_rejection` (dictionary, nullable)
  If your deposit is rejected by Increase, this will contain details as to why it was rejected.

  - `deposit_rejection.amount` (integer)
    The rejected amount in the minor unit of check's currency. For dollars, for example, this is cents.

  - `deposit_rejection.check_deposit_id` (string)
    The identifier of the Check Deposit that was rejected.

  - `deposit_rejection.currency` (enum)
    The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's currency.
    Cases:
    * `USD` (US Dollar (USD))

  - `deposit_rejection.declined_transaction_id` (string)
    The identifier of the associated declined transaction.

  - `deposit_rejection.reason` (enum)
    Why the check deposit was rejected.
    Cases:
    * `incomplete_image` (The check's image is incomplete.)
    * `duplicate` (This is a duplicate check submission.)
    * `poor_image_quality` (This check has poor image quality.)
    * `incorrect_amount` (The check was deposited with the incorrect amount.)
    * `incorrect_recipient` (The check is made out to someone other than the account holder.)
    * `not_eligible_for_mobile_deposit` (This check was not eligible for mobile deposit.)
    * `missing_required_data_elements` (This check is missing at least one required field.)
    * `suspected_fraud` (This check is suspected to be fraudulent.)
    * `deposit_window_expired` (This check's deposit window has expired.)
    * `requested_by_user` (The check was rejected at the user's request.)
    * `international` (The check is not a U.S. domestic check and cannot be processed.)
    * `unknown` (The check was rejected for an unknown reason.)

  - `deposit_rejection.rejected_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the check deposit was rejected.

- `deposit_return` (dictionary, nullable)
  If your deposit is returned, this will contain details as to why it was returned.

  - `deposit_return.amount` (integer)
    The returned amount in USD cents.

  - `deposit_return.check_deposit_id` (string)
    The identifier of the Check Deposit that was returned.

  - `deposit_return.currency` (enum)
    The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency.
    Cases:
    * `USD` (US Dollar (USD))

  - `deposit_return.return_reason` (enum)
    Why this check was returned by the bank holding the account it was drawn against.
    Cases:
    * `ach_conversion_not_supported` (The check doesn't allow ACH conversion.)
    * `closed_account` (The account is closed. (Check21 return code `D`))
    * `duplicate_submission` (The check has already been deposited. (Check21 return code `Y`))
    * `insufficient_funds` (Insufficient funds (Check21 return code `A`))
    * `no_account` (No account was found matching the check details. (Check21 return code `E`))
    * `not_authorized` (The check was not authorized. (Check21 return code `Q`))
    * `stale_dated` (The check is too old. (Check21 return code `G`))
    * `stop_payment` (The payment has been stopped by the account holder. (Check21 return code `C`))
    * `unknown_reason` (The reason for the return is unknown.)
    * `unmatched_details` (The image doesn't match the details submitted.)
    * `unreadable_image` (The image could not be read. (Check21 return code `U`))
    * `endorsement_irregular` (The check endorsement was irregular. (Check21 return code `J`))
    * `altered_or_fictitious_item` (The check present was either altered or fake. (Check21 return code `N`))
    * `frozen_or_blocked_account` (The account this check is drawn on is frozen. (Check21 return code `F`))
    * `post_dated` (The check is post dated. (Check21 return code `H`))
    * `endorsement_missing` (The endorsement was missing. (Check21 return code `I`))
    * `signature_missing` (The check signature was missing. (Check21 return code `K`))
    * `stop_payment_suspect` (The bank suspects a stop payment will be placed. (Check21 return code `T`))
    * `unusable_image` (The bank cannot read the image. (Check21 return code `U`))
    * `image_fails_security_check` (The check image fails the bank's security check. (Check21 return code `V`))
    * `cannot_determine_amount` (The bank cannot determine the amount. (Check21 return code `W`))
    * `signature_irregular` (The signature is inconsistent with prior signatures. (Check21 return code `L`))
    * `non_cash_item` (The check is a non-cash item and cannot be drawn against the account. (Check21 return code `M`))
    * `unable_to_process` (The bank is unable to process this check. (Check21 return code `O`))
    * `item_exceeds_dollar_limit` (The check exceeds the bank or customer's limit. (Check21 return code `P`))
    * `branch_or_account_sold` (The bank sold this account and no longer services this customer. (Check21 return code `R`))

  - `deposit_return.returned_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the check deposit was returned.

  - `deposit_return.transaction_id` (string)
    The identifier of the transaction that reversed the original check deposit transaction.

- `deposit_submission` (dictionary, nullable)
  After the check is parsed, it is submitted to the Check21 network for processing. This will contain details of the submission.

  - `deposit_submission.back_file_id` (string)
    The ID for the File containing the check back image that was submitted to the Check21 network.

  - `deposit_submission.front_file_id` (string)
    The ID for the File containing the check front image that was submitted to the Check21 network.

  - `deposit_submission.submitted_at` (string)
    When the check deposit was submitted to the Check21 network for processing. During business days, this happens within a few hours of the check being accepted by Increase.

- `description` (string, nullable)
  The description of the Check Deposit, for display purposes only.

- `front_image_file_id` (string)
  The ID for the File containing the image of the front of the check.

- `id` (string)
  The deposit's identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `inbound_funds_hold` (dictionary, nullable)
  Increase will sometimes hold the funds for Check Deposits. If funds are held, this sub-object will contain details of the hold.

  - `inbound_funds_hold.amount` (integer)
    The held amount in the minor unit of the account's currency. For dollars, for example, this is cents.

  - `inbound_funds_hold.automatically_releases_at` (string)
    When the hold will be released automatically. Certain conditions may cause it to be released before this time.

  - `inbound_funds_hold.created_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold was created.

  - `inbound_funds_hold.currency` (enum)
    The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's currency.
    Cases:
    * `USD` (US Dollar (USD))

  - `inbound_funds_hold.held_transaction_id` (string, nullable)
    The ID of the Transaction for which funds were held.

  - `inbound_funds_hold.pending_transaction_id` (string, nullable)
    The ID of the Pending Transaction representing the held funds.

  - `inbound_funds_hold.released_at` (string, nullable)
    When the hold was released (if it has been released).

  - `inbound_funds_hold.status` (enum)
    The status of the hold.
    Cases:
    * `held` (Funds are still being held.)
    * `complete` (Funds have been released.)

  - `inbound_funds_hold.type` (string)
    A constant representing the object's type. For this resource it will always be `inbound_funds_hold`.

- `inbound_mail_item_id` (string, nullable)
  If the Check Deposit was the result of an Inbound Mail Item, this will contain the identifier of the Inbound Mail Item.

- `lockbox_id` (string, nullable)
  If the Check Deposit was the result of an Inbound Mail Item, this will contain the identifier of the Lockbox that received it.

- `status` (enum)
  The status of the Check Deposit.
  Cases:
  * `pending` (The Check Deposit is pending review.)
  * `submitted` (The Check Deposit has been deposited.)
  * `rejected` (The Check Deposit has been rejected.)
  * `returned` (The Check Deposit has been returned.)

- `transaction_id` (string, nullable)
  The ID for the Transaction created by the deposit.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `check_deposit`.

## List Check Deposits
GET /check_deposits

### Example
```curl
curl \
  --url "${INCREASE_URL}/check_deposits?account_id=account_in71c4amph0vgo2qllky" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `account_id` (string, optional)
  Filter Check Deposits to those belonging to the specified Account.

- `created_at.after` (string, optional)
  Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.before` (string, optional)
  Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_after` (string, optional)
  Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_before` (string, optional)
  Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

### Returns a Check Deposit List object:
```json
{
  "data": [
    {
      "account_id": "account_in71c4amph0vgo2qllky",
      "amount": 1000,
      "back_image_file_id": "file_26khfk98mzfz90a11oqx",
      "created_at": "2020-01-31T23:59:59Z",
      "deposit_acceptance": {
        "account_number": "987654321",
        "amount": 1000,
        "auxiliary_on_us": "101",
        "check_deposit_id": "check_deposit_f06n9gpg7sxn8t19lfc1",
        "currency": "USD",
        "routing_number": "101050001",
        "serial_number": null
      },
      "deposit_adjustments": [],
      "deposit_rejection": null,
      "deposit_return": null,
      "deposit_submission": {
        "back_file_id": "file_frhw4s443nh7noss55kq",
        "front_file_id": "file_j7ed9mrve741m6yui9ju",
        "submitted_at": "2020-02-01T00:59:59+00:00"
      },
      "description": null,
      "front_image_file_id": "file_makxrc67oh9l6sg7w9yc",
      "id": "check_deposit_f06n9gpg7sxn8t19lfc1",
      "idempotency_key": null,
      "inbound_funds_hold": null,
      "inbound_mail_item_id": null,
      "lockbox_id": null,
      "status": "submitted",
      "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
      "type": "check_deposit"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Check Deposit
POST /check_deposits

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/check_deposits" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_id": "account_in71c4amph0vgo2qllky",
    "amount": 1000,
    "back_image_file_id": "file_26khfk98mzfz90a11oqx",
    "description": "Vendor payment",
    "front_image_file_id": "file_hkv175ovmc2tb2v2zbrm"
  }'
```

### Body Parameters
- `account_id` (string, required)
  The identifier for the Account to deposit the check in.

- `amount` (integer, required)
  The deposit amount in USD cents.

- `back_image_file_id` (string, required)
  The File containing the check's back image.

- `description` (string, optional)
  The description you choose to give the Check Deposit, for display purposes only.

- `front_image_file_id` (string, required)
  The File containing the check's front image.

## Retrieve a Check Deposit
GET /check_deposits/{check_deposit_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/check_deposits/check_deposit_f06n9gpg7sxn8t19lfc1" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `check_deposit_id` (string, required)
  The identifier of the Check Deposit to retrieve.

## Sandbox: Adjust a Check Deposit
POST /simulations/check_deposits/{check_deposit_id}/adjustment
> Simulates the creation of a [Check Deposit Adjustment](#check-deposit-adjustments) on a [Check Deposit](#check-deposits). This Check Deposit must first have a `status` of `submitted`.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/check_deposits/check_deposit_f06n9gpg7sxn8t19lfc1/adjustment" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{}'
```
### Path Parameters
- `check_deposit_id` (string, required)
  The identifier of the Check Deposit you wish to adjust.

### Body Parameters
- `amount` (integer, optional)
  The adjustment amount in the minor unit of the Check Deposit's currency (e.g., cents). A negative amount means that the funds are being clawed back by the other bank and is a debit to your account. Defaults to the negative of the Check Deposit amount.

- `reason` (enum, optional)
  The reason for the adjustment. Defaults to `non_conforming_item`, which is often used for a low quality image that the recipient wasn't able to handle.
  Cases:
  * `late_return` (The return was initiated too late and the receiving institution has responded with a Late Return Claim.)
  * `wrong_payee_credit` (The check was deposited to the wrong payee and the depositing institution has reimbursed the funds with a Wrong Payee Credit.)
  * `adjusted_amount` (The check was deposited with a different amount than what was written on the check.)
  * `non_conforming_item` (The recipient was not able to process the check. This usually happens for e.g., low quality images.)
  * `paid` (The check has already been deposited elsewhere and so this is a duplicate.)

## Sandbox: Reject a Check Deposit
POST /simulations/check_deposits/{check_deposit_id}/reject
> Simulates the rejection of a [Check Deposit](#check-deposits) by Increase due to factors like poor image quality. This Check Deposit must first have a `status` of `pending`.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/check_deposits/check_deposit_f06n9gpg7sxn8t19lfc1/reject" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `check_deposit_id` (string, required)
  The identifier of the Check Deposit you wish to reject.

## Sandbox: Return a Check Deposit
POST /simulations/check_deposits/{check_deposit_id}/return
> Simulates the return of a [Check Deposit](#check-deposits). This Check Deposit must first have a `status` of `submitted`.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/check_deposits/check_deposit_f06n9gpg7sxn8t19lfc1/return" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `check_deposit_id` (string, required)
  The identifier of the Check Deposit you wish to return.

## Sandbox: Submit a Check Deposit
POST /simulations/check_deposits/{check_deposit_id}/submit
> Simulates the submission of a [Check Deposit](#check-deposits) to the Federal Reserve. This Check Deposit must first have a `status` of `pending`.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/check_deposits/check_deposit_f06n9gpg7sxn8t19lfc1/submit" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{}'
```
### Path Parameters
- `check_deposit_id` (string, required)
  The identifier of the Check Deposit you wish to submit.

### Body Parameters
- `scan` (dictionary, optional)
  If set, the simulation will use these values for the check's scanned MICR data.

  - `scan.account_number` (string, required)
    The account number to be returned in the check deposit's scan data.

  - `scan.auxiliary_on_us` (string, optional)
    The auxiliary on-us data to be returned in the check deposit's scan data.

  - `scan.routing_number` (string, required)
    The routing number to be returned in the check deposit's scan data.