# Inbound Wire Transfers
> An Inbound Wire Transfer is a wire transfer initiated outside of Increase to your account.

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

## The Inbound Wire Transfer object
### Example
```json
{
  "acceptance": null,
  "account_id": "account_in71c4amph0vgo2qllky",
  "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
  "amount": 100,
  "created_at": "2020-01-31T23:59:59Z",
  "creditor_address_line1": null,
  "creditor_address_line2": null,
  "creditor_address_line3": null,
  "creditor_name": null,
  "debtor_address_line1": null,
  "debtor_address_line2": null,
  "debtor_address_line3": null,
  "debtor_name": null,
  "description": "Inbound wire transfer",
  "end_to_end_identification": null,
  "id": "inbound_wire_transfer_f228m6bmhtcxjco9pwp0",
  "input_message_accountability_data": null,
  "instructing_agent_routing_number": null,
  "instruction_identification": null,
  "reversal": null,
  "status": "accepted",
  "type": "inbound_wire_transfer",
  "unique_end_to_end_transaction_reference": null,
  "unstructured_remittance_information": null,
  "wire_drawdown_request_id": null
}
```
### Attributes
- `acceptance` (dictionary, nullable)
  If the transfer is accepted, this will contain details of the acceptance.

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

  - `acceptance.transaction_id` (string)
    The identifier of the transaction for the accepted transfer.

- `account_id` (string)
  The Account to which the transfer belongs.

- `account_number_id` (string)
  The identifier of the Account Number to which this transfer was sent.

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

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

- `creditor_address_line1` (string, nullable)
  A free-form address field set by the sender.

- `creditor_address_line2` (string, nullable)
  A free-form address field set by the sender.

- `creditor_address_line3` (string, nullable)
  A free-form address field set by the sender.

- `creditor_name` (string, nullable)
  A name set by the sender.

- `debtor_address_line1` (string, nullable)
  A free-form address field set by the sender.

- `debtor_address_line2` (string, nullable)
  A free-form address field set by the sender.

- `debtor_address_line3` (string, nullable)
  A free-form address field set by the sender.

- `debtor_name` (string, nullable)
  A name set by the sender.

- `description` (string)
  An Increase-constructed description of the transfer.

- `end_to_end_identification` (string, nullable)
  A free-form reference string set by the sender, to help identify the transfer.

- `id` (string)
  The inbound wire transfer's identifier.

- `input_message_accountability_data` (string, nullable)
  A unique identifier available to the originating and receiving banks, commonly abbreviated as IMAD. It is created when the wire is submitted to the Fedwire service and is helpful when debugging wires with the originating bank.

- `instructing_agent_routing_number` (string, nullable)
  The American Banking Association (ABA) routing number of the bank that sent the wire.

- `instruction_identification` (string, nullable)
  The sending bank's identifier for the wire transfer.

- `reversal` (dictionary, nullable)
  If the transfer is reversed, this will contain details of the reversal.

  - `reversal.reason` (enum)
    The reason for the reversal.
    Cases:
    * `duplicate` (The inbound wire transfer was a duplicate.)
    * `creditor_request` (The recipient of the wire transfer requested the funds be returned to the sender.)
    * `transaction_forbidden` (The account cannot currently receive inbound wires.)

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

- `status` (enum)
  The status of the transfer.
  Cases:
  * `pending` (The Inbound Wire Transfer is awaiting action, will transition automatically if no action is taken.)
  * `accepted` (The Inbound Wire Transfer is accepted.)
  * `declined` (The Inbound Wire Transfer was declined.)
  * `reversed` (The Inbound Wire Transfer was reversed.)

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

- `unique_end_to_end_transaction_reference` (string, nullable)
  The Unique End-to-end Transaction Reference ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) of the transfer.

- `unstructured_remittance_information` (string, nullable)
  A free-form message set by the sender.

- `wire_drawdown_request_id` (string, nullable)
  The wire drawdown request the inbound wire transfer is fulfilling.

## List Inbound Wire Transfers
GET /inbound_wire_transfers

### Example
```curl
curl \
  --url "${INCREASE_URL}/inbound_wire_transfers?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 Inbound Wire Transfers to ones belonging to the specified Account.

- `account_number_id` (string, optional)
  Filter Inbound Wire Transfers to ones belonging to the specified Account Number.

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

- `status.in` (array of enums, optional)
  Filter Inbound Wire Transfers to those with the specified status. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending` (The Inbound Wire Transfer is awaiting action, will transition automatically if no action is taken.)
  * `accepted` (The Inbound Wire Transfer is accepted.)
  * `declined` (The Inbound Wire Transfer was declined.)
  * `reversed` (The Inbound Wire Transfer was reversed.)

- `wire_drawdown_request_id` (string, optional)
  Filter Inbound Wire Transfers to ones belonging to the specified Wire Drawdown Request.

### Returns a Inbound Wire Transfer List object:
```json
{
  "data": [
    {
      "acceptance": null,
      "account_id": "account_in71c4amph0vgo2qllky",
      "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "amount": 100,
      "created_at": "2020-01-31T23:59:59Z",
      "creditor_address_line1": null,
      "creditor_address_line2": null,
      "creditor_address_line3": null,
      "creditor_name": null,
      "debtor_address_line1": null,
      "debtor_address_line2": null,
      "debtor_address_line3": null,
      "debtor_name": null,
      "description": "Inbound wire transfer",
      "end_to_end_identification": null,
      "id": "inbound_wire_transfer_f228m6bmhtcxjco9pwp0",
      "input_message_accountability_data": null,
      "instructing_agent_routing_number": null,
      "instruction_identification": null,
      "reversal": null,
      "status": "accepted",
      "type": "inbound_wire_transfer",
      "unique_end_to_end_transaction_reference": null,
      "unstructured_remittance_information": null,
      "wire_drawdown_request_id": null
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Retrieve an Inbound Wire Transfer
GET /inbound_wire_transfers/{inbound_wire_transfer_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/inbound_wire_transfers/inbound_wire_transfer_f228m6bmhtcxjco9pwp0" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `inbound_wire_transfer_id` (string, required)
  The identifier of the Inbound Wire Transfer to get details for.

## Reverse an Inbound Wire Transfer
POST /inbound_wire_transfers/{inbound_wire_transfer_id}/reverse

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/inbound_wire_transfers/inbound_wire_transfer_f228m6bmhtcxjco9pwp0/reverse" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "reason": "creditor_request"
  }'
```
### Path Parameters
- `inbound_wire_transfer_id` (string, required)
  The identifier of the Inbound Wire Transfer to reverse.

### Body Parameters
- `reason` (enum, required)
  Reason for the reversal.
  Cases:
  * `duplicate` (The inbound wire transfer was a duplicate.)
  * `creditor_request` (The recipient of the wire transfer requested the funds be returned to the sender.)
  * `transaction_forbidden` (The account cannot currently receive inbound wires.)

## Sandbox: Create an Inbound Wire Transfer
POST /simulations/inbound_wire_transfers
> Simulates an [Inbound Wire Transfer](#inbound-wire-transfers) to your account.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/inbound_wire_transfers" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
    "amount": 1000
  }'
```

### Body Parameters
- `account_number_id` (string, required)
  The identifier of the Account Number the inbound Wire Transfer is for.

- `amount` (integer, required)
  The transfer amount in cents. Must be positive.

- `creditor_address_line1` (string, optional)
  The sending bank will set creditor_address_line1 in production. You can simulate any value here.

- `creditor_address_line2` (string, optional)
  The sending bank will set creditor_address_line2 in production. You can simulate any value here.

- `creditor_address_line3` (string, optional)
  The sending bank will set creditor_address_line3 in production. You can simulate any value here.

- `creditor_name` (string, optional)
  The sending bank will set creditor_name in production. You can simulate any value here.

- `debtor_address_line1` (string, optional)
  The sending bank will set debtor_address_line1 in production. You can simulate any value here.

- `debtor_address_line2` (string, optional)
  The sending bank will set debtor_address_line2 in production. You can simulate any value here.

- `debtor_address_line3` (string, optional)
  The sending bank will set debtor_address_line3 in production. You can simulate any value here.

- `debtor_name` (string, optional)
  The sending bank will set debtor_name in production. You can simulate any value here.

- `end_to_end_identification` (string, optional)
  The sending bank will set end_to_end_identification in production. You can simulate any value here.

- `instructing_agent_routing_number` (string, optional)
  The sending bank will set instructing_agent_routing_number in production. You can simulate any value here.

- `instruction_identification` (string, optional)
  The sending bank will set instruction_identification in production. You can simulate any value here.

- `unique_end_to_end_transaction_reference` (string, optional)
  The sending bank will set unique_end_to_end_transaction_reference in production. You can simulate any value here.

- `unstructured_remittance_information` (string, optional)
  The sending bank will set unstructured_remittance_information in production. You can simulate any value here.

- `wire_drawdown_request_id` (string, optional)
  The identifier of a Wire Drawdown Request the inbound Wire Transfer is fulfilling.