Onerway
POST

Query transaction records

Use this endpoint to query card transaction records by transaction type, status, card ID, and time range.

Request

ApiKey
Issuing API key request header assigned by Onerway.
Example:
txnType
Omit this field to include all transaction types.
Allowed values
AUTHORIZATION
Authorization request that checks the card and reserves the transaction amount.
REVERSAL
Reversal that releases an amount reserved by a previous authorization.
CLEARING
Clearing record created when a card transaction is submitted for clearing.
Constraints
Range
20characters
txnStatus
Omit this field to include transactions in all statuses.
Allowed values
S
Succeeded. The transaction completed successfully.
F
Failed. The transaction did not complete successfully.
P
Processing. The transaction has not reached a final status.
Constraints
Range
20characters
cardId
Use the card ID returned by the Create card API. Omit this field to query transactions for all cards under the merchant account.
Example:
Constraints
Range
64characters
startTime
Start of the query time range, expressed as a Unix timestamp in seconds (UTC).
Example:
endTime
End of the query time range, expressed as a Unix timestamp in seconds (UTC).
Example:
pageNum
One-based page number to return.
Example:
Constraints
Range
1
pageSize
Number of transaction records to return per page.
Example:
Constraints
Range
1100

Request example

curl -X POST 'https://sandbox-issuer.onerway.com/api/v1/merchant/queryTxnList' \
  -H 'ApiKey: replace_with_issuing_api_key' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "cardId": "100001",
  "pageNum": 1,
  "pageSize": 10,
  "txnType": "AUTHORIZATION"
}'

Response

respCode
Business response code. 20000 means success.
respMsg
Response message.
Paginated transaction records.

Response example

{
  "respCode": "20000",
  "respMsg": "success",
  "data": {
    "totalRecords": 1,
    "pageSize": 10,
    "current": 1,
    "pageNum": 1,
    "totalPages": 1,
    "records": [
      {
        "txnType": "AUTHORIZATION",
        "txnStatus": "S",
        "txnOrderNo": "TXN20260101001",
        "originTxnOrderNo": null,
        "originTxnOrderNoForRefund": null,
        "cardId": "100001",
        "authTime": 1735689600000,
        "authorizationCode": "AUTH001",
        "authMessageDesc": "Approved",
        "transactionAmount": 50.123456,
        "transactionCurrency": "USD",
        "transactionTime": 1735689600000,
        "cardAmount": 50.123456,
        "cardCurrency": "USD",
        "settleAmount": 50.123456,
        "settleCurrency": "USD",
        "settleTime": 1735776000000,
        "transactionFee": 0.5,
        "transactionFeeCurrency": "USD",
        "crossBorderFee": null,
        "crossBorderFeeCurrency": null,
        "exchangeFee": null,
        "exchangeFeeCurrency": null,
        "merchantId": "example_merchant_id",
        "merchantName": "Example Merchant",
        "merchantCountry": "United States",
        "merchantCountryCode": "US",
        "merchantStateProvince": "WA",
        "merchantCity": "Seattle",
        "merchantPostalCode": "98101",
        "merchantMccCode": "5411"
      }
    ]
  }
}
No error responses are documented for this endpoint.