Refund Query
The Refund Query API retrieves refund records and supports end-to-end reconciliation by linking refunds to the same payment intent through paymentId.
Field Relationship
paymentId: Payment intent primary key (onepaymentIdcan map to multipletransactionIdattempts).transactionId: Refund transaction ID (single refund transaction).originTransactionId: Original transaction ID linked to the refund.status: Status of the current refundtransactionId, still using TxnStatusEnum.
ID Transmission Rule
paymentId, transactionId, and originTransactionId are all business type Long, and must be transmitted as String in JSON.
API Request Parameters
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
merchantNo | String | 20 | Yes | Yes | Merchant number assigned by |
paymentId | String | / | No | Yes | Payment intent ID. Business type is |
transactionId | String | / | No | Yes | Refund transaction ID. Business type is |
originTransactionId | String | 20 | Conditional | Yes | Original transaction ID from Onerway for reference transactions. |
startTime | String | / | Conditional | Yes | Start time for the transaction query period filter. |
endTime | String | / | Conditional | Yes | End time for the transaction query period filter. |
current | String | / | No | Yes | Page number for refund queries. |
size | String | / | No | Yes | Page size. |
sign | String | / | Yes | No | Digital signature string for request verification and security. Please refer to Signature for signature generation method. |
Pagination Rules
current=0andcurrent=1both represent the first page.- Response
currentis always returned as1-basedpage number (1is the first page). sizedefault is10, max is100.
Response
| Name | Type | Description |
|---|---|---|
respCode | String | Response code from |
respMsg | String | Response message from |
data | Object | Response data. Refer to object data |
data
| Name | Type | Description |
|---|---|---|
content | List | Refund records list. |
└paymentId | String | Payment intent ID. Business type is |
└originTransactionId | String | Original transaction ID for the refund. Business type is |
└transactionId | String | Refund transaction ID. Business type is |
└status | String | Refund transaction status. See TxnStatusEnum. |
└reason | String | Refund failure reason (if any). |
└amount | String | Refund amount. |
└currency | String | Refund currency. See ISO 4217. |
└arn | String | Acquirer Reference Number. |
└createTime | String | Refund creation time. Format: |
current | String | Current page number in response (1-based). |
size | String | Page size. |
totalPages | String | Total pages. |
totalElements | String | Total records. |
API Example
{
"merchantNo": "10001",
"current": "1",
"size": "10",
"startTime": "2026-01-01 00:00:00",
"endTime": "2026-03-28 23:59:59",
"sign": "your_sign_value"
}2
3
4
5
6
7
8
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"content": [
{
"paymentId": "2031306986167336960",
"originTransactionId": "2031306986184114176",
"transactionId": "2032020307921207296",
"status": "S",
"reason": null,
"amount": "1.00",
"currency": "USD",
"arn": null,
"createTime": "2026-03-12 17:06:09"
}
],
"current": "1",
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Best Practices
- Use
paymentIdas the main reconciliation key across Payment Query, Refund Query, and Webhook. - Persist both
originTransactionIdandtransactionIdfor forward and reverse tracking. - Query with fixed time windows and pagination to avoid unbounded scans.