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

# Create payout

> Send KES to a wallet, bank account, paybill or till.

Walkthrough: [Sending payouts](https://api.tandapay.io/guides/payouts/sending-payouts.md). Use the example selector on the right to see each destination.


## OpenAPI

````yaml POST /api/b2b/fiat/payout
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/payout:
    post:
      tags:
        - Payouts
      summary: Create payout
      description: >-
        Sends money from your KES wallet to an M-PESA or Airtel Money wallet, a
        Kenyan bank account, an M-PESA paybill or an M-PESA till. Send the
        recipient's details, or the `externalAccountId` of a saved beneficiary.


        A `200` means the payout was accepted for processing. The outcome
        arrives as a `payout_updated` webhook.
      operationId: create-payout
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    amount:
                      type: integer
                      description: Amount in KES.
                      example: 1000
                    currency:
                      type: string
                      description: ISO 4217 currency code. Tanda supports `KES`.
                      enum:
                        - KES
                      example: KES
                    country:
                      type: string
                      description: ISO 3166-1 alpha-2 country code. Tanda supports `KE`.
                      enum:
                        - KE
                      example: KE
                    destination:
                      type: string
                      description: Where the money goes.
                      enum:
                        - MoMo
                        - Bank Account
                        - Paybill
                        - Till
                      example: MoMo
                    externalReference:
                      type: string
                      description: >-
                        Your unique ID for this transaction. Must be unique per
                        attempt; reuse returns `409
                        DUPLICATE_EXTERNAL_REFERENCE`.
                      example: order_10045
                    payoutMethod:
                      type: object
                      properties:
                        accountName:
                          type: string
                          description: Recipient's name.
                          example: Grace Achieng
                        accountNumber:
                          type: string
                          description: >-
                            Phone number (MoMo), bank account number (Bank
                            Account), paybill account number (Paybill) or till
                            number (Till).
                          example: '254712345678'
                        code:
                          type: string
                          description: >-
                            Operator code for MoMo (`mpesa` or `airtel`), or the
                            bank code from [Get
                            banks](/api-reference/endpoint/get-banks) for Bank
                            Account.
                        businessNumber:
                          type: string
                          description: Paybill business number. Paybill only.
                      required:
                        - accountName
                        - accountNumber
                  required:
                    - amount
                    - currency
                    - country
                    - destination
                    - externalReference
                    - payoutMethod
                  title: Recipient details
                - type: object
                  properties:
                    amount:
                      type: integer
                      description: Amount in KES.
                      example: 1000
                    externalReference:
                      type: string
                      description: >-
                        Your unique ID for this transaction. Must be unique per
                        attempt; reuse returns `409
                        DUPLICATE_EXTERNAL_REFERENCE`.
                      example: order_10045
                    externalAccountId:
                      type: string
                      description: >-
                        ID of a saved payout beneficiary. Don't send `currency`,
                        `country`, `destination` or `payoutMethod` with it.
                  required:
                    - amount
                    - externalReference
                    - externalAccountId
                  title: Saved beneficiary
            examples:
              mpesa:
                summary: M-PESA wallet
                value:
                  amount: 1000
                  currency: KES
                  country: KE
                  destination: MoMo
                  externalReference: payout_5531
                  payoutMethod:
                    accountName: Grace Achieng
                    accountNumber: '254712345678'
                    code: mpesa
              airtel:
                summary: Airtel Money wallet
                value:
                  amount: 1000
                  currency: KES
                  country: KE
                  destination: MoMo
                  externalReference: payout_5532
                  payoutMethod:
                    accountName: Grace Achieng
                    accountNumber: '254733123456'
                    code: airtel
              bank:
                summary: Bank account
                value:
                  amount: 50000
                  currency: KES
                  country: KE
                  destination: Bank Account
                  externalReference: payout_5533
                  payoutMethod:
                    accountName: Kilimo Supplies Ltd
                    accountNumber: '01100123456700'
                    code: '1243'
              paybill:
                summary: M-PESA paybill
                value:
                  amount: 5000
                  currency: KES
                  country: KE
                  destination: Paybill
                  externalReference: payout_5534
                  payoutMethod:
                    accountName: Kenya Power
                    accountNumber: ACC-778812
                    businessNumber: '888880'
              till:
                summary: M-PESA till
                value:
                  amount: 2500
                  currency: KES
                  country: KE
                  destination: Till
                  externalReference: payout_5535
                  payoutMethod:
                    accountName: Mama Mboga Stores
                    accountNumber: '123456'
              saved:
                summary: Saved beneficiary
                value:
                  amount: 1000
                  externalReference: payout_5536
                  externalAccountId: ea_9Xk2LmPq
      responses:
        '200':
          description: Payout accepted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  transactionId:
                    type: string
              example:
                success: true
                message: Withdrawal Request Accepted for Processing.
                transactionId: pY7tR5eW3qA1sD9fG2hJ
        '401':
          description: Missing, invalid or expired bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Unauthorized
        '409':
          description: '`externalReference` already used.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Duplicate external reference
                errorCode: DUPLICATE_EXTERNAL_REFERENCE
        '422':
          description: Wallet balance too low.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: Insufficient funds
                errorCode: INSUFFICIENT_FUNDS
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.