OleqPay Docs
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/payment

Request fields

FieldTypeRequiredDescription
CountryCodestringrequiredISO 3166-1 alpha-2 country code. e.g. "ke"
ApiKeystringrequiredYour API key for this short code
ActionstringrequiredMust be "C2B"
TimestampstringrequiredRequest timestamp. Format: yyyyMMddHHmmss, e.g. "20260305162936"
OperatorstringoptionalMobile operator identifier. Leave empty to auto-detect.
ShortCodestringrequiredYour merchant short code. e.g. "12345"
MobilestringrequiredCustomer phone in international format. e.g. "254710111222"
AccountstringrequiredAccount or reference identifier. e.g. "zcepacaj2buc"
AmountstringrequiredTransaction amount (no decimals for whole amounts). e.g. "10"
DescriptionstringrequiredTransaction description shown to the customer. e.g. "Funds deposit"
RecieverstringrequiredReceiver type identifier. Use "SHORTCODE"
PartyBstringrequiredDestination short code (typically same as ShortCode). e.g. "12345"
CallbackUrlstringrequiredHTTPS 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-..."
}
FieldTypeDescription
statusstring"0" or "200" = accepted. Any other value indicates an error.
messagestringHuman-readable status description
checkoutRequestIDstringUnique identifier for this checkout session. Use to match callbacks.
merchantRequestIDstringMerchant-side request identifier for reconciliation

On this page