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

# Create a payout

> Pays out funds from an acceptance account to a settlement account. The payout is processed
asynchronously: a `202` means the payout was accepted and the funds are held. Poll
`GET /settlements/payouts/{id}` until the status is `SUCCESS` or `FAILED`.




## OpenAPI

````yaml /openapi/account-settlement.json post /settlements/payouts
openapi: 3.1.0
info:
  title: lite - Account Settlement
  version: 1.0.0
servers:
  - url: https://api.lite.sa/v1
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Settlement Windows
    description: Manage settlement windows for merchant payout cycles
  - name: Transactions
    description: Query settlement transactions and their details
  - name: Settlement
    description: >-
      Register verified seller settlement accounts, view acceptance account
      balances, and pay out on demand from an acceptance account to a settlement
      account
paths:
  /settlements/payouts:
    servers:
      - url: https://api.lite.sa
        description: Production
    post:
      tags:
        - Settlement
      summary: Create a payout
      description: >
        Pays out funds from an acceptance account to a settlement account. The
        payout is processed

        asynchronously: a `202` means the payout was accepted and the funds are
        held. Poll

        `GET /settlements/payouts/{id}` until the status is `SUCCESS` or
        `FAILED`.
      operationId: lite.settlement.createPayout
      parameters:
        - $ref: '#/components/parameters/x-idempotency-key-required'
        - $ref: '#/components/parameters/x-correlation-id'
      requestBody:
        $ref: '#/components/requestBodies/CreatePayout'
      responses:
        '202':
          $ref: '#/components/responses/PayoutDetails'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/PayoutRejected'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    x-idempotency-key-required:
      name: x-idempotency-key
      in: header
      required: true
      description: >-
        Unique key for idempotent request processing. Retrying with the same key
        and body returns the original result; reusing a key with a different
        body returns 409.
      schema:
        type: string
        format: uuid
        example: baf6a8e2-0c89-46ef-9ca5-faa65b99bcd5
    x-correlation-id:
      name: x-correlation-id
      in: header
      required: false
      description: >-
        Unique identifier for request tracing. Generated by the client or server
        if not provided.
      schema:
        type: string
        format: uuid
        example: 550e8400-e29b-41d4-a716-446655440000
  requestBodies:
    CreatePayout:
      description: Payout details
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreatePayoutRequest'
  responses:
    PayoutDetails:
      description: Payout details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Payout'
    BadRequest:
      description: >
        The request was invalid or malformed.


        Returned when:

        - Request validation fails (missing required fields, invalid field
        formats)

        - Payment details do not match the session (amount, currency, order
        reference mismatch)

        - The operation is not allowed given the current resource state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: |
        Authentication failed — missing or invalid token.

        Returned when:
        - The JWT bearer token is missing, expired, or has an invalid signature
        - The API key is missing or invalid
        - The authenticated session token is invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >
        Request blocked by security policy.


        Returned when:

        - A security threat is detected (SQL injection, XSS, NoSQL injection,
        LDAP injection, path traversal)

        - Header injection or suspicious headers are detected

        - The request payload exceeds the maximum allowed size

        - Geo-region validation fails (user country does not match client
        region)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: |
        The requested resource was not found.

        Returned when:
        - The specified resource ID does not exist
        - The path does not match any known endpoint
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: |
        The request conflicts with the current state of the resource.

        Returned when:
        - A resource with the same unique key already exists
        - The operation cannot be performed due to a conflicting state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PayoutRejected:
      description: >
        The payout cannot be made in the current state.


        Error codes:

        - `INSUFFICIENT_AVAILABLE_BALANCE`: the amount is more than the
        acceptance account's available balance

        - `SETTLEMENT_ACCOUNT_INACTIVE`: the settlement account is deleted

        - `ACCEPTANCE_ACCOUNT_INACTIVE`: the acceptance account is inactive and
        cannot fund payouts

        - `CURRENCY_MISMATCH`: the payout currency does not match the acceptance
        or settlement account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: >
        An unexpected error occurred on the server.


        Returned when an unhandled exception or infrastructure failure prevents
        the request from being processed. Retry the request with exponential
        backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    CreatePayoutRequest:
      type: object
      description: >-
        Request to pay out funds from an acceptance account to a settlement
        account
      required:
        - acceptance_account_id
        - settlement_account_id
        - amount
        - currency
      properties:
        acceptance_account_id:
          type: string
          format: uuid
          description: >-
            Acceptance account to debit, from `GET
            /settlements/acceptance-accounts`
          example: 550e8400-e29b-41d4-a716-446655440000
        settlement_account_id:
          type: string
          format: uuid
          description: >-
            Settlement account to credit, from `POST
            /settlements/settlement-accounts`
          example: 4b0f6c1e-2d3a-4f5b-8c7d-9e0f1a2b3c4d
        amount:
          type: integer
          description: Payout amount in minor units
          minimum: 1
          example: 150000
        currency:
          type: string
          description: ISO 4217 currency code. Must match both accounts.
          enum:
            - SAR
          example: SAR
        reference:
          type: string
          description: Merchant's own reference for the payout, echoed back and filterable
          maxLength: 128
          example: tiktok-payout-5531
    Payout:
      type: object
      description: A payout from an acceptance account to a settlement account
      required:
        - id
        - status
        - acceptance_account_id
        - settlement_account_id
        - amount
        - fee
        - currency
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique payout identifier
          example: 9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d
        status:
          type: string
          description: Payout status
          oneOf:
            - title: Initiated
              const: INITIATED
              description: Payout accepted and funds held
            - title: In Progress
              const: IN_PROGRESS
              description: Transfer sent to the bank
            - title: Success
              const: SUCCESS
              description: Funds delivered to the settlement account
            - title: Failed
              const: FAILED
              description: Payout failed and the held funds were released
        acceptance_account_id:
          type: string
          format: uuid
          description: Acceptance account debited
          example: 550e8400-e29b-41d4-a716-446655440000
        settlement_account_id:
          type: string
          format: uuid
          description: Settlement account credited
          example: 4b0f6c1e-2d3a-4f5b-8c7d-9e0f1a2b3c4d
        amount:
          type: integer
          description: Payout amount in minor units
          minimum: 1
          example: 150000
        fee:
          type: integer
          description: Payout fee in minor units
          minimum: 0
          example: 250
        currency:
          type: string
          description: ISO 4217 currency code
          example: SAR
        reference:
          type:
            - string
            - 'null'
          description: Merchant's own reference for the payout
          example: tiktok-payout-5531
        failure_reason:
          type:
            - string
            - 'null'
          description: Reason the payout failed, set only when status is FAILED
          example: null
        created_at:
          type: string
          format: date-time
          description: Timestamp when the payout was created
          example: '2026-09-29T10:00:00.000Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp of the last status change
          example: '2026-09-29T10:00:00.000Z'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - timestamp
          properties:
            code:
              type: string
              description: Error code identifying the type of error
              example: PAYMENT_DETAILS_MISMATCH
            message:
              type: string
              description: Human-readable error description
              example: The request was invalid or malformed
            details:
              type: object
              description: Additional error details
            correlationId:
              type: string
              format: uuid
              description: Correlation ID for tracking the request
              example: 550e8400-e29b-41d4-a716-446655440000
            timestamp:
              type: string
              format: date-time
              description: Timestamp when the error occurred
              example: '2024-12-16T10:30:00.000Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for service-to-service or merchant authentication.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token obtained from user authentication. Passed as
        Authorization: Bearer <token>.

````