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

# Validate Account

> Resolve payment details across bank accounts, mobile money, merchants, and QR codes.




## OpenAPI

````yaml POST /v1/account/validate
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/account/validate:
    post:
      tags:
        - Account
      summary: Validate a recipient account
      description: >
        Resolve payment details across bank accounts, mobile money, merchants,
        and QR codes.
      operationId: validateAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                accountNumber:
                  type: string
                  description: >
                    The bank account number, mobile money number, merchant
                    identifier, or payment QR code.
                  example: '+254712345678'
                country:
                  type: string
                  enum:
                    - GH
                    - KE
                    - NG
                    - TZ
                    - UG
                    - ZM
                    - CM
                    - CI
                    - SN
                    - BJ
                    - BF
                    - CD
                    - ZA
                  description: Merchant or recipient country code.
                paymentMethod:
                  type: string
                  enum:
                    - BANK
                    - MOMO
                    - PAYBILL
                    - TILL
                    - QR
                  description: >-
                    The supported payment method used to deliver funds to the
                    merchant or recipient.
                paymentCode:
                  type: string
                  description: >
                    Required when paymentMethod is BANK or PAYBILL (TZ).

                    Available BANK options: OPAY, PALMPAY, MONIEPOINT, or
                    BANKCODE.

                    Available PAYBILL (TZ) options: PAYBILLCODE.
                  example: OPAY
              required:
                - accountNumber
                - country
                - paymentMethod
            examples:
              kesMomo:
                summary: KES M-Pesa number
                value:
                  accountNumber: '+254712345678'
                  country: KE
                  paymentMethod: MOMO
              kesBank:
                summary: KES bank account
                value:
                  accountNumber: '1234567890'
                  country: KE
                  paymentMethod: BANK
                  paymentCode: '01'
              ngnBank:
                summary: NGN bank account
                value:
                  accountNumber: '0123456789'
                  country: NG
                  paymentMethod: BANK
                  paymentCode: OPAY
              ghsMomo:
                summary: GHS MoMo number (operator auto-detected)
                value:
                  accountNumber: '+233241234567'
                  country: GH
                  paymentMethod: MOMO
              xafMomo:
                summary: Cameroon MoMo number (operator detected from phone prefix)
                value:
                  accountNumber: '+237650123456'
                  country: CM
                  paymentMethod: MOMO
      responses:
        '200':
          description: Account resolved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateAccountResponse'
              examples:
                kesMomo:
                  summary: KES M-Pesa (full name resolution)
                  value:
                    accountName: Jane Doe
                    accountNumber: '+254712345678'
                    paymentCode: MPESA
                    country: KE
                    currency: KES
                    paymentMethod: MOMO
                    accountType: CONSUMER
                    resolveToken: null
                ghsMomo:
                  summary: GHS MoMo (operator detected, phone used as name)
                  value:
                    accountName: '+233243747787'
                    accountNumber: '+233243747787'
                    paymentCode: MTN
                    country: GH
                    currency: GHS
                    paymentMethod: MOMO
                    accountType: CONSUMER
                    resolveToken: null
                kesBank:
                  summary: KES bank account
                  value:
                    accountName: John Kamau
                    accountNumber: '1234567890'
                    paymentCode: '01'
                    country: KE
                    currency: KES
                    paymentMethod: BANK
                    accountType: CONSUMER
                    resolveToken: null
                xafMomo:
                  summary: Cameroon MoMo (operator detected from phone prefix)
                  value:
                    accountName: '+237650123456'
                    accountNumber: '+237650123456'
                    paymentCode: MTN
                    country: CM
                    currency: XAF
                    paymentMethod: MOMO
                    accountType: CONSUMER
                    resolveToken: null
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Validation error, unsupported currency/method combination, or
            account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ValidateAccountResponse:
      type: object
      properties:
        accountName:
          type: string
          description: >-
            Resolved account holder name for merchant or recipient. Returns the
            phone number for corridors that only support operator detection.
          example: Jane Doe
        accountNumber:
          type: string
          description: >
            The resolved bank account number, mobile money number, or merchant
            identifier.
          example: '+254712345678'
        paymentCode:
          type: string
          nullable: true
          description: >
            Carry this value forward directly as `paymentCode` on the payment
            endpoints.

            PAYBILL / TILL: No code applies for these methods.
          example: MPESA
        country:
          type: string
          description: Merchant or recipient country code as supplied in the request.
          example: KE
        currency:
          type: string
          description: >-
            Fiat currency derived from the country code. Use as sourceCurrency
            (payin) or destinationCurrency (payout) in subsequent calls.
          example: KES
        paymentMethod:
          type: string
          description: Payment method as supplied in the request.
          example: MOMO
        accountType:
          type: string
          enum:
            - CONSUMER
            - MERCHANT
          description: >-
            Resolves to CONSUMER for a personal account, or MERCHANT for a
            business account.
          example: CONSUMER
        resolveToken:
          type: string
          nullable: true
          description: Shortlived token for merchant validated.
          example: eyJhciOi......iJ9MzILBkpU
      required:
        - accountName
        - accountNumber
        - paymentCode
        - country
        - currency
        - paymentMethod
        - accountType
        - resolveToken
    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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Stablepay API key. Include as `Authorization: Bearer <key>`.

````