Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pesahub.co/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Mobile Payout API lets you send funds directly to a recipient’s mobile money wallet. Use the preview endpoint first to see fee breakdowns, then call initiate to execute the transfer.

Preview Mobile Payout

Calculate fees and preview the payout before committing.
POST /v1/payouts/mobile/preview

Authentication

Authorization: Bearer {{api_key}}

Request Headers

HeaderValue
Acceptapplication/json
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
amountintegerAmount to send in the specified currency
currencystringCurrency code (e.g., TZS)
phone_numberstringRecipient’s phone number (e.g., 0682908805)
metadataobjectArbitrary key-value pairs for your reference
metadata.order_idstringYour internal order identifier
metadata.notestringA note about the payout

Example Request

curl -X POST https://pesahub.test/api/v1/payouts/mobile/preview \
  -H "Authorization: Bearer {{api_key}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1500,
    "currency": "TZS",
    "phone_number": "0682908805",
    "metadata": {
      "order_id": "order12345",
      "note": "someone wants money"
    }
  }'

Initiate Mobile Payout

Execute the mobile money transfer to the recipient.
POST /v1/payouts/mobile

Request Body

Same fields as the preview endpoint.
FieldTypeRequiredDescription
amountintegerAmount to send
currencystringCurrency code (e.g., TZS)
phone_numberstringRecipient’s phone number
metadataobjectArbitrary key-value pairs

Example Request

curl -X POST https://pesahub.test/api/v1/payouts/mobile \
  -H "Authorization: Bearer {{api_key}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000,
    "currency": "TZS",
    "phone_number": "0682908805",
    "metadata": {
      "order_id": "order12345",
      "note": "someone wants money"
    }
  }'
Always run a preview before initiating a payout to confirm fees and ensure the recipient details are correct.