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

# List Cash Payouts

> Retrieve a list of cash payments, can accept accountId, status

Fetches all cash payouts.


## OpenAPI

````yaml GET /ledger/cash-payments
openapi: 3.0.3
info:
  version: 3.0.2
  title: Onboard External API Gateway
  description: >-
    **Introduction**

    API Gateway for Onboard


    This specification describes API endpoints that are available to the public
    internet via the API gateway. The different endpoints require different
    authentication schemes, see documentation for what applies to the operation
    you want to access.


    **Errors**

    Uses conventional HTTP response codes to indicate success or failure. In

    general:
     
    - `2xx` status codes indicate success. Codes in the

    - `4xx` range

    indicate a client error (e.g. required parameters, failed request etc.).

    - `5xx` status codes indicate a server error occurred.
  contact:
    name: Nestcoin TechOps
    email: techops@nestcoin.com
  license:
    name: UNLICENSED
servers:
  - url: https://external.dev.onboardpay.co
    description: Gateway for external API on staging environment.
security: []
tags:
  - name: users-onboardapi
    description: Endpoints available to for merchants liquidity automation
  - name: users-users
    description: User related endpoints
  - name: users-partners
    description: Partner related endpoints
  - name: users-admin
    description: Back office related endpoints
  - name: users-user2fa
    description: User 2fa related endpoints
  - name: users-usernotifications
    description: User notifications related endpoints
  - name: users-merchantnetwork
    description: Merchant network endpoints
  - name: users-userauth
    description: Authentication endpoints
  - name: users-userservice
    description: Service endpoints
  - name: users-webhook
    description: webhook endpoints
  - name: users-config
    description: Configuration Endpoints
paths:
  /ledger/cash-payments:
    get:
      tags:
        - ledger-payments
      summary: Retrieve list of cash payments
      description: Retrieve a list of cash payments, can accept accountId, status
      operationId: getCashPayments
      parameters:
        - name: accountId
          in: query
          description: >-
            Filter by the account that was debited. Can be the main account ID
            or a sub-account ID.
          schema:
            type: string
            format: uuid
        - name: status
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/LedgerSvcpage'
        - $ref: '#/components/parameters/LedgerSvcsize'
      responses:
        '200':
          description: Cash payments list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CashPaymentTransactionList'
        '401':
          $ref: '#/components/responses/LedgerSvcUnauthorized'
      security:
        - HMACAuth: []
components:
  parameters:
    LedgerSvcpage:
      in: query
      name: page
      required: false
      description: Page parameter, starting from 1
      schema:
        type: integer
        minimum: 1
        default: 1
    LedgerSvcsize:
      in: query
      name: size
      required: false
      schema:
        type: integer
        maximum: 100
        minimum: 1
        default: 20
  schemas:
    CashPaymentTransactionList:
      allOf:
        - $ref: '#/components/schemas/Paging'
        - type: object
          properties:
            content:
              type: array
              items:
                $ref: '#/components/schemas/CashPaymentTransaction'
      x-source-svc: ledger
    Paging:
      description: Base object for paginated list
      type: object
      properties:
        name:
          type: string
          description: Descriptive name for the list
        size:
          minimum: 0
          type: integer
          format: int32
          description: Positive integer
        totalItems:
          minimum: 0
          type: integer
          format: int32
          description: Positive integer
        nextPage:
          minimum: 0
          type: integer
          format: int32
          description: Positive integer
        previousPage:
          minimum: 0
          type: integer
          format: int32
          description: Positive integer
      discriminator:
        propertyName: name
      x-common-model: Paging
    CashPaymentTransaction:
      type: object
      description: Details of a cash payment transaction.
      required:
        - id
        - reference
        - currency
        - status
        - payoutCurrency
        - amount
        - rate
        - payoutAmount
        - createdDate
        - recipient
      properties:
        id:
          type: string
          format: uuid
        reference:
          type: string
          description: Reference for the cash payment transaction at initiation.
        accountTransactionId:
          type: string
          description: Identifier of the transaction on the account.
        currency:
          type: string
          description: Currency in which the account was debited.
          example: USD
        status:
          $ref: '#/components/schemas/TransactionStatus'
        payoutCurrency:
          type: string
          description: Currency in which the beneficiary will be paid out.
          example: NGN
        amount:
          type: number
          description: Amount transferred.
          example: 100
        rate:
          type: number
          description: Exchange rate applied for this transfer.
          example: 1450.75
        payoutAmount:
          type: number
          description: Amount paid out to the beneficiary in payout currency.
          example: 145075
        providerReference:
          type: string
          description: Reference provided by the cash payment provider.
          example: PROV123456
        recipient:
          $ref: '#/components/schemas/BasicBeneficiaryInfo'
        createdDate:
          type: string
          format: date-time
      x-source-svc: ledger
    ErrorMessageDto:
      description: >-
        Default error object for services. This gives consistent error object
        that all services may use.
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code
          example: UNKNOWN_ERROR
        message:
          type: string
          description: Descriptive error message
          example: Request could not be completed due to an error
        data:
          type: object
          description: Additional data for this error message.
          additionalProperties: true
          properties: {}
      x-common-model: ErrorMessageDto
    TransactionStatus:
      type: string
      description: >
        Status of the transaction, indicating its current state in the
        processing lifecycle.

        - PENDING: The transaction has been created but not yet processed.

        - IN_PROGRESS: The transaction is currently being processed.

        - FAILED: The transaction processing has failed.

        - SUCCESS: The transaction has been successfully processed.
      enum:
        - PENDING
        - IN_PROGRESS
        - FAILED
        - SUCCESS
      x-source-svc: ledger
    BasicBeneficiaryInfo:
      type: object
      description: Basic information about a beneficiary as at the time of transaction.
      required:
        - id
        - accountName
        - beneficiaryType
        - accountIdentifier
        - paymentChannelId
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the beneficiary.
        accountName:
          type: string
          description: Name on the account
          example: John Doe
        beneficiaryType:
          type: string
          description: Type of beneficiary object.
          example: BeneficiaryLocalBankAccount
        bankName:
          type: string
          description: >
            Name of the receiving bank, for mobile money this would be the
            network, and for P2P wallet it will be the name of the account
            provider
          example: Great Bank LLC
        accountIdentifier:
          type: string
          description: >
            The account identifier at the bank. For mobile money, this is the
            phone number on account, for P2P wallet, this is the account ID

            Where routing number or sort code is present, this would be
            `{routingNumber}-{accountNumber}`
          example: '230101010'
        paymentChannelId:
          type: string
          description: >-
            Identifier of the payment channel used for this transaction, if
            available. This can be used to determine the exact payment method
            used for the transaction.
          example: BANK_TRANSFER_NIGERIA
        country:
          type: string
          description: Country where the payment method belongs if available
          example: IE
      x-source-svc: ledger
  responses:
    LedgerSvcUnauthorized:
      description: Client is not authorized to make request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessageDto'
          example:
            code: UNAUTHORIZED
            message: Either client security header is missing or it is not valid.
  securitySchemes:
    HMACAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: |-
        Requires authentication via API key and HMAC signature.
          * `x-api-key`: Your API key generated from your Onboard Business dashboard.
          * `x-timestamp`:  Unix epoch timestamp (seconds) used in signature, allowed skew is 30 seconds
          * `x-signature`: SHA256 HMAC HEX signature calculated over  `t={x-timestamp}&{requestBody}` using your API Secret.

````