Callback URLs
The addresses Safaricom and the banks post payment notifications to. Registered URLs never change; the M-Pesa ones are public, the bank ones are issued privately.
Who needs this page
M-Pesa (Safaricom Daraja)
C2B confirmation
The ConfirmationURL registered for every church paybill. Safaricom posts TransID, TransAmount, BusinessShortCode, BillRefNumber, MSISDN (a SHA-256 hash of the payer's number) and the payer's names. MyChurch stores the claim, answers at once and verifies before crediting (Payment verification).
{
"TransactionType": "Pay Bill",
"TransID": "RKT4XYZ123",
"TransTime": "20261005101240",
"TransAmount": "1000.00",
"BusinessShortCode": "123456",
"BillRefNumber": "tithe",
"OrgAccountBalance": "",
"MSISDN": "2f1c...e9a4",
"FirstName": "JANE"
}C2B validation
The ValidationURL. MyChurch accepts every payment here and answers {"ResultCode": 0, "ResultDesc": "Accepted"}: a payment to an unknown account number is better reviewed than refused.
Payment prompt (STK) result
The CallBackURL sent with every payment prompt. Matched by CheckoutRequestID; answered {"ResultCode": 0, "ResultDesc": "Accepted"}.
Transaction Status
The ResultURL and QueueTimeOutURL of the verification queries MyChurch makes. Parameters are read by name, not by position.
Pull API
Used where Safaricom's Pull API is enabled for a paybill, to fetch statement lines missed by the confirmation URL. Each line is treated as a claim and verified the same way.
The same paths under /api/v2
Every M-Pesa path above except the Pull API also answers under /api/v2/. Existing registrations use /api/v1/ and stay there.
New registrations: /webhooks
Registrations made after the move to the new platform may use these paths instead. They are answered by the same code as the frozen paths.
Banks
Equity (payment prompt results and payment gateway notifications), KCB (payment prompt results and instant payment notifications) and Co-operative Bank post to callback URLs whose last path segment is a shared secret. Written out with that segment hidden, they look like:
and likewise equity-stk-callback, equity-callback-pgw, kcb-ipn and coop-callback. The full URLs are given to each bank by MyChurch support and are never published. A request with a wrong segment answers 404 and is not processed. NCBA posts to /api/v1/ncba/confirm.
Treat a callback URL like a password
Answering rules
- Callbacks are never rate limited.
- Every body is stored as received (passwords and security credentials redacted) before anything else happens.
- The answer is immediate and does not depend on whether the payment can be credited.