POST
Query payments
Use this endpoint to retrieve transaction results at the Payment level, including multiple transaction attempts under the same
paymentId.Request
merchantNoMerchant number assigned by Onerway. See Setup for how to obtain it.
Example:
replace_with_merchant_nomerchantTxnIdsCondition: Provide this field as one query condition. At least one of
Comma-separated merchant transaction numbers used to query Payment records in batch.merchantTxnIds, transactionIds, startTime + endTime, or paymentId is required.Example:
TXN-2024-001,TXN-2024-002Constraints
- Range
10IDsA single request can include up to 10 comma-separated IDs.
transactionIdsCondition: Provide this field as one query condition. At least one of
Comma-separated Onerway transaction numbers used to query Payment records in batch.merchantTxnIds, transactionIds, startTime + endTime, or paymentId is required.Example:
1787743316310622208,1787743316310622209Constraints
- Range
10IDsA single request can include up to 10 comma-separated IDs.
paymentIdCondition: Provide this field as one query condition. At least one of
Payment intent ID, transmitted as a JSON string. Use it to retrieve associated transactions and refund records at the Payment level.merchantTxnIds, transactionIds, startTime + endTime, or paymentId is required.Example:
2031908578000000000txnTypesComma-separated transaction types used to filter associated transactions under the Payment. This endpoint supports
SALE and REFUND.Example:
SALE,REFUNDAllowed values
SALE- Payment transaction.
REFUND- Refund transaction.
Constraints
- Values
- This endpoint supports only the
SALEandREFUNDsubset of the sharedTxnTypeEnum.
startTimeCondition: Required together with
Start of the query time range, in endTime when querying by time range. At least one of merchantTxnIds, transactionIds, startTime + endTime, or paymentId is required.yyyy-MM-dd HH:mm:ss format.Example:
2024-02-28 15:05:34Constraints
- Rule
- The maximum range between
startTimeandendTimeis 90 days.
endTimeCondition: Required together with
End of the query time range, in startTime when querying by time range.yyyy-MM-dd HH:mm:ss format.Example:
2024-02-28 15:05:34Constraints
- Consistency
endTimemust be later thanstartTime.- Rule
- The maximum range between
startTimeandendTimeis 90 days.
currentPayment query page number.
0 and 1 both mean the first page; the response current value is always returned as a 1-based page number.Example:
1sizePage size. A single paginated query returns up to
10 records.Example:
10signRequest signature string. See Request signing for how to generate it.
curl -X POST 'https://sandbox-acq.onerway.com/v1/txn/queryPayments' \
-H 'Content-Type: application/json' \
--data-raw '{
"merchantNo": "replace_with_merchant_no",
"paymentId": "replace_with_payment_id",
"current": "0",
"size": "10",
"sign": "{{SIGN}}"
}'Response
respCode20000 means the query request was processed successfully. This is request acceptance, not the business result of each transaction. Other values are error codes. See Response codes.respMsgHuman-readable message for the response code.
data{ content, current, ... }Business data object containing the Payment record list and pagination information.
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"content": [
{
"paymentId": "replace_with_payment_id",
"paymentStatus": "S",
"lastTransactionId": "replace_with_transaction_id",
"lastPaymentAttempt": null,
"merchantTxnId": "example_merchant_transaction_id",
"merchantTxnOriginalId": null,
"txnTime": "2026-01-15 10:30:00",
"txnCompletionTime": "2026-01-15 10:30:30",
"productType": "CARD",
"subProductType": "DIRECT",
"cardType": "AE",
"orderAmount": "100.00",
"orderCurrency": "USD",
"txnAmount": "100.00",
"txnCurrency": "USD",
"arn": null,
"appId": "replace_with_app_id",
"website": "https://merchant.example.com",
"cardNumber": "370000******0002",
"holderName": "Example Cardholder",
"eci": null,
"email": "customer@example.com",
"channelRequestId": "replace_with_channel_request_id",
"paymentMethodDetails": {
"card": {
"checks": {
"addressCheck": "fail",
"postalCodeCheck": "fail",
"cardholderNameCheck": "fail",
"avsResultRawCode": "W",
"threeDSecureResult": null
},
"holderName": "Example Cardholder",
"year": "2029",
"month": "11",
"cardType": "AE",
"productCategory": null,
"issuer": "Example American Express Issuer",
"cardBinCountry": "US",
"authorizationCode": "replace_with_authorization_code",
"cardNumber": "370000******0002"
}
}
}
],
"current": "1",
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}No error responses are documented for this endpoint.