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

# Create a payment initiation

> Create a payment initiation request. Yorlet supports two types of payment initiation: <code>type=inbound_payment</code> initiates a payment from an external bank account to a bank account in Yorlet, and <code>type=outbound_payment</code> initiates a payment from your bank account to an external bank account.



## OpenAPI

````yaml openapi-payments.json POST /v1/payment_initiations
openapi: 3.1.0
info:
  title: Yorlet Payments API
  description: APIs for managing transactions, payment initiations, and external accounts.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/payment_initiations:
    post:
      tags:
        - Payment Initiations
      summary: Create a payment initiation
      description: >-
        Create a payment initiation request. Yorlet supports two types of
        payment initiation: <code>type=inbound_payment</code> initiates a
        payment from an external bank account to a bank account in Yorlet, and
        <code>type=outbound_payment</code> initiates a payment from your bank
        account to an external bank account.
      operationId: payment_initiations_create
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    amount:
                      type: integer
                      exclusiveMinimum: 0
                      description: >-
                        The amount of the payment initiation in the smallest
                        currency unit.
                    currency:
                      type: string
                      enum:
                        - gbp
                        - sek
                      description: Three-letter ISO currency code, in lowercase.
                    metadata:
                      type:
                        - object
                        - 'null'
                      additionalProperties:
                        type: string
                      description: >-
                        Set of key-value pairs that you can attach to an object.
                        This can be useful for storing additional information
                        about the object in a structured format.
                    reference:
                      type: string
                      minLength: 1
                      maxLength: 18
                      pattern: ^[a-zA-Z0-9]*$
                      description: >-
                        A reference for the payment initiation. Alphanumeric, up
                        to 18 characters.
                    type:
                      type: string
                      enum:
                        - inbound_payment
                    inbound_payment:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - customer
                        customer:
                          type: string
                          description: The customer ID for this inbound payment
                      required:
                        - type
                        - customer
                  required:
                    - amount
                    - currency
                    - type
                    - inbound_payment
                - type: object
                  properties:
                    amount:
                      type: integer
                      exclusiveMinimum: 0
                      description: >-
                        The amount of the payment initiation in the smallest
                        currency unit.
                    currency:
                      type: string
                      enum:
                        - gbp
                        - sek
                      description: Three-letter ISO currency code, in lowercase.
                    metadata:
                      type:
                        - object
                        - 'null'
                      additionalProperties:
                        type: string
                      description: >-
                        Set of key-value pairs that you can attach to an object.
                        This can be useful for storing additional information
                        about the object in a structured format.
                    reference:
                      type: string
                      minLength: 1
                      maxLength: 18
                      pattern: ^[a-zA-Z0-9]*$
                      description: >-
                        A reference for the payment initiation. Alphanumeric, up
                        to 18 characters.
                    type:
                      type: string
                      enum:
                        - outbound_payment
                    outbound_payment:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - owner_payout
                        owner_payout:
                          type: string
                          description: The owner payout ID for this outbound payment
                      required:
                        - type
                        - owner_payout
                  required:
                    - amount
                    - currency
                    - type
                    - outbound_payment
      responses:
        '200':
          description: Returns the payment initiation object if the request succeeded.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the object.
                      created:
                        type: number
                        description: >-
                          Time at which the object was created. Measured in
                          seconds since the Unix epoch.
                      account:
                        type: string
                        description: >-
                          The account that the object belongs to. Only returned
                          if the request is made with a valid Yorlet-Context
                          header.
                      deleted:
                        type: boolean
                        default: false
                        description: Only returned if the object has been deleted.
                      object:
                        type: string
                        enum:
                          - payment_initiation
                      amount:
                        type: integer
                        exclusiveMinimum: 0
                        description: >-
                          The amount of the payment initiation in the smallest
                          currency unit.
                      currency:
                        type: string
                        enum:
                          - gbp
                          - sek
                        description: Three-letter ISO currency code, in lowercase.
                      metadata:
                        type:
                          - object
                          - 'null'
                        additionalProperties:
                          type: string
                        description: >-
                          Set of key-value pairs that you can attach to an
                          object. This can be useful for storing additional
                          information about the object in a structured format.
                      reference:
                        type:
                          - string
                          - 'null'
                        description: A reference for the payment initiation.
                      status:
                        type: string
                        description: The current status of the payment initiation.
                      type:
                        type: string
                        enum:
                          - inbound_payment
                      inbound_payment:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - customer
                              customer:
                                type: string
                                description: The customer ID for this inbound payment
                            required:
                              - type
                              - customer
                        description: The inbound payment details
                    required:
                      - id
                      - created
                      - object
                      - type
                      - inbound_payment
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the object.
                      created:
                        type: number
                        description: >-
                          Time at which the object was created. Measured in
                          seconds since the Unix epoch.
                      account:
                        type: string
                        description: >-
                          The account that the object belongs to. Only returned
                          if the request is made with a valid Yorlet-Context
                          header.
                      deleted:
                        type: boolean
                        default: false
                        description: Only returned if the object has been deleted.
                      object:
                        type: string
                        enum:
                          - payment_initiation
                      amount:
                        type: integer
                        exclusiveMinimum: 0
                        description: >-
                          The amount of the payment initiation in the smallest
                          currency unit.
                      currency:
                        type: string
                        enum:
                          - gbp
                          - sek
                        description: Three-letter ISO currency code, in lowercase.
                      metadata:
                        type:
                          - object
                          - 'null'
                        additionalProperties:
                          type: string
                        description: >-
                          Set of key-value pairs that you can attach to an
                          object. This can be useful for storing additional
                          information about the object in a structured format.
                      reference:
                        type:
                          - string
                          - 'null'
                        description: A reference for the payment initiation.
                      status:
                        type: string
                        description: The current status of the payment initiation.
                      type:
                        type: string
                        enum:
                          - outbound_payment
                      outbound_payment:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - owner_payout
                              owner_payout:
                                type: string
                                description: The owner payout ID for this outbound payment
                            required:
                              - type
                              - owner_payout
                        description: The outbound payment details
                    required:
                      - id
                      - created
                      - object
                      - type
                      - outbound_payment
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the object.
                      created:
                        type: number
                        description: >-
                          Time at which the object was created. Measured in
                          seconds since the Unix epoch.
                      account:
                        type: string
                        description: >-
                          The account that the object belongs to. Only returned
                          if the request is made with a valid Yorlet-Context
                          header.
                      deleted:
                        type: boolean
                        default: false
                        description: Only returned if the object has been deleted.
                      object:
                        type: string
                        enum:
                          - payment_initiation
                      amount:
                        type: integer
                        exclusiveMinimum: 0
                        description: >-
                          The amount of the payment initiation in the smallest
                          currency unit.
                      currency:
                        type: string
                        enum:
                          - gbp
                          - sek
                        description: Three-letter ISO currency code, in lowercase.
                      metadata:
                        type:
                          - object
                          - 'null'
                        additionalProperties:
                          type: string
                        description: >-
                          Set of key-value pairs that you can attach to an
                          object. This can be useful for storing additional
                          information about the object in a structured format.
                      reference:
                        type:
                          - string
                          - 'null'
                        description: A reference for the payment initiation.
                      status:
                        type: string
                        description: The current status of the payment initiation.
                      type:
                        type: string
                        enum:
                          - direct_transfer
                      direct_transfer:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - customer
                              customer:
                                type: string
                                description: The customer ID for this direct transfer
                            required:
                              - type
                              - customer
                        description: The direct transfer details
                      transaction:
                        type: string
                        description: Associated transaction ID
                    required:
                      - id
                      - created
                      - object
                      - type
                      - direct_transfer
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````