For transactions without callbacks or just for the sake of validation, you can use this transaction query status to get the results of an ongoing transaction or a completed one.
Triggering stk push requires you to have the following:
Method | Endpoint |
---|---|
POST | http://ecvps.net/api/v1/query |
parameter | TYPE | Description |
---|---|---|
ApiKey | string | Api Key used to authenticate your app(s) requests |
LinkId | string | Unique Link Id to identify the payments Settlment Link |
parameter | TYPE | Description |
---|---|---|
CheckoutRequestId | string | (required) Transaction's checkout request Id |
{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
}
]
}
}
}
}