# Real-Time Payments Request for Payments
> Real-Time Payments transfers move funds, within seconds, between your Increase account and any other account on the Real-Time Payments network. A request for payment is a request to the receiver to send funds to your account. The permitted uses of Requests For Payment are limited by the Real-Time Payments network to business-to-business payments and transfers between two accounts at different banks owned by the same individual. Please contact [support@increase.com](mailto:support@increase.com) to enable this API for your team.

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

## The Real-Time Payments Request for Payment object
### Example
```json
{
  "amount": 100,
  "created_at": "2020-01-31T23:59:59Z",
  "currency": "USD",
  "debtor": {
    "address": {
      "city": "New York",
      "country": "US",
      "post_code": "10045",
      "street_name": "33 Liberty Street"
    },
    "name": "Ian Crease"
  },
  "debtor_name": "Ian Crease",
  "destination_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
  "expires_at": "2027-12-31",
  "fulfillment_transaction_id": null,
  "id": "real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7",
  "idempotency_key": null,
  "refusal": null,
  "rejection": null,
  "source_account_number": "987654321",
  "source_routing_number": "101050001",
  "status": "pending_response",
  "submission": null,
  "type": "real_time_payments_request_for_payment",
  "unstructured_remittance_information": "Invoice 29582"
}
```
### Attributes
- `amount` (integer)
  The transfer amount in USD cents.

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

- `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` (dictionary)
  Details of the person being requested to pay.

  - `debtor.address` (dictionary)
    Address of the debtor.

      - `debtor.address.city` (string, nullable)
        The town or city.

      - `debtor.address.country` (string, nullable)
        The ISO 3166, Alpha-2 country code.

      - `debtor.address.post_code` (string, nullable)
        The postal code or zip.

      - `debtor.address.street_name` (string, nullable)
        The street name without the street number.

  - `debtor.name` (string)
    The name of the debtor.

- `destination_account_number_id` (string)
  The Account Number in which a successful transfer will arrive.

- `expires_at` (string)
  The expiration time for this request, in UTC. The requestee will not be able to pay after this date.

- `fulfillment_transaction_id` (string, nullable)
  The transaction that fulfilled this request.

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

- `refusal` (dictionary, nullable)
  If the request for payment is refused by the destination financial institution or the receiving customer, this will contain supplemental details.

  - `refusal.refusal_reason_code` (enum)
    The reason the request for payment was refused as provided by the recipient bank or the customer.
    Cases:
    * `account_blocked` (The destination account is currently blocked from receiving transactions. Corresponds to the Real-Time Payments reason code `AC06`.)
    * `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_debtor_address` (The debtor's address is required, but missing or invalid. Corresponds to the Real-Time Payments reason code `BE07`.)
    * `invalid_creditor_address` (The creditor's address is required, but missing or invalid. Corresponds to the Real-Time Payments reason code `BE04`.)
    * `creditor_identifier_incorrect` (Creditor identifier incorrect. Corresponds to the Real-Time Payments reason code `CH11`.)
    * `requested_by_customer` (The customer refused the request. Corresponds to the Real-Time Payments reason code `CUST`.)
    * `order_rejected` (The order was rejected. Corresponds to the Real-Time Payments reason code `DS04`.)
    * `end_customer_deceased` (The destination account holder is deceased. Corresponds to the Real-Time Payments reason code `MD07`.)
    * `customer_has_opted_out` (The customer has opted out of receiving requests for payments from this creditor. Corresponds to the Real-Time Payments reason code `SL12`.)
    * `other` (Some other error or issue has occurred.)

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

  - `rejection.reject_reason_code` (enum)
    The reason the request for payment 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.)

- `source_account_number` (string)
  The account number the request is sent to.

- `source_routing_number` (string)
  The receiver's American Bankers' Association (ABA) Routing Transit Number (RTN).

- `status` (enum)
  The lifecycle status of the request for payment.
  Cases:
  * `pending_submission` (The request for payment is queued to be submitted to Real-Time Payments.)
  * `pending_response` (The request for payment has been submitted and is pending a response from Real-Time Payments.)
  * `rejected` (The request for payment was rejected by the network or the recipient.)
  * `accepted` (The request for payment was accepted by the recipient but has not yet been paid.)
  * `refused` (The request for payment was refused by the recipient.)
  * `fulfilled` (The request for payment was fulfilled by the receiver.)

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

  - `submission.payment_information_identification` (string)
    The Real-Time Payments payment information identification of the request.

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

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

## List Real-Time Payments Request for Payments
GET /real_time_payments_request_for_payments

### Example
```curl
curl \
  --url "${INCREASE_URL}/real_time_payments_request_for_payments?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 Request for Payments to those destined 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 Real-Time Payments Request for Payment List object:
```json
{
  "data": [
    {
      "amount": 100,
      "created_at": "2020-01-31T23:59:59Z",
      "currency": "USD",
      "debtor": {
        "address": {
          "city": "New York",
          "country": "US",
          "post_code": "10045",
          "street_name": "33 Liberty Street"
        },
        "name": "Ian Crease"
      },
      "debtor_name": "Ian Crease",
      "destination_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "expires_at": "2027-12-31",
      "fulfillment_transaction_id": null,
      "id": "real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7",
      "idempotency_key": null,
      "refusal": null,
      "rejection": null,
      "source_account_number": "987654321",
      "source_routing_number": "101050001",
      "status": "pending_response",
      "submission": null,
      "type": "real_time_payments_request_for_payment",
      "unstructured_remittance_information": "Invoice 29582"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Real-Time Payments Request for Payment
POST /real_time_payments_request_for_payments

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/real_time_payments_request_for_payments" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "amount": 100,
    "debtor": {
      "address": {
        "country": "US",
        "street_name": "Liberty Street"
      },
      "name": "Ian Crease"
    },
    "destination_account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
    "expires_at": "2027-12-31",
    "source_account_number": "987654321",
    "source_routing_number": "101050001",
    "unstructured_remittance_information": "Invoice 29582"
  }'
```

### Body Parameters
- `amount` (integer, required)
  The requested amount in USD cents. Must be positive.

- `debtor` (dictionary, required)
  Details of the person being requested to pay.

  - `debtor.address` (dictionary, required)
    Address of the debtor.

      - `debtor.address.city` (string, optional)
        The town or city.

      - `debtor.address.country` (string, required)
        The ISO 3166, Alpha-2 country code.

      - `debtor.address.post_code` (string, optional)
        The postal code or zip.

      - `debtor.address.street_name` (string, optional)
        The street name without the street number.

  - `debtor.name` (string, required)
    The name of the debtor.

- `destination_account_number_id` (string, required)
  The identifier of the Account Number where the funds will land.

- `expires_at` (string, required)
  The expiration time for this request, in UTC. The requestee will not be able to pay after this date.

- `source_account_number` (string, required)
  The account number the funds will be requested from.

- `source_routing_number` (string, required)
  The requestee's American Bankers' Association (ABA) Routing Transit Number (RTN).

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

## Retrieve a Real-Time Payments Request for Payment
GET /real_time_payments_request_for_payments/{request_for_payment_id}

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