After a succesfull Payment Initiation, The Server will dump the transaction status in realtime to your callback/webhook configured while initiating the payment programmatically or when configured at the dashboard.
Below are response dumps from our server to your callbacks.
Note Allways watch the value Of
"ResultCode": "1032"
and"ResultDesc": "Request cancelled by user"
as they represent important information about the transaction.
{warning} Subscriber Cancled Transaction. watch the
"ResultCode": "1032"
value.
{
"ResponseCode": "0",
"ResponseDescription": "The service request has been accepted successsfully",
"MerchantRequestID": "27379-162309945-1",
"CheckoutRequestID": "ws_CO_03122023123123361110156957",
"ResultCode": "1032",
"ResultDesc": "Request cancelled by user"
}
{success} Subscriber Completed Transaction. watch the
"ResultCode": "0"
value.
{
"Body": {
"stkCallback": {
"MerchantRequestID": "96657-188398728-1",
"CheckoutRequestID": "ws_CO_10122023133400273768130105",
"ResultCode": 0,
"ResultDesc": "The service request is processed successfully.",
"CallbackMetadata": {
"Item": [
{
"Name": "Amount",
"Value": 1
},
{
"Name": "MpesaReceiptNumber",
"Value": "RLA0R69NXM"
},
{
"Name": "Balance"
},
{
"Name": "TransactionDate",
"Value": 20231210133416
},
{
"Name": "PhoneNumber",
"Value": 254768130105
}
]
}
}
}
}