Paybill and till collections
C2B collections for paybills and tills
When customers pay your paybill or till from their own phone, the money still reaches your system. We register your validation and confirmation URLs with Safaricom and turn each payment into a verified, signed webhook.
Validation and confirmation URLs registered with Safaricom for you, in one click.
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 paybill and till collections works
Masked numbers resolved
Safaricom now masks payer numbers on C2B payments. We resolve the real number through a phone directory first and Safaricom's Transaction Status API second, so you still know who paid.
Account numbers you control
Reject payments to account numbers you never issued at validation time, so customers get their money back instantly instead of you refunding by hand.
Re-delivery is a no-op
Every payment is keyed on its M-PESA receipt. Safaricom sending the same confirmation twice never settles it twice or sends you two webhooks.
Questions about paybill and till collections
Can I keep my existing integration while I move?
Yes. Forward the callbacks you already receive to us and we take it from there.
Does this work with tills (Buy Goods)?
Yes, paybills and tills both register the same way.