1.1 Refund Api
Description
- Refund Api
- Supports single sub-order refund (via
subOrderId) and batch sub-order refund (via subOrderRefundList) for merged-package payments
Request URL
Request Method
Request Parameters
| parameter name | is it mandatory | type of data | length | description |
| appId | mandatory | string | - | APPID |
| mchRefundOrderId | mandatory | string | 1-32 | Merchant refund order id (unique for customer) format: letter + num, 1-32 characters: CCP20220428011068111 |
| originalTransactionId | mandatory | string | 1-32 | original Transaction Id |
| subOrderId | conditional mandatory | string | 1-32 | WayBill Num. Single sub-order refund: pass this field only, mutually exclusive with subOrderRefundList |
| subOrderRefundList | conditional mandatory | string | - | Sub-order refund details, a JSON string (see subOrderRefundList params). Batch sub-order refund: pass this field only, mutually exclusive with subOrderId |
| refundAmount | mandatory | int | - | Total refund amount of this request (unit: cents, minimum 100 cents, PHP:500.10, should set 50010 cents). When refunding multiple orders, must equal the sum of all sub-order refund amounts in subOrderRefundList |
| refundReason | optional | string | 1-200 | Refund reason, shared by all sub-orders in this request. Sub-order level refund reason is not supported |
| refundCallbackUrl | mandatory | string | - | refund Callback Url |
| sign | mandatory | string | - | sign |
subOrderRefundList params
subOrderRefundList is a JSON string, e.g. "[{\"subOrderId\":\"JT123456789\",\"refundAmount\":10000},{\"subOrderId\":\"JT987654321\",\"refundAmount\":20000}]"
| parameter name | is it mandatory | type of data | length | description |
| subOrderId | mandatory | string | 1-32 | WayBill Num, format: letter + num, 1-32 characters |
| refundAmount | mandatory | int | - | Refund amount of the current sub-order (unit: cents, minimum 100 cents). Each sub-order only supports full refund: it must equal the sub-order original transaction amount |
Request example - single sub-order
Request example - batch sub-orders
Successful Response example
refundReturnTime: refund result return time, empty when the refund is still processing subOrderRefundList: returned in both single and batch mode. It only contains subOrderId and refundAmount, sub-order level refundStatus and refundReason are not returned