Provider Adapter Guide
Safaricom M-Pesa (Daraja) Callback Integration
Ingest M-Pesa STK Push callbacks, B2C transfers, and C2B validation/confirmation notifications from Safaricom Daraja.
Setup & Configuration
- Navigate to the Safaricom Developer Portal and access your App configurations.
- Copy your ParsePesa M-Pesa Callback URL from the dashboard under Providers.
- Configure the CallbackURL parameter in your STK Push request payload, or update your C2B Validation and Confirmation URLs via Safaricom register URL endpoints.
- Ensure Safaricom requests route to the ParsePesa gateway environment.
Verification Method:
Provider Default Security (IP allowlist verification against Safaricom APIs / certificate mapping).
Sample Inbound Webhook Payload
{
"Body": {
"stkCallback": {
"MerchantRequestID": "29115-34620561-1",
"CheckoutRequestID": "ws_CO_13062026113000000",
"ResultCode": 0,
"ResultDesc": "The service request is processed successfully.",
"CallbackMetadata": {
"Item": [
{ "Name": "Amount", "Value": 1500.00 },
{ "Name": "MpesaReceiptNumber", "Value": "RKA123XYZ" },
{ "Name": "TransactionDate", "Value": 20260613113000 },
{ "Name": "PhoneNumber", "Value": 254711223344 }
]
}
}
}
}Normalized Financial Event Payload
{
"id": "evt_RKA123XYZ",
"environment": "production",
"provider": "daraja",
"source": "daraja_stk",
"eventType": "money.received",
"eventName": "Money Received",
"status": "succeeded",
"amount": 1500.0,
"currency": "KES",
"merchantReference": "ws_CO_13062026113000000",
"providerReference": "RKA123XYZ",
"counterparty": {
"name": "M-Pesa Customer",
"phone": "254711223344"
},
"occurredAt": "2026-06-13T11:30:00Z"
}