Kenyan Shilling (KES) Payouts
This guide explains how to integrate Mavapay’s payout functionality for sending money to Kenyan recipients through mobile money and M-Pesa payment modes.
Overview
The KES payout process involves the following steps:
- Choose the appropriate payment mode (mobile money or M-Pesa paybill/till)
- Create a quote with the required beneficiary details
- Pay the generated lightning invoice
- Receive webhook notifications for payment status
Note: KES pay-to-phone payouts support M-Pesa and Airtel Mobile Money. Pay to Bill and Pay to Till are processed through M-Pesa.
Prerequisites
Before you begin, ensure you have:
- Created a Mavapay account
- Obtained your API key
- Set up your webhook endpoint
- Verified your business account
Authentication
All API requests must include your API key in the header:
Important Notes:
- All amounts are in cents (1 KES = 100 cents)
- The minimum amount for KES payouts is $2
- Phone numbers must be in international format (e.g., +254…)
- Pay-to-phone quotes require a
network field: "mpesa" or "airtel"
- Account numbers for paybill payments can be text (usually business name or identifier)
- Pay to Bill and Pay to Till are processed through M-Pesa’s payment infrastructure
Payment Modes
KES payouts support the following modes:
1. Pay to Phone (Mobile Money)
Send money directly to a recipient’s M-Pesa or Airtel Mobile Money account. You must specify the target network in beneficiary.identifiers.network.
Starting July 12, 2026, the network field is required for all pay-to-phone KES quotes. Requests missing this field will return a validation error.
2. Pay to Bill (M-Pesa Paybill)
Pay to a business using their M-Pesa paybill number:
3. Pay to Account/Till (M-Pesa Till)
Pay to a business M-Pesa till number:
Understanding the Quote Response
Sample response:
Key fields:
usdToTargetCurrencyRate: Price of 1 USD in KES
exchangeRate: Price of 1 BTC in KES
amountInSourceCurrency: Total amount in SATS to be paid (including fees)
amountInTargetCurrency: Total amount in cents to be sent to recipient
transactionFeesInSourceCurrency: Fees in SATS
transactionFeesInTargetCurrency: Fees in cents
expiry: Invoice validity (5 minutes)
Webhook Events
You’ll receive two webhook events:
payment.received - When the lightning payment is received
payment.sent - When the money is sent to the recipient
payment.received Event
payment.sent Event
Checking Transaction Status
You can query transactions using the payment hash, orderId, or transaction ID:
Getting Price Rates
To get current KES rates:
Sample response:
Testing
Use our staging environment for testing:
Test details:
- Phone Number:
+254790000000
- Paybill Number:
4141031
- Account Number:
test_account
- Till Number:
000000
Note: All test environment invoices are signet invoices.
Support
If you need help with integration: