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

# Get Payment

> Retrieve a single payment by ID.



## OpenAPI

````yaml GET /v1/payments/{paymentId}
openapi: 3.0.3
info:
  title: Stablepay Money API
  description: >
    The Stablepay Money API enables wallet issuers to execute stablecoin-to-fiat

    payouts across Sub-Saharan Africa via M-Pesa, mobile money, and bank
    transfers.
  version: 0.5.0
  contact:
    name: Stablepay Engineering
    email: hello@stablepay.io
servers:
  - url: https://api.stablepay.ai
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Health
    description: Service liveness check.
  - name: FX
    description: Live FX rate conversion between USDC and local fiat currencies.
  - name: Payments
    description: Submit and track stablecoin-to-fiat payout requests.
  - name: Balances
    description: >-
      Live on-chain USDC and native token balances for the tenant's custody
      wallets.
  - name: Analytics
    description: >-
      Pre-aggregated payment analytics — volume, success rates, corridor
      breakdowns, and daily time series.
  - name: Customers
    description: |
      KYC API for DeFi wallets. Onboard and verify your end-users, then link
      their wallet addresses so verified identity travels with their on-chain
      activity.
  - name: Webhooks
    description: Register endpoints and manage outbound event delivery.
  - name: Admin
    description: >-
      Ops-only endpoints for tenant management and payment operations. Requires
      an admin-scoped API key.
paths:
  /v1/payments/{paymentId}:
    get:
      tags:
        - Payments
      summary: Get a payment
      description: Retrieve a single payment by ID.
      operationId: getPayment
      parameters:
        - name: paymentId
          in: path
          required: true
          schema:
            type: string
          description: The `pay_`-prefixed payment ID.
          example: pay_01HV8KZMRJPQR9S7T3XABCDEF
      responses:
        '200':
          description: Payment found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
              examples:
                succeeded:
                  summary: Succeeded money-out payment
                  value:
                    id: pay_01JXXXX
                    status: succeeded
                    direction: payout
                    paymentMethod: MOMO
                    sourceCurrency: USDC
                    amountStablecoin: '37.395'
                    fiatAmount: '24500'
                    destinationCurrency: XOF
                    providerRef: hc_abc123
                    reference: csh-abc123
                    errorCode: null
                    failureReason: null
                    createdAt: '2026-05-06T10:31:00.000Z'
                    updatedAt: '2026-05-06T10:31:45.000Z'
                failed:
                  summary: Failed payment
                  value:
                    id: pay_01JYYYY
                    status: failed
                    direction: payout
                    paymentMethod: MOMO
                    sourceCurrency: USDC
                    amountStablecoin: '10.000'
                    fiatAmount: '6500'
                    destinationCurrency: XOF
                    providerRef: hc_def456
                    reference: csh-def456
                    errorCode: insufficient_funds
                    failureReason: >-
                      Recipient account has insufficient funds to complete the
                      transaction.
                    createdAt: '2026-05-06T10:31:00.000Z'
                    updatedAt: '2026-05-06T10:32:10.000Z'
        '404':
          description: Payment not found or belongs to another tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PaymentResponse:
      type: object
      properties:
        id:
          type: string
          description: Prefixed ULID for this payment.
          example: pay_01HV8KZMRJPQR9S7T3XABCDEF
        status:
          $ref: '#/components/schemas/PaymentStatus'
        direction:
          $ref: '#/components/schemas/Direction'
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        sourceCurrency:
          $ref: '#/components/schemas/CurrencyIn'
        amountStablecoin:
          type: string
          description: Total stablecoin amount charged.
          example: '10.500'
        fiatAmount:
          type: string
          description: Fiat amount the recipient receives.
          example: '1350'
        destinationCurrency:
          $ref: '#/components/schemas/CurrencyOut'
        providerRef:
          type: string
          nullable: true
          description: Provider's transaction ID. Null until the provider accepts.
          example: CC4SOjQu8UUarKaOGZy9
        reference:
          type: string
          nullable: true
          description: >-
            Caller's own reference code (e.g. "csh-txn-20260506-001"). Stored as
            supplied in the payment request.
          example: csh-txn-20260506-001
        errorCode:
          type: string
          nullable: true
          description: >-
            Machine-readable failure code (e.g. `insufficient_funds` or
            `invalid_account`). Null unless `status` is `failed`.
          example: null
        failureReason:
          type: string
          nullable: true
          description: >-
            Human-readable description of why the payment failed. Null unless
            `status` is `failed`.
          example: null
        depositInstruction:
          allOf:
            - $ref: '#/components/schemas/DepositInstruction'
          nullable: true
          description: |
            Money-in only. Bank account the customer must transfer fiat into to
            complete a bank payin.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - status
        - direction
        - paymentMethod
        - sourceCurrency
        - amountStablecoin
        - fiatAmount
        - destinationCurrency
        - providerRef
        - reference
        - errorCode
        - failureReason
        - createdAt
        - updatedAt
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        code:
          type: string
          description: Machine-readable error code.
          example: validation_error
        message:
          type: string
          description: Human-readable error message.
          example: fiatAmount must be a positive number.
      required:
        - statusCode
        - message
    PaymentStatus:
      type: string
      description: |
        Current state of the payment in the state machine.
        `initiated` → `provider_accepted` → `succeeded` | `failed` | `refunded`
    Direction:
      type: string
      enum:
        - payin
        - payout
      description: |
        payout: issuer sends stablecoin → recipient receives fiat.
        payin: customer pays fiat → issuer receives stablecoin.
    PaymentMethod:
      type: string
      enum:
        - BANK
        - MOMO
        - PAYBILL
        - TILL
      description: The supported payment method used to deliver funds to the recipient.
    CurrencyIn:
      type: string
      enum:
        - USDC
        - USDT
      description: Stablecoin sent onchain for payment settlement.
    CurrencyOut:
      type: string
      enum:
        - CDF
        - GHS
        - KES
        - NGN
        - TZS
        - UGX
        - XAF
        - XOF
        - ZAR
        - ZMW
      description: Fiat currency received by the recipient.
    DepositInstruction:
      type: object
      description: |
        Bank details the customer must transfer fiat into to complete a bank
        money-in.
      properties:
        type:
          type: string
          enum:
            - fiat
          example: fiat
        bankName:
          type: string
          example: Access Bank
        bankCode:
          type: string
          nullable: true
          example: '000014'
        accountName:
          type: string
          example: Stablepay Defi
        accountNumber:
          type: string
          example: '0123456789'
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            After this time the deposit account expires and the payment must be
            re-initiated.
        reference:
          type: string
          nullable: true
          example: csh-txn-20260506-001
      required:
        - type
        - bankName
        - accountName
        - accountNumber
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Stablepay API key. Include as `Authorization: Bearer <key>`.

````