Apply for refundSignature required
After a payment is completed, Partner can call this API to initiate a refund request. WorldTrade currently only supports refunds for single transactions.
Note:
- Before applying for a refund, please call the queryTradeOrder API to obtain the paymentResultList.paymentOrderId parameter required for calling this API;
- If the refund request is successful, you will receive the refund within an estimated seven working days, depending on the processing time of the original payment method.
Structure
Messages consist of a header and body. The following sections focus on the body structure. For the header structure, see:
Request parameters
requestId String REQUIRED
The unique refund request ID specified by the Partner.
More information:
- This field is an API idempotency field.
- Maximum length: 64 characters
tradeId String REQUIRED
The unique trade ID assigned by WorldTrade.
More information:
- Maximum length: 64 characters
paymentOrderId String REQUIRED
The payment ID.
Call the queryTradeOrder API to obtain this parameter.
More information:
- Maximum length: 64 characters
refundAmount Amount REQUIRED
The refund amount.
WorldTrade currently only supports full refunds. This parameter should be set to the total order amount.
remark String
The refund remark.
More information:
- Maximum length: 256 characters
Response parameters
result Result REQUIRED
The result of the API call.
refundOrderId String REQUIRED
The refund order ID.
This parameter is returned on demand only when result.resultStatus = S
.
paymentOrderId String
The payment ID.
More information:
- Maximum length: 64 characters
Request
Response
Result processing logic
After calling the API, a response is returned. Possible values for result.resultStatus are:
result.resultCode: System-related result codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | |
PROCESS_FAIL | F | A general business failure occurred. Do Not retry. | Human intervention is usually needed. It is recommended that you contact our Technical Support Team to resolve the issue. |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
INVALID_SIGNATURE | F | The signature is invalid. | Make sure the request is properly signed with a valid signature. |
REPEAT_REQ_INCONSISTENT | F | Repeated requests are inconsistent. | Ensure all the fields in the requests are the same and try again. |
UNKNOWN_EXCEPTION | F | API failed due to unknown reason. | The service might be down, retry later. If the issue persists, contact our Technical Support Team. |
FILE_SIZE_EXCEED_LIMIT | F | The file size has exceeded the limit. | Limit the file size to the allowable range. |
CONTRACT_CHECK_FAIL | F | The contract check has failed. | Contact our Technical Support Team to check the status of your API contract. Make sure it is still valid and try again. |
result.resultCode: Business-related result codes
Code | Value | Message | Further action |
---|---|---|---|
SYSTEM_EXCEPTION | F | System exception. | Contact the WorldTrade customer service manager for help. |
ORDER_NOT_EXIST | F | The order does not exist. | Modify the tradeId parameter and try again |
REFUND_FAILED_DUE_TO_CHARGEBACK | F | The refund order failed because chargeback exists. | The order has a chargeback, and this refund request has failed. Please ensure the order's fund status is normal before retrying. |
REFUND_PERIOD_EXPIRED | F | This payment is no longer eligible for refunds as the refund period for this transaction has ended. | The order has exceeded the refund period and refunds are no longer supported. |
REFUND_FAILED_TRY_AGAIN_LATER | F | Refund failed, please try again later | This refund failed. Please try again later. |