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

MethodPathPurposeAllowed callers
POST/restful/transactions/{txRef}Pull a single transaction by referenceMerchant, PSP
POST/restful/transactionsByDatePull every transaction in a date rangeMerchant, PSP
POST/restful/transactionsByMsisdnPull every transaction for a cardholder MSISDN in a date rangeMerchant, 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):

FieldDescription
dateCreatedTransaction date/time in SAST (CCYY-MM-DD HH:mm:ss)
transactionIdPlatform-issued transaction ID
msisdnCardholder mobile number, international format
txTypeTransaction type (PAYMENT, REVERSAL, REFUND, etc.)
currencyCodeISO currency (e.g. ZAR)
amountTransaction amount
txStateThe platform's transaction state — see Transaction states
bankStatusISO bank response code (e.g. 00 = approved) — see ISO response codes
authCodeAcquirer-issued auth code, when present
retrievalReferenceNumberRRN used between platform and acquirer
merchantIdScan to Pay merchant ID
merchantNameMerchant display name
subMerchantNameSub-merchant name if used
referenceYour merchantReference from code-create time
cardMasked PAN (e.g. ****1234)
appTypeAuthentication method (AMT, SECURE_CODE, etc.)
serialDevice serial if captured at purchase time
acquirerCodeRaw acquirer status code
acquirerDescriptionHuman-readable acquirer status
cardSerialCard serial number (default "N/A")
binLast4Combined 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:

FieldRequiredDescription
dateFromyesStart of the range, format CCYY-MM-DD HH:mm:ss
dateToyesEnd 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:

HTTPBodyCause
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:

FieldRequiredDescription
msisdnyesInternational-format mobile number, e.g. 27832006283
dateFromyesStart of the range, format CCYY-MM-DD HH:mm:ss
dateToyesEnd of the range, same format

Response: an array of TransactionExportBean.

📘

If the MSISDN doesn't match any cardholder on the platform, the response is 200 OK with an empty array — not a 404. This avoids leaking whether an arbitrary MSISDN has ever transacted.

Common errors:

HTTPBodyCause
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

This page (/restful/transactions/*)Remote API (getTransactionState)
AudienceOperations, finance, reconciliationWallet UIs, live checkout flows
AuthPortal credentials, ROLE_REMOTEMerchant API password
Single txYesYes
Date rangeYesNo (one tx at a time)
Lookup by MSISDNYesNo
ReturnsFull export payloadStatus-focused payload
Rate / volumeBuilt for batch / report-style usageBuilt 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 / dateTo in 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 dateFrom is included.

What's next