OleqPay Docs
Oleq Payment Gateway API

Error Handling

Common integration issues and how to resolve them.

IssueLikely causeResolution
Auth failureIncorrect AUTH-SQROOL headerEnsure Timestamp and ShortCode in the header match the request body exactly
Salt mismatchWrong field used for Reference in Salt computationFor B2C, use the Reference field (M-Pesa TransID), not your original reference
No callback receivedCallback URL unreachable or returning non-200Ensure CallbackUrl is a public HTTPS endpoint returning HTTP 200 immediately. Use QUERY to reconcile missed callbacks.
Timestamp rejectionClock drift or wrong formatC2B/B2C use a yyyyMMddHHmmss string; B2B/QUERY use Unix epoch milliseconds. Sync server time with NTP.
QUERY returns 203Transaction pending or wrong referenceWait and retry. Verify Reference, BillRefNumber, and TelcoReference match the original submission exactly.

Best practice: store the checkoutRequestID (C2B) or ConversationID (B2C) from the initial response. Use QUERY as a fallback reconciliation mechanism when callbacks are delayed or missed. Handle all responses idempotently.