Transaction lookup
Look up a single transaction or pull batches by date range or cardholder MSISDN — for reconciliation, customer support, and reporting.
The transaction-lookup endpoints are for administrative read access — reconciliation, customer-support investigations, batch exports. They return a richer payload than the runtime getTransactionState API and accept date-range queries.
For runtime / wallet-side transaction queries, see Querying transactions instead.
Endpoints
| Method | Path | Purpose | Allowed callers |
|---|---|---|---|
| POST | /restful/transactions/{txRef} | Pull a single transaction by reference | Merchant, PSP |
| POST | /restful/transactionsByDate | Pull every transaction in a date range | Merchant, PSP |
| POST | /restful/transactionsByMsisdn | Pull every transaction for a cardholder MSISDN in a date range | Merchant, PSP |
A PSP sees transactions across all its merchants. A merchant sees only its own transactions. Acquirers don't have access to these endpoints — they have separate reporting in the Portal UI.
Look up a single transaction
Returns the full TransactionExportBean for one transaction.
Request:
curl -X POST https://qa.scantopay.io/portal/restful/transactions/81234 \
-u 'PSP_42:yourPspApiPassword'(The {txRef} is the transaction ID — a long, typically 5-7 digits in sandbox and larger in production.)
Response: a TransactionExportBean with the canonical export shape:
{
"dateCreated": "2026-05-14 11:42:25",
"transactionId": 81234,
"msisdn": "27832006283",
"txType": "PAYMENT",
"currencyCode": "ZAR",
"amount": 5.75,
"txState": "SUCCESS",
"bankStatus": "00",
"authCode": "A1B2C3",
"retrievalReferenceNumber": "282352",
"merchantId": 25,
"merchantName": "Acme Coffee Pty Ltd",
"subMerchantName": null,
"reference": "PAYAT0000039172",
"card": "****1234",
"appType": "AMT",
"serial": null,
"acquirerCode": "00",
"acquirerDescription": "Approved",
"cardSerial": "N/A",
"binLast4": "1234"
}Field reference (verified against TransactionExportBean.java):
| Field | Description |
|---|---|
dateCreated | Transaction date/time in SAST (CCYY-MM-DD HH:mm:ss) |
transactionId | Platform-issued transaction ID |
msisdn | Cardholder mobile number, international format |
txType | Transaction type (PAYMENT, REVERSAL, REFUND, etc.) |
currencyCode | ISO currency (e.g. ZAR) |
amount | Transaction amount |
txState | The platform's transaction state — see Transaction states |
bankStatus | ISO bank response code (e.g. 00 = approved) — see ISO response codes |
authCode | Acquirer-issued auth code, when present |
retrievalReferenceNumber | RRN used between platform and acquirer |
merchantId | Scan to Pay merchant ID |
merchantName | Merchant display name |
subMerchantName | Sub-merchant name if used |
reference | Your merchantReference from code-create time |
card | Masked PAN (e.g. ****1234) |
appType | Authentication method (AMT, SECURE_CODE, etc.) |
serial | Device serial if captured at purchase time |
acquirerCode | Raw acquirer status code |
acquirerDescription | Human-readable acquirer status |
cardSerial | Card serial number (default "N/A") |
binLast4 | Combined BIN + last-4 view of the card |
Look up transactions by date
Returns every transaction in your scope between two dates.
Request:
curl -X POST https://qa.scantopay.io/portal/restful/transactionsByDate \
-u 'PSP_42:yourPspApiPassword' \
-H 'Content-Type: application/json' \
-d '{
"dateFrom": "2026-05-01 00:00:00",
"dateTo": "2026-05-14 23:59:59"
}'Request fields:
| Field | Required | Description |
|---|---|---|
dateFrom | yes | Start of the range, format CCYY-MM-DD HH:mm:ss |
dateTo | yes | End of the range, same format |
Response: an array of TransactionExportBean — same shape as single lookup, one per transaction. Empty array if no transactions fall in the range.
Common errors:
| HTTP | Body | Cause |
|---|---|---|
400 | "Invalid 'dateFrom' Field" | dateFrom missing or empty |
400 | "Invalid 'dateTo' Field" | dateTo missing or empty |
401 | (empty) | Caller-prefix not allowed for this endpoint |
Look up transactions by MSISDN
Returns every transaction in your scope for a given cardholder MSISDN, within a date range.
Request:
curl -X POST https://qa.scantopay.io/portal/restful/transactionsByMsisdn \
-u 'PSP_42:yourPspApiPassword' \
-H 'Content-Type: application/json' \
-d '{
"msisdn": "27832006283",
"dateFrom": "2026-05-01 00:00:00",
"dateTo": "2026-05-14 23:59:59"
}'Request fields:
| Field | Required | Description |
|---|---|---|
msisdn | yes | International-format mobile number, e.g. 27832006283 |
dateFrom | yes | Start of the range, format CCYY-MM-DD HH:mm:ss |
dateTo | yes | End of the range, same format |
Response: an array of TransactionExportBean.
If the MSISDN doesn't match any cardholder on the platform, the response is200 OKwith an empty array — not a404. This avoids leaking whether an arbitrary MSISDN has ever transacted.
Common errors:
| HTTP | Body | Cause |
|---|---|---|
400 | "Invalid 'msisdn' Field" | msisdn missing or empty |
400 | "Invalid 'dateFrom' Field" | dateFrom missing or empty |
400 | "Invalid 'dateTo' Field" | dateTo missing or empty |
How this differs from the Remote API's transactionState
transactionStateThis page (/restful/transactions/*) | Remote API (getTransactionState) | |
|---|---|---|
| Audience | Operations, finance, reconciliation | Wallet UIs, live checkout flows |
| Auth | Portal credentials, ROLE_REMOTE | Merchant API password |
| Single tx | Yes | Yes |
| Date range | Yes | No (one tx at a time) |
| Lookup by MSISDN | Yes | No |
| Returns | Full export payload | Status-focused payload |
| Rate / volume | Built for batch / report-style usage | Built for low-latency individual lookups |
Use this page for offline reconciliation and reporting jobs. Use Querying transactions for runtime checks.
Picking a date range
A few practical notes:
- The platform timezone is SAST (UTC+2) for all date fields — supply your
dateFrom/dateToin SAST, not UTC. - There's no hard cap on the range you can query, but pulling more than a month at a time is slow and the response can be large. For monthly reports, prefer one call per day or per week.
- The boundaries are inclusive — a transaction at exactly
dateFromis included.
What's next
- Pull the certificate PDF for a transaction → Transaction certificates
- Look up state for a wallet UI (runtime) → Querying transactions
- Decode any state value → Transaction states
- Decode bank decline codes → ISO response codes
- Cross-cutting rules → Business rules
Updated about 23 hours ago
