> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ca.cryptoprocessing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a payment request

> Create a payment request for the customer for a specified amount and a configurable expiration time.

> [!NOTE]
>
> Make sure that the URL that you provide in the `url_store` field uses the secure HTTPS protocol, uses domain names (not IP addresses) and is considered clean by VirusTotal and similar scanners.

For every error this endpoint returns and what it means, see [API errors: Create a payment request](https://docs.ca.cryptoprocessing.com/api-reference/errors.md#create-a-payment-request).


## OpenAPI

````yaml POST /payments/v1/requests
openapi: 3.1.0
info:
  title: Merchant Backend V2
  version: '1.0'
  description: Documentation for merchant backend processing endpoints
servers:
  - url: https://app.ca.cryptoprocessing.com/api
security:
  - xProcessingKey: []
tags:
  - name: Status
  - name: Balance
  - name: Currencies
  - name: Deposit addresses
  - name: Withdrawal
  - name: Exchange
  - name: Invoices
  - name: Transactions
paths:
  /payments/v1/requests:
    post:
      tags:
        - Payment requests
      summary: Create a payment request
      description: >-
        Create a payment request for the customer for a specified amount and a
        configurable expiration time.
      parameters:
        - $ref: '#/components/parameters/XProcessingSignatureHeader'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  oneOf:
                    - type: string
                    - type: number
                  description: >-
                    The amount you want to receive from the customer, in
                    `currency`, as a decimal string (for example, `"100.50"`) or
                    a number. It must be within the [minimum and maximum payment
                    request amounts](/confirmations-and-limits). The number of
                    decimal places allowed depends on the currency (2 for fiat
                    currencies and stablecoins, 6 for other cryptocurrencies).
                  example: '100.50'
                currency:
                  type: object
                  description: The currency you want to receive.
                  required:
                    - iso
                  properties:
                    iso:
                      type: string
                      description: >-
                        Currency ISO code. For the list of all available
                        currencies, see [Currency
                        codes](/api-reference/currency-codes#currency-codes-for-payment-requests).
                      example: USD
                    network_name:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Currency network name. Required for cryptocurrencies. Do
                        not include for fiat currencies. For the list of all
                        available networks, see [Currency
                        codes](/api-reference/currency-codes#currency-codes-for-payment-requests).
                user_fee_percent:
                  type: integer
                  enum:
                    - 0
                    - 100
                  default: 0
                  description: >
                    Percentage of processing fees [paid by the
                    customer](/payment-requests/fees#passing-the-processing-fee-to-your-customer).


                    Currently, only two values are supported:

                    - `0` (the default) — the processing fee is paid by the
                    merchant.

                    - `100` — the processing fee is paid by the customer.
                life_time_duration:
                  type:
                    - integer
                    - 'null'
                  minimum: 300
                  maximum: 5184000
                  description: >-
                    Payment request lifespan, in seconds (a whole number).
                    Include **either** this parameter or life_time_date_time.
                    **At least one** of these fields is required. The lifespan
                    must be within the minimum and maximum lifespan for payment
                    requests.
                  example: 3600
                life_time_date_time:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    The time the payment request expires, as a Unix timestamp in
                    seconds (a whole number). Include **either** this parameter
                    or life_time_duration. **At least one** of these fields is
                    required. The same minimum and maximum lifespan apply as for
                    `life_time_duration`.
                  example: 1773768946
                payment_currency:
                  type: object
                  required:
                    - iso
                  description: >
                    The cryptocurrency your customer will pay in. Unlike
                    `currency`, this must be a cryptocurrency — fiat currencies
                    are not supported.


                    You can set both the currency and network or just the
                    currency. If [rate_mode](#body-rate-mode) is `fixed`, you
                    must set both the currency and network.
                  properties:
                    iso:
                      type: string
                      description: >-
                        Cryptocurrency ISO code. For the list of all available
                        currencies, see [Currency
                        codes](/api-reference/currency-codes#currency-codes-for-payment-requests).
                    network_name:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Currency network name. Optional — omit to accept this
                        cryptocurrency on any of its supported networks. For the
                        list of all available networks, see [Currency
                        codes](/api-reference/currency-codes#currency-codes-for-payment-requests).
                rate_mode:
                  type: string
                  enum:
                    - standard
                    - fixed
                  default: standard
                  description: >
                    This parameter controls the [rate
                    lock](/payment-requests#currency-selection) behavior. The
                    value is case-sensitive.


                    - `standard` - the customer will be able to choose the
                    payment currency. The exchange rate will be locked after the
                    customer confirms the selection on the first screen.

                    - `fixed` - the exchange rate is locked immediately after
                    the payment request is created. The first screen is skipped,
                    and the customer is taken directly to the screen with the
                    payment instructions. In this mode, you must specify both
                    the currency and network in
                    [payment_currency](#body-payment-currency), as well as
                    provide [sender_type](#body-sender-type),
                    [sender_data](#body-sender-data) and
                    [end_user_email](#body-end-user-email) for the customer
                    identification.
                end_user_email:
                  type: string
                  format: email
                  description: >-
                    The customer's email address. It's filled in for the
                    customer on the payment page. The customer gets an email
                    when the payment is complete, and when a payment doesn't
                    match the request (an underpayment that isn't accepted, an
                    overpayment or a late payment): either a link to claim a
                    [refund](/payment-requests/refunds), or a notice that the
                    amount is too small to be refunded. Required if
                    [rate_mode](#body-rate-mode) is `fixed`.
                  example: chris.customer@example.com
                end_user_reference:
                  type: string
                  description: >-
                    The unique ID of the customer this payment request is for.
                    You can use it to group payment requests by customer.
                sender_type:
                  allOf:
                    - $ref: '#/components/schemas/sender_type.deposits'
                  description: >
                    Type of the customer who sends the funds. Use `natural` if
                    the sender is an individual person and `legal` if the sender
                    is a legal entity. The selected type determines which fields
                    must be included in [sender_data](#body-sender-data).


                    `sender_type` and `sender_data` go together: if you provide
                    one, you must also provide the other. Both are required if
                    [rate_mode](#body-rate-mode) is `fixed`. Otherwise, you can
                    omit both, see [Requesting data from the
                    customer](/user-data-collection#requesting-data-from-the-customer).
                sender_data:
                  allOf:
                    - $ref: '#/components/schemas/sender_data'
                  description: >
                    Details of the customer who sends the funds. Which fields
                    are required depends on [sender_type](#body-sender-type).


                    `sender_type` and `sender_data` go together: if you provide
                    one, you must also provide the other. Both are required if
                    [rate_mode](#body-rate-mode) is `fixed`. Otherwise, you can
                    omit both, see [Requesting data from the
                    customer](/user-data-collection#requesting-data-from-the-customer).
                description:
                  type: string
                  description: Payment request description that the customer will see.
                  example: 'Order #123'
                foreign_id:
                  type: string
                  maxLength: 255
                  description: >-
                    Unique ID of the payment request in your system,
                    case-insensitive. Must not contain personal data, such as
                    the customer's name or email address. If omitted, the
                    response doesn't include `foreign_id`, and callbacks send it
                    as an empty string.
                  example: order_123
                url_store:
                  type: string
                  format: uri
                  description: >-
                    URL of the store page. The customer can click a button on
                    the payment form to return to this URL (for example, if they
                    change their mind or want to pick a different payment
                    method). We recommend setting this to the URL of the
                    checkout page.
                  example: https://example.com/store
                url_success:
                  type: string
                  format: uri
                  description: >-
                    URL of the success page. The customer will be able to return
                    to this address once the payment is completed.
                  example: https://example.com/success
                url_failed:
                  type: string
                  format: uri
                  description: >-
                    URL of the failed payment page. The customer will be able to
                    return to this address if the payment fails.
                  example: https://example.com/fail
              required:
                - amount
                - currency
                - life_time_duration
                - life_time_date_time
            examples:
              "Request 100\_USD, paid in a cryptocurrency the customer chooses":
                value:
                  amount: '100'
                  currency:
                    iso: USD
                  life_time_duration: 3600
                  end_user_email: chris.customer@example.com
                  description: Order 0511
                  foreign_id: payment_request_123
                  url_store: https://example.com/store
                  url_success: https://example.com/success
                  url_failed: https://example.com/failed
                  end_user_reference: user_12345
                  sender_type: legal
                  sender_data:
                    legal_name: Example Customer
                    country_of_registration: CAN
              "Request 50\_USDC on Ethereum":
                value:
                  amount: '50'
                  currency:
                    iso: USDC
                    network_name: ethereum
                  life_time_duration: 3600
                  end_user_email: chris.customer@example.com
                  description: Order 0511
                  foreign_id: payment_request_123
                  url_store: https://example.com/store
                  url_success: https://example.com/success
                  url_failed: https://example.com/failed
                  end_user_reference: user_12345
                  sender_type: legal
                  sender_data:
                    legal_name: Example Customer
                    country_of_registration: CAN
              "Request 100\_USD until a set date and time":
                value:
                  amount: '100'
                  currency:
                    iso: USD
                  life_time_date_time: 1775625123
                  foreign_id: payment_request_123
              "Request 100\_USD paid in USDC at a rate locked for\_1\_hour":
                value:
                  amount: '100'
                  currency:
                    iso: USD
                  rate_mode: fixed
                  life_time_duration: 3600
                  payment_currency:
                    iso: USDC
                    network_name: ethereum
                  end_user_email: chris.customer@example.com
                  description: Order 0511
                  foreign_id: payment_request_123
                  url_store: https://example.com/store
                  url_success: https://example.com/success
                  url_failed: https://example.com/failed
                  end_user_reference: user_12345
                  sender_type: legal
                  sender_data:
                    legal_name: Example Customer
                    country_of_registration: CAN
              "Request 100\_USD paid in USDC, with the customer paying the fee":
                value:
                  amount: '100'
                  currency:
                    iso: USD
                  rate_mode: fixed
                  user_fee_percent: 100
                  life_time_duration: 3600
                  payment_currency:
                    iso: USDC
                    network_name: ethereum
                  end_user_email: chris.customer@example.com
                  description: Order 0511
                  foreign_id: payment_request_123
                  url_store: https://example.com/store
                  url_success: https://example.com/success
                  url_failed: https://example.com/failed
                  end_user_reference: user_12345
                  sender_type: legal
                  sender_data:
                    legal_name: Example Customer
                    country_of_registration: CAN
              "Request 100\_USD paid in XRP, with a destination tag":
                value:
                  amount: '100'
                  currency:
                    iso: USD
                  rate_mode: fixed
                  life_time_duration: 3600
                  payment_currency:
                    iso: XRP
                    network_name: ripple
                  end_user_email: chris.customer@example.com
                  description: Order 0511
                  foreign_id: payment_request_123
                  url_store: https://example.com/store
                  url_success: https://example.com/success
                  url_failed: https://example.com/failed
                  end_user_reference: user_12345
                  sender_type: legal
                  sender_data:
                    legal_name: Example Customer
                    country_of_registration: CAN
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - amount
                      - currency
                      - user_fee_percent
                      - status
                      - rate_mode
                      - life_time
                      - payment_link
                    properties:
                      id:
                        type: string
                        description: Payment request ID.
                        example: 0196f6a1-cab2-76fb-84c7-7e9ee9ddf6b4
                      amount:
                        type: string
                        description: Payment request amount.
                        example: '100.50'
                      currency:
                        properties:
                          iso:
                            type: string
                            description: Payment request currency.
                            example: USD
                          network_name:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Network of the selected cryptocurrency. Not
                              included for fiat currencies.
                        required:
                          - iso
                      user_fee_percent:
                        type: integer
                        enum:
                          - 0
                          - 100
                        description: >-
                          Percentage of processing fees [paid by the
                          customer](/payment-requests/fees#passing-the-processing-fee-to-your-customer).
                      status:
                        type: string
                        description: >
                          The status of the newly created payment request.
                          Depends on [rate_mode](#body-rate-mode).


                          - If the rate mode is `standard`, the status will be
                          `created`.

                          - If the rate mode is `fixed`, the status will be
                          `processing`.
                        example: created
                      rate_mode:
                        type: string
                        enum:
                          - standard
                          - fixed
                        default: standard
                        description: >
                          The [rate lock](/payment-requests#currency-selection)
                          behavior.


                          - `standard` - the customer will be able to choose the
                          payment currency. The exchange rate will be locked
                          after the customer confirms the selection on the first
                          screen.

                          - `fixed` - the exchange rate is locked immediately
                          after the payment request is created. The first screen
                          is skipped, and the customer is taken directly to the
                          screen with the payment instructions.
                      valid_until:
                        type: integer
                        description: >
                          Unix timestamp until which the exchange rate remains
                          locked.


                          Included only if [rate_mode](#body-rate-mode) is
                          `fixed`.
                        example: 1731427200
                      life_time:
                        type: integer
                        description: "Unix timestamp for when the payment request will expire, in seconds. Once the customer starts paying in a different currency, the payment request can end earlier, when the [rate lock](/payment-requests#lifespan-and-rate-lock) ends.\n\nIf [rate_mode](#body-rate-mode) is `fixed`, this is the same as [valid_until](#body-valid-until). A fixed-rate payment request lasts 1\_hour at most, so a longer lifespan in the request is shortened to\_1\_hour.\n"
                        example: 1731427200
                      payment_currency:
                        type: object
                        required:
                          - iso
                        description: >-
                          The cryptocurrency your customer will pay in. This is
                          always a cryptocurrency, regardless of what `currency`
                          is set to.
                        properties:
                          iso:
                            type: string
                            description: >-
                              Cryptocurrency ISO code. For the list of all
                              available currencies, see [API currency
                              codes](/api-reference/currency-codes#currency-codes-for-payment-requests).
                          network_name:
                            type: string
                            description: Currency network name.
                      end_user_email:
                        type: string
                        format: email
                        description: Customer email provided in the request.
                        example: chris.customer@example.com
                      description:
                        type: string
                        description: Payment request description.
                        example: 'Order #123 payment'
                      payment_link:
                        type: string
                        format: uri
                        description: Payment request URL.
                      foreign_id:
                        type: string
                        description: >-
                          The `foreign_id` from the request. Omitted if the
                          request didn't include one.
                        example: payment_request_123
                      url_store:
                        type: string
                        format: uri
                        description: URL of the store page.
                      url_success:
                        type: string
                        format: uri
                        description: URL of the success page.
                      url_failed:
                        type: string
                        format: uri
                        description: URL of the failed payment page.
                      end_user_reference:
                        type: string
                        description: >-
                          The `end_user_reference` from the request. Omitted if
                          the request didn't include one.
                      payment_details:
                        type: object
                        description: >-
                          Additional information about the expected payment.
                          Included only if [rate_mode](#body-rate-mode) is
                          `fixed`.
                        additionalProperties: false
                        required:
                          - address
                          - expected_amount
                          - expected_currency
                        properties:
                          address:
                            type: object
                            additionalProperties: false
                            required:
                              - value
                            properties:
                              value:
                                type: string
                                description: >-
                                  The crypto address to which the customer will
                                  need to send the funds.
                              tag:
                                type: string
                                description: >-
                                  Destination tag/memo for currencies that
                                  require it.
                          expected_amount:
                            type: string
                            description: >-
                              The amount of cryptocurrency that the customer is
                              expected to send.
                          expected_currency:
                            type: object
                            description: >-
                              The cryptocurrency that the customer is expected
                              to send.
                            additionalProperties: false
                            required:
                              - iso
                              - network_name
                            properties:
                              iso:
                                type: string
                                description: The currency the customer will send.
                                example: USDC
                              network_name:
                                type:
                                  - string
                                  - 'null'
                                description: Network of the selected cryptocurrency.
                          exchange_rate:
                            type: object
                            additionalProperties: false
                            description: >
                              The information about the exchange that will be
                              performed after receiving funds from the customer.


                              This object is included only if
                              [payment_currency](/api-reference/endpoints/payments#body-payment-currency)
                              differs from
                              [currency](/api-reference/endpoints/payments#body-currency).
                            properties:
                              from:
                                additionalProperties: false
                                required:
                                  - iso
                                  - network_name
                                properties:
                                  iso:
                                    type: string
                                    description: The currency the customer will send.
                                    example: USDC
                                  network_name:
                                    type: string
                                    description: Network of the selected cryptocurrency.
                                    example: ethereum
                              to:
                                additionalProperties: false
                                required:
                                  - iso
                                properties:
                                  iso:
                                    type: string
                                    description: >-
                                      The currency you will receive on your
                                      balance.
                                    example: USD
                                  network_name:
                                    type: string
                                    description: >-
                                      Network of the selected cryptocurrency.
                                      Not included for fiat currencies.
                              rate:
                                type: string
                                description: "The exchange rate, in units of the `to` currency for\_1\_unit of the `from` currency."
                                example: '0.87'
                          fee:
                            type: object
                            description: >
                              The processing fee the customer pays, in the
                              payment request currency. Included only if
                              [user_fee_percent](#body-user-fee-percent) is
                              `100` (the customer pays the fee). It's included
                              in `expected_amount`.
                            properties:
                              amount:
                                type: string
                                description: Fee amount.
                                example: '0.15'
                              currency:
                                type: object
                                required:
                                  - iso
                                properties:
                                  iso:
                                    type: string
                                    description: >-
                                      Code of the fee currency, the same as the
                                      payment request currency. See [API
                                      currency
                                      codes](/api-reference/currency-codes).
                                    example: USD
                                  network_name:
                                    type: string
                                    description: >-
                                      Network of the fee currency. Present only
                                      if the payment request currency is a
                                      cryptocurrency.
                            required:
                              - amount
                              - currency
              examples:
                "Request 100\_USD, paid in a cryptocurrency the customer chooses":
                  value:
                    data:
                      id: 019d511c-9fd2-7e71-b534-74e8abd855f1
                      amount: '100'
                      currency:
                        iso: USD
                      user_fee_percent: 0
                      status: created
                      rate_mode: standard
                      life_time: 1775542323
                      end_user_email: chris.customer@example.com
                      description: Order 0511
                      payment_link: >-
                        https://payments.ca.cryptoprocessing.com/payment/lLXLZ6Q8lCwFFRbyW0C1ET
                      foreign_id: payment_request_123
                      url_store: https://example.com/store
                      url_success: https://example.com/success
                      url_failed: https://example.com/failed
                      end_user_reference: user_12345
                "Request 50\_USDC on Ethereum":
                  value:
                    data:
                      id: 019d511c-1546-7c34-a916-a2610a198448
                      amount: '50'
                      currency:
                        iso: USDC
                        network_name: ethereum
                      user_fee_percent: 0
                      status: created
                      rate_mode: standard
                      life_time: 1775542288
                      end_user_email: chris.customer@example.com
                      description: Order 0511
                      payment_link: >-
                        https://payments.ca.cryptoprocessing.com/payment/8N8_cWBnfAbT12mR5JmPVf
                      foreign_id: payment_request_123
                      url_store: https://example.com/store
                      url_success: https://example.com/success
                      url_failed: https://example.com/failed
                      end_user_reference: user_12345
                "Request 100\_USD until a set date and time":
                  value:
                    data:
                      id: 019d511d-03a8-7b1e-9c42-5f0e8a6d2b71
                      amount: '100'
                      currency:
                        iso: USD
                      user_fee_percent: 0
                      status: created
                      rate_mode: standard
                      life_time: 1775625123
                      payment_link: >-
                        https://payments.ca.cryptoprocessing.com/payment/Vq3T9sWb2KxL7nRf0aYcPe
                      foreign_id: payment_request_123
                "Request 100\_USD paid in USDC at a rate locked for\_1\_hour":
                  value:
                    data:
                      id: 019d511d-4c1f-7a63-8e27-91b5d0c3f6a8
                      amount: '100'
                      currency:
                        iso: USD
                      user_fee_percent: 0
                      status: processing
                      rate_mode: fixed
                      life_time: 1775542323
                      valid_until: 1775542323
                      payment_currency:
                        iso: USDC
                        network_name: ethereum
                      end_user_email: chris.customer@example.com
                      description: Order 0511
                      payment_link: >-
                        https://payments.ca.cryptoprocessing.com/payment/Hk4Pz8Lw1Nq6Ys3Rt7Uv0B
                      foreign_id: payment_request_123
                      url_store: https://example.com/store
                      url_success: https://example.com/success
                      url_failed: https://example.com/failed
                      end_user_reference: user_12345
                      payment_details:
                        address:
                          value: '0x3b6c3c0b5d8f8c2B4e0A9D4F5b1f21C9C8A1B2C3'
                        expected_amount: '100.29'
                        expected_currency:
                          iso: USDC
                          network_name: ethereum
                        exchange_rate:
                          from:
                            iso: USDC
                            network_name: ethereum
                          to:
                            iso: USD
                          rate: '1.00'
                "Request 100\_USD paid in USDC, with the customer paying the fee":
                  value:
                    data:
                      id: 019d511d-7e90-74c5-b1d8-3a6f2c9e0d14
                      amount: '100'
                      currency:
                        iso: USD
                      user_fee_percent: 100
                      status: processing
                      rate_mode: fixed
                      life_time: 1775542323
                      valid_until: 1775542323
                      payment_currency:
                        iso: USDC
                        network_name: ethereum
                      end_user_email: chris.customer@example.com
                      description: Order 0511
                      payment_link: >-
                        https://payments.ca.cryptoprocessing.com/payment/Zm2Xc5Bv8Nl1Kj4Hg7Fd3S
                      foreign_id: payment_request_123
                      url_store: https://example.com/store
                      url_success: https://example.com/success
                      url_failed: https://example.com/failed
                      end_user_reference: user_12345
                      payment_details:
                        address:
                          value: '0x7D2e9a4C1B6f3e8d5C0A2f7B9E4D1a6c3b8F5e2d'
                        expected_amount: '101.79'
                        expected_currency:
                          iso: USDC
                          network_name: ethereum
                        exchange_rate:
                          from:
                            iso: USDC
                            network_name: ethereum
                          to:
                            iso: USD
                          rate: '1.00'
                        fee:
                          amount: '1.5'
                          currency:
                            iso: USD
                "Request 100\_USD paid in XRP, with a destination tag":
                  value:
                    data:
                      id: 019d511d-9a3e-7d52-a6c1-4e8f0b2d7c95
                      amount: '100'
                      currency:
                        iso: USD
                      user_fee_percent: 0
                      status: processing
                      rate_mode: fixed
                      life_time: 1775542323
                      valid_until: 1775542323
                      payment_currency:
                        iso: XRP
                        network_name: ripple
                      end_user_email: chris.customer@example.com
                      description: Order 0511
                      payment_link: >-
                        https://payments.ca.cryptoprocessing.com/payment/Xr7Tg2Mq9Wd4Lp1Bn6Kc3V
                      foreign_id: payment_request_123
                      url_store: https://example.com/store
                      url_success: https://example.com/success
                      url_failed: https://example.com/failed
                      end_user_reference: user_12345
                      payment_details:
                        address:
                          value: rsF9GFU6Z92u4H9H7Rw3qbhvMZ7FxDjwrG
                          tag: '67890'
                        expected_amount: '66.666667'
                        expected_currency:
                          iso: XRP
                          network_name: ripple
                        exchange_rate:
                          from:
                            iso: XRP
                            network_name: ripple
                          to:
                            iso: USD
                          rate: '1.50'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                title: ErrorResponse
                required:
                  - error
                  - code
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                  code:
                    type: integer
                    description: HTTP status code.
              examples:
                Foreign ID already used:
                  value:
                    error: Payment request with this foreign_id already exists.
                    code: 400
                Fee percentage not 0 or 100:
                  value:
                    error: userFeePercent must be 0 or 100.
                    code: 400
                Amount not a number:
                  value:
                    error: Amount is incorrect.
                    code: 400
                Field with the wrong type:
                  value:
                    error: Invalid request format.
                    code: 400
                Malformed JSON:
                  value:
                    error: Bad content format
                    code: bad_content_format
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                  code:
                    type: string
                    description: Error code.
                description: >-
                  Invalid or missing headers, or the API key does not have
                  access to the endpoint. Refer to
                  [Errors](/api-reference/errors#general-errors) for
                  troubleshooting steps.
              examples:
                Bad signature header:
                  value:
                    error: Bad signature header
                    code: bad_header_signature
                API key does not have the required ability:
                  value:
                    error: The API key does not have access to this endpoint.
                    code: api_key_ability_required
                No signature header:
                  value:
                    error: No signature header
                    code: required_header_signature
                No key header:
                  value:
                    error: No key header
                    code: required_header_key
                Merchant disabled:
                  value:
                    error: Merchant is disabled.
                    code: 403
        '404':
          description: Invalid currency
          content:
            application/json:
              schema:
                type: object
                title: ErrorResponse
                required:
                  - error
                  - code
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                  code:
                    type: integer
                    description: HTTP status code.
              examples:
                Currency not available for payment requests:
                  value:
                    error: Currency is incorrect.
                    code: 404
        '422':
          description: Failed validation
          content:
            application/json:
              schema:
                type: object
                title: ErrorResponse
                required:
                  - error
                  - code
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                  code:
                    type: integer
                    description: HTTP status code.
              examples:
                Missing currency:
                  value:
                    error: The currency field is mandatory.
                    code: 422
                Empty currency code:
                  value:
                    error: Currency is a mandatory field.
                    code: 422
                Currency doesn't exist:
                  value:
                    error: Currency is incorrect.
                    code: 422
                Currency not available for payment requests:
                  value:
                    error: The currency.iso is not available for the payment request.
                    code: 422
                Missing currency code:
                  value:
                    error: The iso is a mandatory field.
                    code: 422
                Currency disabled:
                  value:
                    error: The currency.iso is disabled.
                    code: 422
                Missing network for a cryptocurrency:
                  value:
                    error: >-
                      The currency.network_name field is required for crypto
                      currencies.
                    code: 422
                Currency not available on this network:
                  value:
                    error: The combination of currency and network is not supported.
                    code: 422
                Missing amount:
                  value:
                    error: The amount field is mandatory.
                    code: 422
                Amount null, zero or negative:
                  value:
                    error: Amount is a mandatory field it must be positive.
                    code: 422
                Amount below the minimum:
                  value:
                    error: The minimum amount is <amount> <currency>.
                    code: 422
                Amount above the maximum:
                  value:
                    error: The maximum amount is <amount> <currency>.
                    code: 422
                Amount with too many decimals:
                  value:
                    error: >-
                      The amount for <currency> cannot have more than <decimals>
                      decimal places.
                    code: 422
                Missing lifespan:
                  value:
                    error: >-
                      It is obligatory - to fill in life_time_date_time or
                      life_time_duration.
                    code: 422
                Both lifespan fields sent:
                  value:
                    error: >-
                      Only one of fields life_time_date_time and
                      life_time_duration should be field.
                    code: 422
                Lifespan too short:
                  value:
                    error: The lifespan must be longer than or equal to 5 minutes.
                    code: 422
                Lifespan too long:
                  value:
                    error: The lifespan must be shorter than or equal to 60 days.
                    code: 422
                Email address not valid:
                  value:
                    error: The email address is incorrect.
                    code: 422
                Empty payment currency:
                  value:
                    error: payment_currency must not be empty if provided.
                    code: 422
                Payment currency is a fiat currency:
                  value:
                    error: payment_currency.iso must be a cryptocurrency.
                    code: 422
                Empty payment currency code:
                  value:
                    error: payment_currency.iso must not be empty if provided.
                    code: 422
                Payment currency doesn't exist:
                  value:
                    error: payment_currency.iso is incorrect.
                    code: 422
                Payment currency disabled:
                  value:
                    error: payment_currency.iso is disabled.
                    code: 422
                No exchange rate between the currencies:
                  value:
                    error: >-
                      Exchange rate is not available between <currency> and
                      <payment_currency>.
                    code: 422
                Empty payment currency network:
                  value:
                    error: >-
                      payment_currency.network_name must not be empty if
                      provided.
                    code: 422
                Payment currency not available on this network:
                  value:
                    error: The combination of currency and network is not supported.
                    code: 422
                "Description longer than\_255\_characters":
                  value:
                    error: The description must be 255 characters or less.
                    code: 422
                Empty description:
                  value:
                    error: The description must not be empty if provided.
                    code: 422
                "Foreign ID longer than\_255\_characters":
                  value:
                    error: Foreign ID must be 255 characters or less.
                    code: 422
                Empty foreign ID:
                  value:
                    error: The foreign_id must not be empty if provided.
                    code: 422
                Store URL not valid:
                  value:
                    error: The url store is invalid.
                    code: 422
                "Store URL longer than\_255\_characters":
                  value:
                    error: The url store must be 255 characters or less.
                    code: 422
                Success URL not valid:
                  value:
                    error: The url success is invalid.
                    code: 422
                "Success URL longer than\_255\_characters":
                  value:
                    error: The url success must be 255 characters or less.
                    code: 422
                Failure URL not valid:
                  value:
                    error: The url failed is invalid.
                    code: 422
                "Failure URL longer than\_255\_characters":
                  value:
                    error: The url failed must be 255 characters or less.
                    code: 422
                Empty end-user reference:
                  value:
                    error: The end_user_reference must not be empty if provided.
                    code: 422
                "End-user reference longer than\_255\_characters":
                  value:
                    error: The end_user_reference must be 255 characters or less.
                    code: 422
                Rate mode not standard or fixed:
                  value:
                    error: The rate_mode must be either 'standard' or 'fixed'.
                    code: 422
                Fixed rate without a payment currency:
                  value:
                    error: >-
                      The payment_currency object is mandatory in fixed-rate
                      mode.
                    code: 422
                Payment currency without a code:
                  value:
                    error: The iso field is mandatory.
                    code: 422
                Fixed rate without a payment currency network:
                  value:
                    error: >-
                      The payment_currency.network_name is mandatory in
                      fixed-rate mode.
                    code: 422
                Fixed rate without an email address:
                  value:
                    error: The email is mandatory in fixed-rate mode.
                    code: 422
                Fixed rate without a sender type:
                  value:
                    error: The sender_type is mandatory field in fixed-rate mode.
                    code: 422
                Fixed rate without sender data:
                  value:
                    error: The sender_data is mandatory object in fixed-rate mode.
                    code: 422
                Missing sender type:
                  value:
                    error: The sender_type is a mandatory field.
                    code: 422
                Sender type not natural or legal:
                  value:
                    error: The sender_type must be either ‘natural’ or ‘legal’.
                    code: 422
                Missing sender data:
                  value:
                    error: The sender_data object is mandatory.
                    code: 422
                Sender data not an object:
                  value:
                    error: The sender_data must be a valid object.
                    code: 422
                Missing first name for a natural person:
                  value:
                    error: The first_name must be provided for sender_type = natural.
                    code: 422
                "First name longer than\_255\_characters":
                  value:
                    error: The first_name must be 255 characters or less.
                    code: 422
                Missing last name for a natural person:
                  value:
                    error: The last_name must be provided for sender_type = natural.
                    code: 422
                "Last name longer than\_255\_characters":
                  value:
                    error: The last_name must be 255 characters or less.
                    code: 422
                Date of birth not in YYYY-MM-DD format:
                  value:
                    error: The date_of_birth must be in YYYY-MM-DD format.
                    code: 422
                Missing legal name for a legal entity:
                  value:
                    error: The legal_name must be provided for sender_type = legal.
                    code: 422
                "Legal name longer than\_255\_characters":
                  value:
                    error: The legal_name must be 255 characters or less.
                    code: 422
                Missing country of registration for a legal entity:
                  value:
                    error: >-
                      The country_of_registration must be provided for
                      sender_type = legal.
                    code: 422
                "Country of registration not 3\_characters":
                  value:
                    error: >-
                      The country_of_registration must contain exactly 3
                      characters.
                    code: 422
                Country of registration not an ISO alpha-3 code:
                  value:
                    error: >-
                      The country_of_registration must be a valid ISO Alpha-3
                      code.
                    code: 422
components:
  parameters:
    XProcessingSignatureHeader:
      name: X-Processing-Signature
      in: header
      required: true
      description: >-
        Hex-encoded HMAC-SHA512 signature of the request body, [generated using
        your secret key](/api-reference/authentication).
      schema:
        type: string
  schemas:
    sender_type.deposits:
      type: string
      enum:
        - natural
        - legal
      description: >
        Type of the merchant's customer who sends the funds.


        Use `natural` if the sender is an individual person and `legal` if the
        sender is a legal entity. The selected type determines which fields must
        be included in `sender_data`.
    sender_data:
      description: >
        Must contain the details of the merchant's customer who sends the funds.
        Which fields are required depends on `sender_type`.
      oneOf:
        - title: Natural person
          type: object
          required:
            - first_name
            - last_name
          properties:
            first_name:
              type: string
              maxLength: 255
              description: The sender's first name.
            last_name:
              type: string
              maxLength: 255
              description: The sender's last name.
            date_of_birth:
              type: string
              description: >-
                The sender's date of birth, YYYY-MM-DD. Optional for a natural
                person.
        - title: Legal entity
          type: object
          required:
            - legal_name
            - country_of_registration
          properties:
            legal_name:
              type: string
              maxLength: 255
              description: The company's name.
            country_of_registration:
              type: string
              description: >-
                The company's country of registration (ISO alpha-3 format, three
                characters).
  securitySchemes:
    xProcessingKey:
      type: apiKey
      description: Your [API key](/merchant-administration/generate-and-activate-api-keys).
      in: header
      name: X-Processing-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.