> ## 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 status

> Retrieve the current status and details of a payment.



## OpenAPI

````yaml /openapi.json get /payment/status
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/status:
    get:
      tags:
        - Payment
      summary: Get status
      description: Retrieve the current status and details of a payment.
      operationId: getPaymentStatus
      parameters:
        - name: reference
          in: query
          required: false
          description: The unique transaction reference identifier
          schema:
            type: string
            format: uuid
          example: a3f9c2e1-7b4d-4a8e-9c62-1d8f4e6b2a90
        - name: address
          in: query
          required: false
          description: Payment deposit wallet address
          schema:
            type: string
          example: '0x8F3aC91d2B741E59f064E9053a4d2E8F1c0b6D93a'
      responses:
        '200':
          description: Successfully retrieved transaction status
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - status
                  - message
                  - timestamp
                  - data
                properties:
                  success:
                    type: boolean
                  status:
                    type: integer
                  message:
                    type: string
                  timestamp:
                    type: string
                    format: date-time
                  data:
                    allOf:
                      - $ref: '#/components/schemas/PaymentTransactionData'
                    nullable: true
              example:
                success: true
                status: 200
                message: Payment status fetched successfully
                timestamp: '2026-04-18T13:12:44.055Z'
                data:
                  status: COMPLETED
                  type: OFFRAMP
                  reference: 9fa5699e-bd99-442f-9185-7f51e606a39d
                  beneficiary: 69d8d8f1ad6205a9a0e89302
                  rate: 1381.842
                  source:
                    amount: 15.02
                    amount_usd: 15.02
                    network: BSC
                    currency: USDT
                  destination:
                    amount: 20755.26684
                    amount_usd: 15.02
                    network: FIAT
                    currency: NGN
                  deposit:
                    amount: 15.02
                    address: '0x0957cc85231324A7D98d0c7703dca5685eE44F8A'
                    asset: bsc:usdt
                    note:
                      - >-
                        Kindly send the exact amount to the wallet address to
                        complete the transaction.
                      - >-
                        This wallet address is for one-time use only and has a
                        30 minutes expiry window.
                  meta:
                    sender:
                      wallet_address: '0x8e9C6ea3C9928910572b73019D319C40Fc6045F1'
                    session_id: '184729305611082934715600428391'
                    hash: >-
                      0x4a2f8e9c1d7b5630fe2a894bc31d0567e8c924fa11de45b3290fc1821ead3f6b
                    explorer_url: >-
                      https://bscscan.com/tx/0x4a2f8e9c1d7b5630fe2a894bc31d0567e8c924fa11de45b3290fc1821ead3f6b
                  created_at: '2026-04-18T07:12:17.887Z'
                  updated_at: '2026-04-18T07:12:34.705Z'
        '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

````