Onerway
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

merchantNo
Merchant number assigned by Onerway. See Setup for how to obtain it.
Example:
paymentId
Condition: Provide this field as one query condition. At least one of paymentId, transactionId, originTransactionId, or startTime + endTime is required.
Payment intent ID, transmitted as a JSON string and used to retrieve associated transactions and refund records at the Payment level.
Example:
transactionId
Condition: Provide this field as one query condition. At least one of paymentId, transactionId, originTransactionId, or startTime + endTime is required.
Refund transaction number, transmitted as a JSON string and used to precisely query a single refund record.
Example:
originTransactionId
Condition: Provide this field as one query condition. At least one of paymentId, transactionId, originTransactionId, or startTime + endTime is required.
Original Onerway transaction ID associated with the refund, transmitted as a JSON string and used to query refund records by original transaction.
Example:
startTime
Condition: Required together with endTime when querying by time range. At least one of paymentId, transactionId, originTransactionId, or startTime + endTime is required.
Start of the query time range, filtered by transaction creation time, in yyyy-MM-dd HH:mm:ss format.
Example:
Constraints
Rule
The maximum range between startTime and endTime is 90 days.
endTime
Condition: Required together with startTime when querying by time range.
End of the query time range, in yyyy-MM-dd HH:mm:ss format.
Example:
Constraints
Consistency
endTime must be later than startTime.
Rule
The maximum range between startTime and endTime is 90 days.
current
Refund 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:
size
Page size. This endpoint returns up to 10 records per page and does not support custom page sizes.
Example:
sign
Request signature string. See Request signing for how to generate it.

Request example

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

respCode
20000 means the query request was processed successfully. It does not mean each refund record has succeeded. Other values are error codes. See Response codes.
respMsg
Human-readable message for the response code.
Business data object containing refund records and pagination information.

Response example

Example code is unavailable.

No error responses are documented for this endpoint.