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

# Mobile money charge

> Send an M-PESA or Airtel Money payment prompt to a customer's phone.

Walkthrough: [M-PESA and Airtel Money guide](https://api.tandapay.io/guides/collections/mobile-money.md).


## OpenAPI

````yaml POST /api/b2b/fiat/deposit/momo
openapi: 3.1.0
info:
  title: Tanda API
  version: 1.0.0
  description: >-
    Collect and send KES payments in Kenya through M-PESA, Airtel Money and bank
    transfer.
servers:
  - url: https://api.tandapay.io
    description: Sandbox and production (your keys decide which)
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Account
  - name: Checkout
  - name: Collections
  - name: Payouts
  - name: Beneficiaries
  - name: Transactions
  - name: Reference data
  - name: Webhooks
paths:
  /api/b2b/fiat/deposit/momo:
    post:
      tags:
        - Collections
      summary: Mobile money charge
      description: >-
        Sends a payment prompt (STK push) to the customer's phone. The customer
        approves with their M-PESA or Airtel Money PIN.


        A `200` means the prompt was sent, not that the customer paid. The
        outcome arrives by webhook.
      operationId: mobile-money-charge
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: integer
                  description: Amount in KES.
                  example: 1500
                currency:
                  type: string
                  description: ISO 4217 currency code. Tanda supports `KES`.
                  enum:
                    - KES
                  example: KES
                phoneNumber:
                  type: string
                  description: >-
                    Kenyan mobile number in international format without the
                    `+`, e.g. `254712345678`.
                  example: '254712345678'
                externalReference:
                  type: string
                  description: >-
                    Your unique ID for this transaction. Must be unique per
                    attempt; reuse returns `409 DUPLICATE_EXTERNAL_REFERENCE`.
                  example: order_10045
                momoOperatorId:
                  type: string
                  description: >-
                    Network to charge. Optional for KES: if omitted, it's
                    resolved from the phone number.
                  enum:
                    - mpesa
                    - airtel
                externalAccountId:
                  type: string
                  description: >-
                    ID of a saved `deposit` beneficiary (see
                    [Beneficiaries](/guides/payouts/beneficiaries)).
              required:
                - amount
                - currency
                - phoneNumber
                - externalReference
            examples:
              mpesa:
                summary: M-PESA
                value:
                  amount: 1500
                  currency: KES
                  phoneNumber: '254712345678'
                  externalReference: order_10045
              airtel:
                summary: Airtel Money
                value:
                  amount: 1500
                  currency: KES
                  phoneNumber: '254733123456'
                  externalReference: order_10046
                  momoOperatorId: airtel
      responses:
        '200':
          description: Prompt sent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  transactionId:
                    type: string
              example:
                success: true
                message: Initiated request.
                transactionId: aB3dE5fG7hJ9kL1mN2pQ
        '401':
          description: Missing, invalid or expired bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Unauthorized
        '403':
          description: Mobile money collections aren't enabled on your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Method not enabled for this currency
                errorCode: METHOD_NOT_ENABLED
        '409':
          description: '`externalReference` already used.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Duplicate external reference
                errorCode: DUPLICATE_EXTERNAL_REFERENCE
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: Human-readable; may change.
        errorCode:
          type: string
          description: Stable code to branch on.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from Generate bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.