# Real-Time Payments Transfers
> Real-Time Payments transfers move funds, within seconds, between your Increase account and any other account on the Real-Time Payments network.

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

## The Real-Time Payments Transfer object
### Example
```json
{
  "account_id": "account_in71c4amph0vgo2qllky",
  "account_number": "987654321",
  "acknowledgement": {
    "acknowledged_at": "2020-01-31T23:59:59Z"
  },
  "amount": 100,
  "approval": null,
  "cancellation": null,
  "created_at": "2020-01-31T23:59:59Z",
  "created_by": {
    "category": "user",
    "user": {
      "email": "user@example.com"
    }
  },
  "creditor_name": "Ian Crease",
  "currency": "USD",
  "debtor_name": null,
  "external_account_id": null,
  "id": "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq",
  "idempotency_key": null,
  "pending_transaction_id": null,
  "rejection": null,
  "routing_number": "101050001",
  "source_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
  "status": "complete",
  "submission": {
    "submitted_at": "2020-01-31T23:59:59Z",
    "transaction_identification": "20220501234567891T1BSLZO01745013025"
  },
  "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
  "type": "real_time_payments_transfer",
  "ultimate_creditor_name": null,
  "ultimate_debtor_name": null,
  "unstructured_remittance_information": "Invoice 29582"
}
```
### Attributes
- `account_id` (string)
  The Account from which the transfer was sent.

- `account_number` (string)
  The destination account number.

- `acknowledgement` (dictionary, nullable)
  If the transfer is acknowledged by the recipient bank, this will contain supplemental details.

  - `acknowledgement.acknowledged_at` (string)
    When the transfer was acknowledged.

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

- `approval` (dictionary, nullable)
  If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval.

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

  - `approval.approved_by` (string, nullable)
    If the Transfer was approved by a user in the dashboard, the email address of that user.

- `cancellation` (dictionary, nullable)
  If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation.

  - `cancellation.canceled_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Transfer was canceled.

  - `cancellation.canceled_by` (string, nullable)
    If the Transfer was canceled by a user in the dashboard, the email address of that user.

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

- `created_by` (dictionary, nullable)
  What object created the transfer, either via the API or the dashboard.

  - `created_by.api_key` (dictionary, nullable)
    If present, details about the API key that created the transfer.

      - `created_by.api_key.description` (string, nullable)
        The description set for the API key when it was created.

  - `created_by.category` (enum)
    The type of object that created this transfer.
    Cases:
    * `api_key` (An API key. Details will be under the `api_key` object.)
    * `oauth_application` (An OAuth application you connected to Increase. Details will be under the `oauth_application` object.)
    * `user` (A User in the Increase dashboard. Details will be under the `user` object.)

  - `created_by.oauth_application` (dictionary, nullable)
    If present, details about the OAuth Application that created the transfer.

      - `created_by.oauth_application.name` (string)
        The name of the OAuth Application.

  - `created_by.user` (dictionary, nullable)
    If present, details about the User that created the transfer.

      - `created_by.user.email` (string)
        The email address of the User.

- `creditor_name` (string)
  The name of the transfer's recipient. This is set by the sender when creating the transfer.

- `currency` (enum)
  The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. For real-time payments transfers this is always equal to `USD`.
  Cases:
  * `USD` (US Dollar (USD))

- `debtor_name` (string, nullable)
  The name of the transfer's sender. If not provided, defaults to the name of the account's entity.

- `external_account_id` (string, nullable)
  The identifier of the External Account the transfer was made to, if any.

- `id` (string)
  The Real-Time Payments Transfer'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).

- `pending_transaction_id` (string, nullable)
  The ID for the pending transaction representing the transfer. A pending transaction is created when the transfer [requires approval](https://increase.com/documentation/transfer-approvals#transfer-approvals) by someone else in your organization.

- `rejection` (dictionary, nullable)
  If the transfer is rejected by Real-Time Payments or the destination financial institution, this will contain supplemental details.

  - `rejection.reject_reason_additional_information` (string, nullable)
    Additional information about the rejection provided by the recipient bank when the `reject_reason_code` is `NARRATIVE`.

  - `rejection.reject_reason_code` (enum)
    The reason the transfer was rejected as provided by the recipient bank or the Real-Time Payments network.
    Cases:
    * `account_closed` (The destination account is closed. Corresponds to the Real-Time Payments reason code `AC04`.)
    * `account_blocked` (The destination account is currently blocked from receiving transactions. Corresponds to the Real-Time Payments reason code `AC06`.)
    * `invalid_creditor_account_type` (The destination account is ineligible to receive Real-Time Payments transfers. Corresponds to the Real-Time Payments reason code `AC14`.)
    * `invalid_creditor_account_number` (The destination account does not exist. Corresponds to the Real-Time Payments reason code `AC03`.)
    * `invalid_creditor_financial_institution_identifier` (The destination routing number is invalid. Corresponds to the Real-Time Payments reason code `RC04`.)
    * `end_customer_deceased` (The destination account holder is deceased. Corresponds to the Real-Time Payments reason code `MD07`.)
    * `narrative` (The reason is provided as narrative information in the additional information field.)
    * `transaction_forbidden` (Real-Time Payments transfers are not allowed to the destination account. Corresponds to the Real-Time Payments reason code `AG01`.)
    * `transaction_type_not_supported` (Real-Time Payments transfers are not enabled for the destination account. Corresponds to the Real-Time Payments reason code `AG03`.)
    * `unexpected_amount` (The amount of the transfer is different than expected by the recipient. Corresponds to the Real-Time Payments reason code `AM09`.)
    * `amount_exceeds_bank_limits` (The amount is higher than the recipient is authorized to send or receive. Corresponds to the Real-Time Payments reason code `AM14`.)
    * `invalid_creditor_address` (The creditor's address is required, but missing or invalid. Corresponds to the Real-Time Payments reason code `BE04`.)
    * `unknown_end_customer` (The specified creditor is unknown. Corresponds to the Real-Time Payments reason code `BE06`.)
    * `invalid_debtor_address` (The debtor's address is required, but missing or invalid. Corresponds to the Real-Time Payments reason code `BE07`.)
    * `timeout` (There was a timeout processing the transfer. Corresponds to the Real-Time Payments reason code `DS24`.)
    * `unsupported_message_for_recipient` (Real-Time Payments transfers are not enabled for the destination account. Corresponds to the Real-Time Payments reason code `NOAT`.)
    * `recipient_connection_not_available` (The destination financial institution is currently not connected to Real-Time Payments. Corresponds to the Real-Time Payments reason code `9912`.)
    * `real_time_payments_suspended` (Real-Time Payments is currently unavailable. Corresponds to the Real-Time Payments reason code `9948`.)
    * `instructed_agent_signed_off` (The destination financial institution is currently signed off of Real-Time Payments. Corresponds to the Real-Time Payments reason code `9910`.)
    * `processing_error` (The transfer was rejected due to an internal Increase issue. We have been notified.)
    * `other` (Some other error or issue has occurred.)

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

- `routing_number` (string)
  The destination American Bankers' Association (ABA) Routing Transit Number (RTN).

- `source_account_number_id` (string)
  The Account Number the recipient will see as having sent the transfer.

- `status` (enum)
  The lifecycle status of the transfer.
  Cases:
  * `pending_approval` (The transfer is pending approval.)
  * `canceled` (The transfer has been canceled.)
  * `pending_reviewing` (The transfer is pending review by Increase.)
  * `requires_attention` (The transfer requires attention from an Increase operator.)
  * `rejected` (The transfer was rejected by the network or the recipient's bank.)
  * `pending_submission` (The transfer is queued to be submitted to Real-Time Payments.)
  * `submitted` (The transfer has been submitted and is pending a response from Real-Time Payments.)
  * `complete` (The transfer has been sent successfully and is complete.)

- `submission` (dictionary, nullable)
  After the transfer is submitted to Real-Time Payments, this will contain supplemental details.

  - `submission.submitted_at` (string, nullable)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was submitted to The Clearing House.

  - `submission.transaction_identification` (string)
    The Real-Time Payments network identification of the transfer.

- `transaction_id` (string, nullable)
  The Transaction funding the transfer once it is complete.

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

- `ultimate_creditor_name` (string, nullable)
  The name of the ultimate recipient of the transfer. Set this if the creditor is an intermediary receiving the payment for someone else.

- `ultimate_debtor_name` (string, nullable)
  The name of the ultimate sender of the transfer. Set this if the funds are being sent on behalf of someone who is not the account holder at Increase.

- `unstructured_remittance_information` (string)
  Unstructured information that will show on the recipient's bank statement.

## List Real-Time Payments Transfers
GET /real_time_payments_transfers

### Example
```curl
curl \
  --url "${INCREASE_URL}/real_time_payments_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 Real-Time Payments Transfers to those belonging to the specified Account.

- `external_account_id` (string, optional)
  Filter Real-Time Payments Transfers to those made to the specified External Account.

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

- `status.in` (array of enums, optional)
  Return results whose value is in the provided list. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending_approval` (The transfer is pending approval.)
  * `canceled` (The transfer has been canceled.)
  * `pending_reviewing` (The transfer is pending review by Increase.)
  * `requires_attention` (The transfer requires attention from an Increase operator.)
  * `rejected` (The transfer was rejected by the network or the recipient's bank.)
  * `pending_submission` (The transfer is queued to be submitted to Real-Time Payments.)
  * `submitted` (The transfer has been submitted and is pending a response from Real-Time Payments.)
  * `complete` (The transfer has been sent successfully and is complete.)

- `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 Real-Time Payments Transfer List object:
```json
{
  "data": [
    {
      "account_id": "account_in71c4amph0vgo2qllky",
      "account_number": "987654321",
      "acknowledgement": {
        "acknowledged_at": "2020-01-31T23:59:59Z"
      },
      "amount": 100,
      "approval": null,
      "cancellation": null,
      "created_at": "2020-01-31T23:59:59Z",
      "created_by": {
        "category": "user",
        "user": {
          "email": "user@example.com"
        }
      },
      "creditor_name": "Ian Crease",
      "currency": "USD",
      "debtor_name": null,
      "external_account_id": null,
      "id": "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq",
      "idempotency_key": null,
      "pending_transaction_id": null,
      "rejection": null,
      "routing_number": "101050001",
      "source_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "status": "complete",
      "submission": {
        "submitted_at": "2020-01-31T23:59:59Z",
        "transaction_identification": "20220501234567891T1BSLZO01745013025"
      },
      "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
      "type": "real_time_payments_transfer",
      "ultimate_creditor_name": null,
      "ultimate_debtor_name": null,
      "unstructured_remittance_information": "Invoice 29582"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Real-Time Payments Transfer
POST /real_time_payments_transfers

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/real_time_payments_transfers" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_number": "987654321",
    "amount": 100,
    "creditor_name": "Ian Crease",
    "routing_number": "101050001",
    "source_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
    "unstructured_remittance_information": "Invoice 29582"
  }'
```

### Body Parameters
- `account_number` (string, optional)
  The destination account number.

- `amount` (integer, required)
  The transfer amount in USD cents. For Real-Time Payments transfers, must be positive.

- `creditor_name` (string, required)
  The name of the transfer's recipient.

- `debtor_name` (string, optional)
  The name of the transfer's sender. If not provided, defaults to the name of the account's entity.

- `external_account_id` (string, optional)
  The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number` and `routing_number` must be absent.

- `require_approval` (boolean, optional)
  Whether the transfer requires explicit approval via the dashboard or API.

- `routing_number` (string, optional)
  The destination American Bankers' Association (ABA) Routing Transit Number (RTN).

- `source_account_number_id` (string, required)
  The identifier of the Account Number from which to send the transfer.

- `ultimate_creditor_name` (string, optional)
  The name of the ultimate recipient of the transfer. Set this if the creditor is an intermediary receiving the payment for someone else.

- `ultimate_debtor_name` (string, optional)
  The name of the ultimate sender of the transfer. Set this if the funds are being sent on behalf of someone who is not the account holder at Increase.

- `unstructured_remittance_information` (string, required)
  Unstructured information that will show on the recipient's bank statement.

## Retrieve a Real-Time Payments Transfer
GET /real_time_payments_transfers/{real_time_payments_transfer_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/real_time_payments_transfers/real_time_payments_transfer_iyuhl5kdn7ssmup83mvq" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `real_time_payments_transfer_id` (string, required)
  The identifier of the Real-Time Payments Transfer.

## Approve a Real-Time Payments Transfer
POST /real_time_payments_transfers/{real_time_payments_transfer_id}/approve
> Approves a Real-Time Payments Transfer in a pending_approval state.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/real_time_payments_transfers/real_time_payments_transfer_iyuhl5kdn7ssmup83mvq/approve" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `real_time_payments_transfer_id` (string, required)
  The identifier of the Real-Time Payments Transfer to approve.

## Cancel a pending Real-Time Payments Transfer
POST /real_time_payments_transfers/{real_time_payments_transfer_id}/cancel
> Cancels a Real-Time Payments Transfer in a pending_approval state.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/real_time_payments_transfers/real_time_payments_transfer_iyuhl5kdn7ssmup83mvq/cancel" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `real_time_payments_transfer_id` (string, required)
  The identifier of the pending Real-Time Payments Transfer to cancel.

## Sandbox: Complete a Real-Time Payments Transfer
POST /simulations/real_time_payments_transfers/{real_time_payments_transfer_id}/complete
> Simulates submission of a [Real-Time Payments Transfer](#real-time-payments-transfers) and handling the response from the destination financial institution. This transfer must first have a `status` of `pending_submission`.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/real_time_payments_transfers/real_time_payments_transfer_iyuhl5kdn7ssmup83mvq/complete" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{}'
```
### Path Parameters
- `real_time_payments_transfer_id` (string, required)
  The identifier of the Real-Time Payments Transfer you wish to complete.

### Body Parameters
- `rejection` (dictionary, optional)
  If set, the simulation will reject the transfer.

  - `rejection.reject_reason_code` (enum, required)
    The reason code that the simulated rejection will have.
    Cases:
    * `account_closed` (The destination account is closed. Corresponds to the Real-Time Payments reason code `AC04`.)
    * `account_blocked` (The destination account is currently blocked from receiving transactions. Corresponds to the Real-Time Payments reason code `AC06`.)
    * `invalid_creditor_account_type` (The destination account is ineligible to receive Real-Time Payments transfers. Corresponds to the Real-Time Payments reason code `AC14`.)
    * `invalid_creditor_account_number` (The destination account does not exist. Corresponds to the Real-Time Payments reason code `AC03`.)
    * `invalid_creditor_financial_institution_identifier` (The destination routing number is invalid. Corresponds to the Real-Time Payments reason code `RC04`.)
    * `end_customer_deceased` (The destination account holder is deceased. Corresponds to the Real-Time Payments reason code `MD07`.)
    * `narrative` (The reason is provided as narrative information in the additional information field.)
    * `transaction_forbidden` (Real-Time Payments transfers are not allowed to the destination account. Corresponds to the Real-Time Payments reason code `AG01`.)
    * `transaction_type_not_supported` (Real-Time Payments transfers are not enabled for the destination account. Corresponds to the Real-Time Payments reason code `AG03`.)
    * `unexpected_amount` (The amount of the transfer is different than expected by the recipient. Corresponds to the Real-Time Payments reason code `AM09`.)
    * `amount_exceeds_bank_limits` (The amount is higher than the recipient is authorized to send or receive. Corresponds to the Real-Time Payments reason code `AM14`.)
    * `invalid_creditor_address` (The creditor's address is required, but missing or invalid. Corresponds to the Real-Time Payments reason code `BE04`.)
    * `unknown_end_customer` (The specified creditor is unknown. Corresponds to the Real-Time Payments reason code `BE06`.)
    * `invalid_debtor_address` (The debtor's address is required, but missing or invalid. Corresponds to the Real-Time Payments reason code `BE07`.)
    * `timeout` (There was a timeout processing the transfer. Corresponds to the Real-Time Payments reason code `DS24`.)
    * `unsupported_message_for_recipient` (Real-Time Payments transfers are not enabled for the destination account. Corresponds to the Real-Time Payments reason code `NOAT`.)
    * `recipient_connection_not_available` (The destination financial institution is currently not connected to Real-Time Payments. Corresponds to the Real-Time Payments reason code `9912`.)
    * `real_time_payments_suspended` (Real-Time Payments is currently unavailable. Corresponds to the Real-Time Payments reason code `9948`.)
    * `instructed_agent_signed_off` (The destination financial institution is currently signed off of Real-Time Payments. Corresponds to the Real-Time Payments reason code `9910`.)
    * `processing_error` (The transfer was rejected due to an internal Increase issue. We have been notified.)
    * `other` (Some other error or issue has occurred.)