> ## 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 an account number or phone number to its registered name.




## 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 an account number or phone number to its registered name.
      operationId: validateAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                accountNumber:
                  type: string
                  description: >
                    The account number of the payment method.

                    Must be in E.164 format with the + prefix when paymentMethod
                    is MOMO.
                  example: '+254712345678'
                country:
                  type: string
                  enum:
                    - GH
                    - KE
                    - NG
                    - TZ
                    - UG
                    - ZM
                    - CM
                    - CI
                    - SN
                    - BJ
                    - BF
                    - CD
                    - ZA
                  description: Recipient country code.
                paymentMethod:
                  $ref: '#/components/schemas/PaymentMethod'
                paymentCode:
                  type: string
                  description: >
                    Required when paymentMethod is BANK. Use the List Supported
                    Banks endpoint to look up the paymentCode for recipient's
                    bank. 

                    Available BANK options: OPAY, BANKCODE.
                  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: '+254712345678'
                  country: KE
                  paymentMethod: BANK
                  paymentCode: '01'
              ngnBank:
                summary: NGN bank account
                value:
                  accountNumber: '+254712345678'
                  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
                ghsMomo:
                  summary: GHS MoMo (operator detected, phone used as name)
                  value:
                    accountName: '+233243747787'
                    accountNumber: '+233243747787'
                    paymentCode: MTN
                    country: GH
                    currency: GHS
                    paymentMethod: MOMO
                kesBank:
                  summary: KES bank account
                  value:
                    accountName: John Kamau
                    accountNumber: '+254712345678'
                    paymentCode: '01'
                    country: KE
                    currency: KES
                    paymentMethod: BANK
                xafMomo:
                  summary: Cameroon MoMo (operator detected from phone prefix)
                  value:
                    accountName: '+237650123456'
                    accountNumber: '+237650123456'
                    paymentCode: MTN
                    country: CM
                    currency: XAF
                    paymentMethod: MOMO
        '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:
    PaymentMethod:
      type: string
      enum:
        - BANK
        - MOMO
        - PAYBILL
        - TILL
      description: The supported payment method used to deliver funds to the recipient.
    ValidateAccountResponse:
      type: object
      properties:
        accountName:
          type: string
          description: >-
            Registered account holder name is resolved for Kenya (MPESA, PAYBILL
            & TILL) and Nigeria (BANK). Returns the phone number for corridors
            that only support operator detection.
          example: Jane Doe
        accountNumber:
          type: string
          description: >
            The account number of the payment method.

            Must be in E.164 format with the + prefix when paymentMethod is
            MOMO.
          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: 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
      required:
        - accountName
        - accountNumber
        - paymentCode
        - country
        - currency
        - paymentMethod
    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>`.

````