Oleq Payment Gateway API
C2B — STK Push
Prompt a customer to pay your short code from their phone.
Initiates an STK Push prompt to a customer's mobile number, requesting payment to your short code. The customer receives a PIN prompt on their phone to authorize the transaction.
POST https://{host}/api/paymentRequest fields
| Field | Type | Required | Description |
|---|---|---|---|
CountryCode | string | required | ISO 3166-1 alpha-2 country code. e.g. "ke" |
ApiKey | string | required | Your API key for this short code |
Action | string | required | Must be "C2B" |
Timestamp | string | required | Request timestamp. Format: yyyyMMddHHmmss, e.g. "20260305162936" |
Operator | string | optional | Mobile operator identifier. Leave empty to auto-detect. |
ShortCode | string | required | Your merchant short code. e.g. "12345" |
Mobile | string | required | Customer phone in international format. e.g. "254710111222" |
Account | string | required | Account or reference identifier. e.g. "zcepacaj2buc" |
Amount | string | required | Transaction amount (no decimals for whole amounts). e.g. "10" |
Description | string | required | Transaction description shown to the customer. e.g. "Funds deposit" |
Reciever | string | required | Receiver type identifier. Use "SHORTCODE" |
PartyB | string | required | Destination short code (typically same as ShortCode). e.g. "12345" |
CallbackUrl | string | required | HTTPS URL to receive the payment result callback. Must be publicly accessible. |
Reciever is spelled exactly as shown — use it as-is.
Example request
{
"CountryCode": "ke",
"ApiKey": "sjdsdksdsd",
"Action": "C2B",
"Timestamp": "20260305162936",
"Operator": "",
"ShortCode": "12345",
"Mobile": "254710111222",
"Account": "zcepacaj2buc",
"Amount": "10",
"Description": "Funds deposit",
"Reciever": "SHORTCODE",
"PartyB": "12345",
"CallbackUrl": "https://yourdomain.com/callbacks/c2b"
}Response
{
"status": "0",
"message": "Success. Request accepted for processing",
"checkoutRequestID": "ws_CO_05032026...",
"merchantRequestID": "29115-..."
}| Field | Type | Description |
|---|---|---|
status | string | "0" or "200" = accepted. Any other value indicates an error. |
message | string | Human-readable status description |
checkoutRequestID | string | Unique identifier for this checkout session. Use to match callbacks. |
merchantRequestID | string | Merchant-side request identifier for reconciliation |