# Inbound Check Deposits
> Inbound Check Deposits are records of third-parties attempting to deposit checks against your account.

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

## The Inbound Check Deposit object
### Example
```json
{
  "accepted_at": "2020-01-31T23:59:59Z",
  "account_id": "account_in71c4amph0vgo2qllky",
  "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
  "adjustments": [],
  "amount": 1000,
  "back_image_file_id": "file_makxrc67oh9l6sg7w9yc",
  "bank_of_first_deposit_routing_number": "101050001",
  "check_number": "123",
  "check_transfer_id": "check_transfer_30b43acfu9vw8fyc4f5",
  "created_at": "2020-01-31T23:59:59Z",
  "currency": "USD",
  "declined_at": null,
  "declined_transaction_id": null,
  "deposit_return": null,
  "front_image_file_id": "file_makxrc67oh9l6sg7w9yc",
  "id": "inbound_check_deposit_zoshvqybq0cjjm31mra",
  "payee_name_analysis": "name_matches",
  "status": "accepted",
  "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
  "type": "inbound_check_deposit"
}
```
### Attributes
- `accepted_at` (string, nullable)
  If the Inbound Check Deposit was accepted, the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which this took place.

- `account_id` (string)
  The Account the check is being deposited against.

- `account_number_id` (string, nullable)
  The Account Number the check is being deposited against.

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

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

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

  - `adjustments.reason` (enum)
    The reason for the adjustment.
    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.)

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

- `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.

- `bank_of_first_deposit_routing_number` (string, nullable)
  The American Bankers' Association (ABA) Routing Transit Number (RTN) for the bank depositing this check. In some rare cases, this is not transmitted via Check21 and the value will be null.

- `check_number` (string, nullable)
  The check number printed on the check being deposited.

- `check_transfer_id` (string, nullable)
  If this deposit is for an existing Check Transfer, the identifier of that Check Transfer.

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

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

- `declined_at` (string, nullable)
  If the Inbound Check Deposit was declined, the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which this took place.

- `declined_transaction_id` (string, nullable)
  If the deposit attempt has been rejected, the identifier of the Declined Transaction object created as a result of the failed deposit.

- `deposit_return` (dictionary, nullable)
  If you requested a return of this deposit, this will contain details of the return.

  - `deposit_return.reason` (enum)
    The reason the deposit was returned.
    Cases:
    * `altered_or_fictitious` (The check was altered or fictitious.)
    * `not_authorized` (The check was not authorized.)
    * `duplicate_presentment` (The check was a duplicate presentment.)
    * `endorsement_missing` (The check was not endorsed.)
    * `endorsement_irregular` (The check was not endorsed by the payee.)
    * `refer_to_maker` (The maker of the check requested its return.)

  - `deposit_return.returned_at` (string)
    The time at which the deposit was returned.

  - `deposit_return.transaction_id` (string)
    The id of the transaction for the returned deposit.

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

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

- `payee_name_analysis` (enum)
  Whether the details on the check match the recipient name of the check transfer. This is an optional feature, contact sales to enable.
  Cases:
  * `name_matches` (The details on the check match the recipient name of the check transfer.)
  * `does_not_match` (The details on the check do not match the recipient name of the check transfer.)
  * `not_evaluated` (The payee name analysis was not evaluated.)

- `status` (enum)
  The status of the Inbound Check Deposit.
  Cases:
  * `pending` (The Inbound Check Deposit is pending.)
  * `accepted` (The Inbound Check Deposit was accepted.)
  * `declined` (The Inbound Check Deposit was rejected.)
  * `returned` (The Inbound Check Deposit was returned.)
  * `requires_attention` (The Inbound Check Deposit requires attention from an Increase operator.)

- `transaction_id` (string, nullable)
  If the deposit attempt has been accepted, the identifier of the Transaction object created as a result of the successful deposit.

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

## List Inbound Check Deposits
GET /inbound_check_deposits

### Example
```curl
curl \
  --url "${INCREASE_URL}/inbound_check_deposits" \
  -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 Inbound Check Deposits to those belonging to the specified Account.

- `check_transfer_id` (string, optional)
  Filter Inbound Check Deposits to those belonging to the specified Check Transfer.

- `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.

### Returns a Inbound Check Deposit List object:
```json
{
  "data": [
    {
      "accepted_at": "2020-01-31T23:59:59Z",
      "account_id": "account_in71c4amph0vgo2qllky",
      "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "adjustments": [],
      "amount": 1000,
      "back_image_file_id": "file_makxrc67oh9l6sg7w9yc",
      "bank_of_first_deposit_routing_number": "101050001",
      "check_number": "123",
      "check_transfer_id": "check_transfer_30b43acfu9vw8fyc4f5",
      "created_at": "2020-01-31T23:59:59Z",
      "currency": "USD",
      "declined_at": null,
      "declined_transaction_id": null,
      "deposit_return": null,
      "front_image_file_id": "file_makxrc67oh9l6sg7w9yc",
      "id": "inbound_check_deposit_zoshvqybq0cjjm31mra",
      "payee_name_analysis": "name_matches",
      "status": "accepted",
      "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
      "type": "inbound_check_deposit"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Retrieve an Inbound Check Deposit
GET /inbound_check_deposits/{inbound_check_deposit_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/inbound_check_deposits/inbound_check_deposit_zoshvqybq0cjjm31mra" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `inbound_check_deposit_id` (string, required)
  The identifier of the Inbound Check Deposit to get details for.

## Decline an Inbound Check Deposit
POST /inbound_check_deposits/{inbound_check_deposit_id}/decline

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/inbound_check_deposits/inbound_check_deposit_zoshvqybq0cjjm31mra/decline" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `inbound_check_deposit_id` (string, required)
  The identifier of the Inbound Check Deposit to decline.

## Return an Inbound Check Deposit
POST /inbound_check_deposits/{inbound_check_deposit_id}/return

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/inbound_check_deposits/inbound_check_deposit_zoshvqybq0cjjm31mra/return" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "reason": "altered_or_fictitious"
  }'
```
### Path Parameters
- `inbound_check_deposit_id` (string, required)
  The identifier of the Inbound Check Deposit to return.

### Body Parameters
- `reason` (enum, required)
  The reason to return the Inbound Check Deposit.
  Cases:
  * `altered_or_fictitious` (The check was altered or fictitious.)
  * `not_authorized` (The check was not authorized.)
  * `duplicate_presentment` (The check was a duplicate presentment.)
  * `endorsement_missing` (The check was not endorsed.)
  * `endorsement_irregular` (The check was not endorsed by the payee.)
  * `refer_to_maker` (The maker of the check requested its return.)

## Sandbox: Create an Inbound Check Deposit
POST /simulations/inbound_check_deposits
> Simulates an Inbound Check Deposit against your account. This imitates someone depositing a check at their bank that was issued from your account. It may or may not be associated with a Check Transfer. Increase will evaluate the Inbound Check Deposit as we would in production and either create a Transaction or a Declined Transaction as a result. You can inspect the resulting Inbound Check Deposit object to see the result.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/inbound_check_deposits" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
    "amount": 1000,
    "check_number": "1234567890"
  }'
```

### Body Parameters
- `account_number_id` (string, required)
  The identifier of the Account Number the Inbound Check Deposit will be against.

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

- `check_number` (string, required)
  The check number on the check to be deposited.

- `payee_name_analysis` (enum, optional)
  Simulate the outcome of [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches). Defaults to `not_evaluated`.
  Cases:
  * `name_matches` (The details on the check match the recipient name of the check transfer.)
  * `does_not_match` (The details on the check do not match the recipient name of the check transfer.)
  * `not_evaluated` (The payee name analysis was not evaluated.)

## Sandbox: Create an Inbound Check Deposit Adjustment
POST /simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment
> Simulates an adjustment on an Inbound Check Deposit. The Inbound Check Deposit must have a `status` of `accepted`.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/inbound_check_deposits/inbound_check_deposit_zoshvqybq0cjjm31mra/adjustment" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "amount": 1000
  }'
```
### Path Parameters
- `inbound_check_deposit_id` (string, required)
  The identifier of the Inbound Check Deposit to adjust.

### Body Parameters
- `amount` (integer, optional)
  The adjustment amount in cents. Defaults to the amount of the Inbound Check Deposit.

- `reason` (enum, optional)
  The reason for the adjustment. Defaults to `wrong_payee_credit`.
  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.)