# Real-Time Payments Requests for Payment
> 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/webhooks.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
{
  "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
  "amount": 100,
  "created_at": "2020-01-31T23:59:59Z",
  "creditor_name": "National Phonograph Company",
  "currency": "USD",
  "debtor": {
    "address": {
      "address_line2": "Unit 2",
      "building_number": "33",
      "city": "New York",
      "country": "US",
      "postal_code": "10045",
      "state": "NY",
      "street_name": "Liberty Street"
    },
    "name": "Ian Crease"
  },
  "debtor_account_number": "987654321",
  "debtor_routing_number": "101050001",
  "expires_at": "2020-02-14T23:59:59+00:00",
  "fulfillment_inbound_real_time_payments_transfer_id": null,
  "id": "real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7",
  "idempotency_key": null,
  "refusal": null,
  "rejection": null,
  "requested_execution_at": "2020-02-07T23:59:59+00:00",
  "status": "pending_response",
  "submission": null,
  "type": "real_time_payments_request_for_payment",
  "unstructured_remittance_information": "Invoice 29582"
}
```
### Attributes
- `account_number_id` (string)
  The Account Number in which a successful transfer will arrive.

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

- `creditor_name` (string)
  The name of the creditor requesting the payment.

- `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.address_line2` (string, nullable)
        A second address line, such as an apartment or suite number. The first address line is separated into `building_number` and `street_name`.

      - `debtor.address.building_number` (string, nullable)
        The number identifying the position of the building on the street.

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

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

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

      - `debtor.address.state` (string, nullable)
        The US state component of the address.

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

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

- `debtor_account_number` (string)
  The debtor's account number, which the request is sent to.

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

- `expires_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time after which the request for payment is no longer valid. After this time the debtor's bank should no longer allow the debtor to pay it.

- `fulfillment_inbound_real_time_payments_transfer_id` (string, nullable)
  The identifier of the Inbound Real-Time Payments Transfer 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_additional_information` (string, nullable)
    Additional information about the refusal provided by the recipient bank or the customer. This is typically present when the `refusal_reason_code` is `other`.

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

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

- `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_additional_information` (string, nullable)
    Additional information about the rejection provided by the recipient bank or the Real-Time Payments network. This is typically present when the `reject_reason_code` is `narrative`.

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

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

- `requested_execution_at` (string, nullable)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time by which the payment was requested to be made.

- `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 Requests for Payment
GET /real_time_payments_requests_for_payment

### Example
```curl
curl \
  --url "${INCREASE_URL}/real_time_payments_requests_for_payment?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.
  Default: `100`

- `account_id` (string, optional)
  Filter Real-Time Payments Requests for Payment 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": [
    {
      "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
      "amount": 100,
      "created_at": "2020-01-31T23:59:59Z",
      "creditor_name": "National Phonograph Company",
      "currency": "USD",
      "debtor": {
        "address": {
          "address_line2": "Unit 2",
          "building_number": "33",
          "city": "New York",
          "country": "US",
          "postal_code": "10045",
          "state": "NY",
          "street_name": "Liberty Street"
        },
        "name": "Ian Crease"
      },
      "debtor_account_number": "987654321",
      "debtor_routing_number": "101050001",
      "expires_at": "2020-02-14T23:59:59+00:00",
      "fulfillment_inbound_real_time_payments_transfer_id": null,
      "id": "real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7",
      "idempotency_key": null,
      "refusal": null,
      "rejection": null,
      "requested_execution_at": "2020-02-07T23:59:59+00:00",
      "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_requests_for_payment

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/real_time_payments_requests_for_payment" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "account_number_id": "account_number_v18nkfqm6afpsrvy82b2",
    "amount": 100,
    "creditor_name": "National Phonograph Company",
    "debtor": {
      "address": {
        "country": "US",
        "street_name": "Liberty Street"
      },
      "name": "Ian Crease"
    },
    "debtor_account_number": "987654321",
    "debtor_routing_number": "101050001",
    "expires_at": "2020-02-14T23:59:59+00:00",
    "requested_execution_at": "2020-02-07T23:59:59+00:00",
    "unstructured_remittance_information": "Invoice 29582"
  }'
```

### Body Parameters
- `account_number_id` (string, required)
  The identifier of the Account Number where the funds will land.

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

- `creditor_name` (string, optional)
  The name of the creditor requesting the payment. If not provided, defaults to the name of the account's entity.

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

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

      - `debtor.address.address_line2` (string, optional)
        A second address line, such as an apartment or suite number. The first address line is separated into `building_number` and `street_name`.

      - `debtor.address.building_number` (string, optional)
        The number identifying the position of the building on the street.

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

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

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

      - `debtor.address.state` (string, optional)
        The US state component of the address.

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

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

- `debtor_account_number` (string, required)
  The debtor's account number, which the funds will be requested from.

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

- `expires_at` (string, required)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time after which the request for payment is no longer valid. After this time the debtor's bank should no longer allow the debtor to pay it. Must not be before `requested_execution_at`.

- `requested_execution_at` (string, required)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time by which you are requesting the payment to be made.

- `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_requests_for_payment/{real_time_payments_request_for_payment_id}

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