Skip to main content
POST
/
api
/
v1
/
mpesa
/
c2b
/
confirmation
M-Pesa C2B Confirmation Callback (Public)
curl --request POST \
  --url https://crypto.westminister.tech/api/v1/mpesa/c2b/confirmation \
  --header 'Content-Type: application/json' \
  --data '
{
  "TransactionType": "Pay Bill",
  "TransID": "<string>",
  "TransTime": "20260601120000",
  "TransAmount": "5000.00",
  "BusinessShortCode": "<string>",
  "BillRefNumber": "<string>",
  "InvoiceNumber": "<string>",
  "OrgAccountBalance": "<string>",
  "ThirdPartyTransID": "<string>",
  "MSISDN": "<string>",
  "FirstName": "<string>",
  "MiddleName": "<string>",
  "LastName": "<string>"
}
'
{
  "ResultCode": 0,
  "ResultDesc": "Success"
}

Body

application/json

Safaricom C2B validation/confirmation payload (Pay Bill / Buy Goods).

TransactionType
string
Example:

"Pay Bill"

TransID
string
TransTime
string
Example:

"20260601120000"

TransAmount
string
Example:

"5000.00"

BusinessShortCode
string
BillRefNumber
string

Must match merchant_c2b_accounts.account_reference

InvoiceNumber
string
OrgAccountBalance
string
ThirdPartyTransID
string
MSISDN
string
FirstName
string
MiddleName
string
LastName
string

Response

200 - application/json

Always acknowledge (Safaricom requirement)

ResultCode
integer
Example:

0

ResultDesc
string
Example:

"Success"