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

# Create one or more payments

Create one or more payments with a `beneficiary_id` (mandatory only for trade-based payment and not needed for independent payments), `account_id` and with or without an existing `trade_id`. Payment processing can be made asynchronous by setting the `async` flag in the request body. Please note, payments can be submitted without a `trade_id` and they are referred to as independent payments. For these payments, there won’t be any currency conversion as the payment will be funded from the corresponding account’s balance. Therefore, these payments are not preceded by a conversion (quote and trade).


## OpenAPI

````yaml /openapi.json post /payments
openapi: 3.0.0
info:
  description: |
    Ebury API allows customers:
      to retrieve accounts, balances, beneficiaries, and transactions;
      to get buy/sell estimates and quotes, book trades and retrieve trade history;
      to allocate payments to a trade and beneficiary, and to submit payments in bulk;
      to download documents such as trade receipt, payment instruction and payment receipt;
      to manage the authorised persons on their account.
    The Metadata API allows applications to clarify some parts of the Ebury API
      that are impractical to express schematically.
  termsOfService: https://docs.ebury.io/#terms-of-use
  title: Ebury API
  version: '0.1'
servers:
  - url: https://{environment}.ebury.io
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox
security:
  - api_key: []
paths:
  /payments:
    post:
      tags:
        - Payments
      summary: Create one or more payments
      description: >-
        Create one or more payments with an existing trade_id, beneficiary ID
        and account ID. Payment processing can be made asynchronous by setting
        the async flag in the request body.
      parameters:
        - description: The ID of the client
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
        - description: VoP authorization ID to confirm not full-match payment
          in: query
          name: vop_authorization_id
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewPayment'
        description: Request Payload
        required: true
      responses:
        '201':
          description: Payment(s) created synchronously
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/NewPaymentItem'
                type: array
        '204':
          description: Payment(s) processing started (asynchronously)
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/NewPaymentItem'
                type: array
        '400':
          description: >-
            Formatting, parameter or schema validation error. See error message
            for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Access denied due to authentication failure
        '403':
          description: >-
            Could not complete action due to data constraints. Refer to error
            message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: >-
            Trade, beneficiary or account ID not found. See error message for
            further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '409':
          description: >-
            Payment instruction could not be completed due to issues with input
            data. See error message for further details. NB if multiple payments
            were sent all will fail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: VoP check failed, or provided `vop_authorization_id` is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '502':
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    NewPayment:
      description: A list of payments with known beneficiary/bank account IDs.
      properties:
        async:
          description: >-
            Create the payment(s) asynchronously. Payments are created
            synchronously by default.
          type: boolean
        is_pad:
          description: >-
            Whether to fund payments via Pre-Authorized Debit (direct debit).
            Only valid for CAD and AUD payments with available credit.
            Deprecated; set is_pad per payment instead. Not honoured on the SCA
            (2FA) path.
          deprecated: true
          type: boolean
          default: false
        payments:
          description: A list of payments
          items:
            properties:
              account_id:
                description: The ID of the beneficiary's bank account
                type: string
              amount:
                description: The payment amount
                format: float
                type: number
              beneficiary_id:
                description: The ID of the beneficiary
                type: string
              email_beneficiary:
                default: false
                description: Whether the beneficiary should receive and email on payment
                type: boolean
              payment_date:
                description: The date on which payment is required
                format: date
                type: string
              reference:
                description: Payment reference
                type: string
              is_pad:
                description: >-
                  Whether to fund this payment via Pre-Authorized Debit (direct
                  debit). Only valid for CAD and AUD payments with available
                  credit. Applies per payment; falls back to the request-level
                  is_pad when omitted.
                type: boolean
                default: false
            required:
              - beneficiary_id
              - account_id
              - amount
              - payment_date
              - reference
            type: object
          type: array
        trade_id:
          description: Unique identifier of the trade the payment is allocated to
          type: string
      type: object
    NewPaymentItem:
      properties:
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        payment_id:
          description: The payment identifier
          type: string
        payment_instruction:
          description: URI to download payment instruction
          format: uri
          type: string
        payment_receipt:
          description: URI to download payment receipt
          format: uri
          type: string
        reference:
          description: Payment reference
          type: string
        status:
          description: The current status of the payment
          enum:
            - Need more beneficiary information
            - Validating beneficiary information
            - Waiting for payment date
            - Payment complete
            - Executing Payment
            - Payment pending of authorization
            - Payment rejected
            - Payment cancelled
          type: string
        warning:
          description: >-
            A warning is only returned if the requested value date was not valid
            and the next available date has been returned.
          type: string
      type: object
    ErrorMessage:
      description: An error message.
      properties:
        code:
          type: string
          description: The code for the error.
        details:
          description: Error details
          type: string
        message:
          type: string
          description: A short description of the cause of the error.
      required:
        - code
        - message
        - details
      type: object
  securitySchemes:
    api_key:
      description: An API Key.
      in: header
      name: x-api-key
      type: apiKey

````