OleqPay Docs
Oleq Payment Gateway API

Transaction Query

Check the status of a previously submitted transaction.

Checks the status of a previously submitted transaction by reference. Use this to poll for a result when a callback has not been received, or to reconcile transactions after the fact.

POST https://{host}/api/payment

Request fields

FieldTypeRequiredDescription
ActionstringrequiredMust be "QUERY"
TimestampnumberrequiredUnix epoch timestamp in milliseconds. e.g. 1779013110951
ReferencestringrequiredYour original transaction reference. e.g. "9E1MH6SIAVZH96KC7VQ4"
ApiKeystringrequiredYour API key for this short code
CountryCodestringrequiredISO 3166-1 alpha-2 country code. e.g. "KE"
OperatorstringoptionalMobile operator identifier. e.g. "AIRTEL"
ShortCodestringrequiredYour merchant short code. e.g. "123456"
BillRefNumberstringoptionalAccount/bill reference from the original transaction. e.g. "E2363G237237283122"
TelcoReferencestringoptionalTelco-issued transaction reference. e.g. "SWAAASSSSSDF"
TrxTypestringrequiredOriginal transaction type: "C2B", "B2C", or "B2B"

Example request

{
  "Action": "QUERY",
  "Timestamp": 1779013110951,
  "Reference": "9E1MH6SIAVZH96KC7VQ4",
  "ApiKey": "yflaqbc5k321",
  "CountryCode": "KE",
  "Operator": "AIRTEL",
  "ShortCode": "123456",
  "BillRefNumber": "E2363G237237283122",
  "TelcoReference": "SWAAASSSSSDF",
  "TrxType": "C2B"
}

Response — transaction found

{
  "status": "200",
  "transactionstatus": "SUCCESSFUL",
  "BusinessShortCode": "12345",
  "TransType": "C2B",
  "TelcoReference": "SWAAASSSSSDF",
  "TransTime": "200",
  "TransAmount": "200",
  "BillRefNumber": "E2363G237237283122",
  "message": "Request accepted successfully",
  "message2": "request completed successfully"
}
FieldTypeDescription
statusstring"0" or "200" = record found. Other values indicate lookup failure.
transactionstatusstringFinal status of the transaction (e.g. SUCCESSFUL, FAILED)
BusinessShortCodestringShort code that processed the original transaction
TransTypestringEchoes the queried transaction type
TelcoReferencestringTelco confirmation code for the transaction
TransTimestringTimestamp at which the transaction was processed
TransAmountstringConfirmed transaction amount
BillRefNumberstringAccount/bill reference associated with the transaction
messagestringGateway-level status message
message2stringAdditional operator-level status detail

Response — no record found

{
  "status": "203",
  "message": "No Records found"
}

Provide as many identifiers as available (Reference, BillRefNumber, TelcoReference) to improve lookup accuracy. A 203 status means no matching record was found — this may indicate the transaction is still pending. Wait and retry before concluding a failure.

On this page