B2C and B2B payouts · coming soon
M-PESA B2C and B2B payouts
Collecting is open to every paybill and till. Paying out is a separate Safaricom approval for each shortcode, so payouts in Mypayments are switched on per shortcode, only where that approval exists.
Payouts stay off on a shortcode until you confirm Safaricom has approved them and add the initiator credentials.
Prompt sent
STK Push to 07•• ••• 678 · KES 1,500 · INV-2041
Customer entered PIN
Safaricom callback received: claims success
Verified with Safaricom
STK Query: paid · receipt TL3A9K2XQ7 · amount matches
Webhook delivered
POST https://shop.example/payments · 200 OK · signed
X-MyPayments-Event: payment.settled
X-MyPayments-Signature: t=1796313600,v1=9f2c…e41a
{ "event": "payment.settled",
"transaction": { "reference": "INV-2041",
"amount": "1500.00", "status": "settled",
"verified": true, "provider_receipt": "TL3A9K2XQ7", … }
}
How b2c and b2b payouts works
Per shortcode, on purpose
B2C pays customers (refunds, disbursements); B2B pays other paybills and tills. Each is enabled separately, and every change is written to your activity log.
What is ready today
You can record which shortcodes are approved and store their initiator credentials, encrypted. The payout requests themselves are being built now.
Questions about b2c and b2b payouts
How do I get B2C approved?
Apply to Safaricom for the B2C product on your shortcode. They issue initiator credentials with the approval.