POST
Query refunds
Query refund records and use
paymentId to identify the associated Payment Intent. If no refund notification arrives, query this endpoint as a fallback; see the Refund result webhook and Refund request rejection webhook.Request
merchantNoMerchant number assigned by Onerway. See Setup for how to obtain it.
Example:
replace_with_merchant_nopaymentIdCondition: Provide this field as one query condition. At least one of
Payment intent ID, transmitted as a JSON string and used to retrieve associated transactions and refund records at the Payment level.paymentId, transactionId, originTransactionId, or startTime + endTime is required.Example:
2031908578000000000transactionIdCondition: Provide this field as one query condition. At least one of
Refund transaction number, transmitted as a JSON string and used to precisely query a single refund record.paymentId, transactionId, originTransactionId, or startTime + endTime is required.Example:
2022238879000000000originTransactionIdCondition: Provide this field as one query condition. At least one of
Original Onerway transaction ID associated with the refund, transmitted as a JSON string and used to query refund records by original transaction.paymentId, transactionId, originTransactionId, or startTime + endTime is required.Example:
1787743316000000000startTimeCondition: Required together with
Start of the query time range, filtered by transaction creation time, in endTime when querying by time range. At least one of paymentId, transactionId, originTransactionId, or startTime + endTime 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.
currentRefund query page number.
0 and 1 both mean the first page. When omitted, Onerway uses the first page. The response current value is always returned as a 1-based page number.Example:
1sizePage size. This endpoint returns up to
10 records per page and does not support custom page sizes.Example:
10signRequest signature string. See Request signing for how to generate it.
curl -X POST 'https://sandbox-acq.onerway.com/v1/txn/queryRefunds' \
-H 'Content-Type: application/json' \
--data-raw '{
"current": "1",
"merchantNo": "replace_with_merchant_no",
"paymentId": "2031908578000000000",
"sign": "{{SIGN}}",
"size": "10"
}'Response
respCode20000 means the query request was processed successfully. It does not mean each refund record has succeeded. Other values are error codes. See Response codes.respMsgHuman-readable message for the response code.
data{ content, current, ... }Business data object containing refund records and pagination information.
Response example
Example code is unavailable.
No error responses are documented for this endpoint.