# Create payment expiry

Creates a payment expiration window, or time to live (ttl), in seconds.

Endpoint: POST /config/payments/payment_expiries
Version: 4.0.0
Security: Bearer

## Security:

  - `Bearer` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `payment_ttl` (number)
    Payment expiration window, or time to live (ttl), in seconds. To calculate the payment expiration date, xCurrent adds this value to the payment creation timestamp.
    Example: 5900

  - `sending_partner` (string)
    RippleNet address of the sender, in the format `ripplenetaddress`. For example, `rn.us.sf.san_francisco`.
    Example: rn.us.ca.san_francisco

  - `receiving_partner` (string)
    RippleNet address of the receiver, in the format `ripplenetaddress`. For example, `rn.us.ny.new_york`.
    Example: rn.us.tx.austin

  - `currency` (string)
    currency of the exchange rate.
    Example: USD

## Response 200:

  - `200` (unknown)
    Successfully created the payment expiration window.

## Response 200 fields (application/json):

  - `payment_ttl` (number)
    Payment expiration window, or time to live (ttl), in seconds. To calculate the payment expiration date, xCurrent adds this value to the payment creation timestamp.
    Example: 5900

  - `sending_partner` (string)
    RippleNet address of the sender, in the format `ripplenetaddress`. For example, `rn.us.sf.san_francisco`.
    Example: rn.us.ca.san_francisco

  - `receiving_partner` (string)
    RippleNet address of the receiver, in the format `ripplenetaddress`. For example, `rn.us.ny.new_york`.
    Example: rn.us.tx.austin

  - `currency` (string)
    currency of the exchange rate.
    Example: USD

  - `expiry_id` (string)
    id of payment expiry object
    Example: 4711728c-cd35-49ec-96a5-72732b4333ec

## Response 400:

  - `400` (unknown)
    Bad request.

## Response 400 fields (application/json):

  - `type` (string)
    URL to the error documentation.
    Example: https://errors.ripplenet.ripple.com/error/json-processing-error

  - `title` (string)
    Summary of the returned problem.
    Example: Invalid Request Object

  - `detail` (string)
    Description of the returned problem.
    Example: The request parameter [account_id] is not in the correct format.

  - `status` (number)
    HTTP error code.
    Example: 400

  - `ripplenet_error_code` (string)
    RippleNet specific error code.
    Example: E0104

  - `finality` (string)
    Specifies if the request can be retried for a successful response.
    Example: PERMANENT

