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

# Create Payin

> Submit a fiat-to-stablecoin payin.



## OpenAPI

````yaml POST /v1/payments/in
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/in:
    post:
      tags:
        - Payments
      summary: Submit a money-in payment
      description: Submit a fiat-to-stablecoin payin.
      operationId: submitMoneyin
      parameters:
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
          description: Client-generated UUID. Required to prevent duplicate payments.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - fiatAmount
                - sourceCurrency
                - destinationCurrency
                - blockchain
                - paymentMethod
                - reference
              properties:
                fiatAmount:
                  type: string
                  description: The payment amount in local currency.
                  example: '1000'
                sourceCurrency:
                  type: string
                  enum:
                    - GHS
                    - KES
                    - NGN
                    - TZS
                    - UGX
                    - ZMW
                    - ZAR
                    - XAF
                    - XOF
                    - CDF
                  description: Fiat currency sent onchain for payment settlement.
                destinationCurrency:
                  type: string
                  enum:
                    - USDC
                    - USDT
                  description: Stablecoin received by the recipient.
                blockchain:
                  type: string
                  enum:
                    - BSC
                    - SOLANA
                  description: Supported blockchains for onchain settlement.
                paymentMethod:
                  type: string
                  enum:
                    - MOMO
                    - BANK
                  description: >-
                    The supported payment method used to deliver funds to the
                    recipient.
                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'
                accountName:
                  type: string
                  description: >-
                    Recipient full name associated with the payment method.
                    Required when paymentMethod is MOMO; optional otherwise.
                  example: Jane Doe
                paymentCode:
                  $ref: '#/components/schemas/PaymentCode'
                  description: >
                    Required when paymentMethod is MOMO, OPAY.

                    Available MOMO options: MPESA, MTN, AIRTEL, TIGO, ZAMTEL,
                    HALOTEL, VODAFONE, VODACOM, ORANGE, MOOV, FREE.

                    Available BANK options: OPAY.
                reference:
                  type: string
                  description: Wallet issuer's unique reference.
                  example: csh-txn-20260506-001
                email:
                  type: string
                  format: email
                  description: >-
                    Customer's email address. Required when paymentMethod is
                    BANK; optional otherwise.
                  example: jane@example.com
                paymentIdentifier:
                  type: string
                  description: >-
                    A method-specific identifier required for processing the
                    payment. Examples include BVN (BANK) or other market
                    specific references.
                customerId:
                  type: string
                  description: >-
                    The customer this payment is for. Required when KYC is
                    enabled for your account.
                  example: cus_01KXG3R0X8DXTKB849FFFEPT7Y
            examples:
              kesMomo:
                summary: KES via M-Pesa
                value:
                  fiatAmount: '5000'
                  sourceCurrency: KES
                  destinationCurrency: USDC
                  blockchain: BSC
                  paymentMethod: MOMO
                  accountNumber: '+254712345678'
                  accountName: Jane Doe
                  paymentCode: MPESA
                  reference: order_abc123
              xafMomo:
                summary: XAF via Orange MoMo
                value:
                  fiatAmount: '300'
                  sourceCurrency: XAF
                  destinationCurrency: USDC
                  blockchain: SOLANA
                  paymentMethod: MOMO
                  accountNumber: '+237693329470'
                  accountName: tester
                  paymentCode: ORANGE
                  reference: order_xyz456
              ngnBankOpay:
                summary: NGN via OPAY deeplink
                value:
                  fiatAmount: '10000'
                  sourceCurrency: NGN
                  destinationCurrency: USDC
                  blockchain: BSC
                  paymentMethod: BANK
                  paymentCode: OPAY
                  email: jane@example.com
                  reference: order_ngn001
      responses:
        '202':
          description: >
            Payment accepted. The provider will collect fiat from the customer
            asynchronously.

            Listen for the `payment.succeeded` webhook for finality.
          content:
            application/json:
              schema:
                type: object
                properties:
                  paymentId:
                    type: string
                    description: Use this ID to track the payment status.
                    example: pay_01HV8KZMRJPQR9S7T3XABCDEF
                  status:
                    type: string
                    example: provider_accepted
                  providerRef:
                    type: string
                    nullable: true
                    description: Provider's internal transaction ID.
                  depositInstruction:
                    allOf:
                      - $ref: '#/components/schemas/DepositInstruction'
                    nullable: true
                    description: >
                      For bank payins that require the customer to transfer fiat
                      into a

                      provided account.
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - paymentId
                  - status
                  - createdAt
        '400':
          description: Validation error or missing idempotency-key header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >
            Unprocessable — blockchain/currency mismatch, unsupported corridor,
            or invalid field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 422
                code: validation_error
                message: KES requires blockchain=BSC (Honeycoin corridor)
components:
  schemas:
    PaymentCode:
      type: string
      description: >
        Mobile network operator or bank code. Required for money-out payments.

        MNO options: MPESA, MTN, AIRTEL, TIGO, ZAMTEL, HALOTEL, VODAFONE,
        VODACOM, ORANGE, MOOV, FREE.

        Bank options: OPAY, PALMPAY, MONIEPOINT.

        Use the List Supported Banks endpoint to look up the bankCode for
        recipient's bank.
    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
    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>`.

````