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

# Get payments

> Returns paginated payments history.



## OpenAPI

````yaml /openapi.json get /payment/history
openapi: 3.0.3
info:
  title: Receive stablecoin. Get fiat in seconds.
  description: Stablecoin collection and settlement layer.
  version: 1.0.0
  contact:
    name: Switch Labs
    email: contact@onswitch.xyz
  license:
    name: Proprietary
  x-tagGroups:
    - name: Institution
      tags:
        - Institution
    - name: Miscellaneous
      tags:
        - Miscellaneous
    - name: History
      tags:
        - History
    - name: Payment
      tags:
        - Payment
    - name: Webhook
      tags:
        - Webhook
    - name: Offramp
      tags:
        - Offramp
    - name: Onramp
      tags:
        - Onramp
    - name: Swap
      tags:
        - Swap
    - name: Developer
      tags:
        - Developer
    - name: Wallet
      tags:
        - Wallet
    - name: Compliance
      tags:
        - Compliance
servers:
  - url: https://api.onswitch.xyz
    description: Production server
security: []
tags:
  - name: Institution
    description: Institution discovery and bank or payment-rail lookup
  - name: Miscellaneous
    description: Requirements, coverage, assets, confirmation, and transaction status
  - name: History
    description: Payment history and summaries for the partner's account
  - name: Payment
    description: Saved payment beneficiaries, payment confirmation, and status
  - name: Webhook
    description: Webhook delivery history and callback resend
  - name: Offramp
    description: Offramp transaction endpoints for converting stablecoins to local currency
  - name: Onramp
    description: Onramp transaction endpoints for converting local currency to stablecoins
  - name: Swap
    description: Swap endpoints for exchanging between different stablecoin assets
  - name: Developer
    description: Developer fee balance and withdrawal
  - name: Wallet
    description: >-
      Wallet endpoints for creating and managing chain abstracted stablecoin
      wallets
  - name: Compliance
    description: AML compliance screening for PEP, sanctions, and other regulatory reasons
paths:
  /payment/history:
    get:
      tags:
        - History
      summary: Get payments
      description: Returns paginated payments history.
      operationId: getPaymentHistory
      parameters:
        - name: type
          in: query
          required: false
          description: Filter by payment type
          schema:
            type: string
            enum:
              - OFFRAMP
              - ONRAMP
              - SWAP
              - WALLET
        - name: status
          in: query
          required: false
          description: Filter by payment status
          schema:
            type: string
            enum:
              - AWAITING_DEPOSIT
              - PROCESSING
              - COMPLETED
              - FAILED
        - name: search
          in: query
          required: false
          description: Filter by reference or keyword
          schema:
            type: string
            maxLength: 200
        - name: start_date
          in: query
          required: false
          description: Filter by start date e.g 2026-01-01
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          required: false
          description: Filter by end date e.g 2026-01-01
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          required: false
          description: Results page number. Default 1.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          description: Results per page. Default 10, maximum 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
      responses:
        '200':
          description: Payment history retrieved successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - message
                  - timestamp
                  - data
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  timestamp:
                    type: string
                    format: date-time
                  data:
                    type: object
                    required:
                      - data
                      - page
                      - limit
                      - total
                      - pages
                    properties:
                      data:
                        type: array
                        description: Payment records for the current page
                        items:
                          $ref: '#/components/schemas/PaymentTransactionData'
                      page:
                        type: integer
                        description: Results page number. Default 1.
                      limit:
                        type: integer
                        description: Results per page. Default 10, maximum 100.
                      total:
                        type: integer
                        description: Total matching payments (all pages)
                      pages:
                        type: integer
                        description: Total number of pages for the current limit
              example:
                success: true
                message: Payment history fetched successfully
                timestamp: '2026-04-18T14:22:08.631Z'
                data:
                  data:
                    - status: COMPLETED
                      type: OFFRAMP
                      reference: a3f9c2e1-7b4d-4a8e-9c62-1d8f4e6b2a90
                      beneficiary: 69d8d8f1ad6205a9a0e89302
                      rate: 1582.44
                      source:
                        amount: 250
                        amount_usd: 250
                        network: BASE
                        currency: USDC
                      destination:
                        amount: 395610
                        amount_usd: 250
                        network: FIAT
                        currency: NGN
                      deposit:
                        amount: 250
                        address: '0x42c9E1aF8d736B2D094e6590315Dc7a1F947c4B0e'
                        asset: base:usdc
                        note:
                          - Send exactly this amount to the address shown.
                          - This address expires in 30 minutes.
                      meta:
                        sender:
                          wallet_address: '0x8F3aC91d2B741E59f064E9053a4d2E8F1c0b6D93a'
                        session_id: '184729305611082934715600428391'
                        hash: >-
                          0x4a2f8e9c1d7b5630fe2a894bc31d0567e8c924fa11de45b3290fc1821ead3f6b
                        explorer_url: >-
                          https://basescan.org/tx/4a2f8e9c1d7b5630fe2a894bc31d0567e8c924fa11de45b3290fc1821ead3f6b
                      created_at: '2026-04-18T13:05:12.004Z'
                      updated_at: '2026-04-18T13:08:44.991Z'
                  page: 1
                  limit: 10
                  total: 142
                  pages: 15
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - ServiceKey: []
components:
  schemas:
    PaymentTransactionData:
      type: object
      required:
        - status
        - type
        - reference
        - beneficiary
        - rate
        - source
        - destination
        - deposit
        - meta
        - created_at
        - updated_at
      properties:
        status:
          type: string
          enum:
            - AWAITING_DEPOSIT
            - PROCESSING
            - COMPLETED
            - FAILED
        type:
          type: string
          enum:
            - OFFRAMP
            - ONRAMP
            - SWAP
            - WALLET
        reference:
          type: string
          format: uuid
        beneficiary:
          type: string
        rate:
          type: number
          nullable: true
        developer_fee:
          $ref: '#/components/schemas/PaymentDeveloperFee'
        source:
          $ref: '#/components/schemas/PaymentTransactionAmountDetail'
        destination:
          $ref: '#/components/schemas/PaymentTransactionAmountDetail'
        deposit:
          $ref: '#/components/schemas/PaymentTransactionDeposit'
        meta:
          $ref: '#/components/schemas/PaymentTransactionMeta'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaymentDeveloperFee:
      type: object
      required:
        - amount
        - amount_usd
        - currency
        - network
      properties:
        amount:
          type: number
        amount_usd:
          type: number
        currency:
          type: string
        network:
          type: string
        recipient:
          type: string
          nullable: true
    PaymentTransactionAmountDetail:
      type: object
      required:
        - amount
        - amount_usd
        - network
        - currency
      properties:
        amount:
          type: number
        amount_usd:
          type: number
        network:
          type: string
        currency:
          type: string
    PaymentTransactionDeposit:
      oneOf:
        - $ref: '#/components/schemas/PaymentTransactionDepositCrypto'
        - $ref: '#/components/schemas/PaymentTransactionDepositBank'
      description: Payment deposit details
    PaymentTransactionMeta:
      type: object
      description: Metadata may be an empty object until a payment session is available.
      additionalProperties: true
      properties:
        sender:
          type: object
          nullable: true
          additionalProperties: true
        session_id:
          type: string
          nullable: true
        hash:
          type: string
          nullable: true
        explorer_url:
          type: string
          nullable: true
          format: uri
    PaymentTransactionDepositCrypto:
      type: object
      required:
        - amount
        - address
        - asset
        - note
      properties:
        amount:
          type: number
        address:
          type: string
        asset:
          type: string
        note:
          type: array
          items:
            type: string
    PaymentTransactionDepositBank:
      type: object
      required:
        - amount
        - asset
        - note
        - account_number
        - account_name
        - bank_code
        - bank_name
        - expires_at
      properties:
        amount:
          type: number
        expires_at:
          type: string
          format: date-time
        account_number:
          type: string
        account_name:
          type: string
        bank_code:
          type: string
        bank_name:
          type: string
        asset:
          type: string
        note:
          type: array
          items:
            type: string
  responses:
    BadRequest:
      description: Bad request - Invalid input parameters or validation error
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - message
              - timestamp
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                description: Error message describing what went wrong
              timestamp:
                type: string
                format: date-time
              data:
                description: Additional error details
                nullable: true
          example:
            success: false
            message: amount must be greater than 0 for the selected corridor
            timestamp: '2026-04-18T14:22:08.631Z'
            data: null
  securitySchemes:
    ServiceKey:
      type: apiKey
      in: header
      name: x-service-key
      description: Service key for API authentication

````