curl --request POST \
--url https://example.com/callback \
--header 'Content-Type: application/json' \
--data '
{
"transaction_id": "121w",
"amount_collected": "4000",
"source_currency": "TZS",
"target_currency": "TZS",
"subscriber_msisdn": "2557777777",
"reference_number": "6cc545R",
"paybill_number": "2233",
"timestamp": "2024-09-05T10:00:00.000Z",
"mcc_network": 640,
"mnc_network": 4,
"network_name": "vodacomtz"
}
'{
"transaction_id": "121w",
"successful": "true"
}API Reference
Receive payment collection callback
Webhook your application must implement. When a subscriber initiates a mobile money payment, Bpay POSTs transaction details to your callback URL. Respond with successful true to accept or false to decline. Replace the server URL with your own HTTPS endpoint.
POST
/
callback
curl --request POST \
--url https://example.com/callback \
--header 'Content-Type: application/json' \
--data '
{
"transaction_id": "121w",
"amount_collected": "4000",
"source_currency": "TZS",
"target_currency": "TZS",
"subscriber_msisdn": "2557777777",
"reference_number": "6cc545R",
"paybill_number": "2233",
"timestamp": "2024-09-05T10:00:00.000Z",
"mcc_network": 640,
"mnc_network": 4,
"network_name": "vodacomtz"
}
'{
"transaction_id": "121w",
"successful": "true"
}Body
application/json
Response
200 - application/json
Acknowledge and accept or reject the payment
