Phone numbers must include a three-digit country code, for example: 254700538015
Amounts do not support decimal points
Request
Body Params application/json
{
"mchOrderId": "string",
"amount": "string",
"firstname": "string",
"currency": "string",
"lastname": "string",
"productinfo": "string",
"email": "string",
"phone": "string",
"callbackUrl": "string",
"redirectUrl": "string",
"noPayPage": "string",
"paymentMethod": "string",
"paymentType": "MPESA",
"cardNumber": "string",
"docType": "MPESA"
}
Request Code Samples
curl --location --request POST 'gateway/base/biz' \
--header 'method: pay' \
--header 'signType: SHA512' \
--header 'serviceName: api.pay' \
--header 'mchId: 1416010331032883200' \
--header 'timestamp: 1631671670' \
--header 'sign: 32554324534545432543' \
--header 'Content-Type: application/json' \
--data-raw '{
"mchOrderId": "string",
"amount": "string",
"firstname": "string",
"currency": "string",
"lastname": "string",
"productinfo": "string",
"email": "string",
"phone": "string",
"callbackUrl": "string",
"redirectUrl": "string",
"noPayPage": "string",
"paymentMethod": "string",
"paymentType": "MPESA",
"cardNumber": "string",
"docType": "MPESA"
}'
Responses
application/json {
"resultCode": "54",
"errorCode": "15",
"errorMsg": null,
"data": [
{
"orderId": "58",
"checkoutUrl": "https://separate-typewriter.net/"
},
{
"orderId": "71",
"checkoutUrl": "https://moral-compromise.info/"
}
]
}
Modified at 2025-12-05 12:56:10