Allow users to apply for a refund for completed or paid orders, and wait for the administrator to review and process the refund application.
Precautions
- This interface uses the POST method and requires data to be submitted in application/ format
- Provide the order ID as the identifier for the refund application.
- Only logged-in users can call this interface
- An order must be in the "Completed" or "Paid" status to apply for a refund
- After applying for a refund, the order status will become "Refund in progress"
- Refund application requires administrator review and processing
Request address
{域名地址}/api/order/refund
Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/order/refund
Request syntax
POST {域名地址}/api/order/refund
Content-Type: application/json
Request header
This interface requires user login authentication, please refer toCommon Request Headers (Common Request Headers).
Request Parameters
| Field Name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Order ID |
Response Headers
This interface only involves public response headers. More information, please refer toCommon Request Headers (Common Request Headers).
Return parameters
| Field Name | Type | Description |
|---|---|---|
| code | integer | Error code |
| message | string | Error Description |
Example Usage
Request Example
POST /api/order/refund HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json
{
"order_id": "202211232209080046"
}
Response Example
{
"code": 0,
"msg": "退款申请已提交"
}
Error Code
| Error code | Description |
|---|---|
| 0 | OK |
| -1 | Error, the reason is indicated in msg |
| 1001 | Not logged in |
| 1002 | Unauthorized |
| 200 | API request OK |
| 4001 | Order does not exist |
| 4002 | Order status does not allow for refund application |
| 4003 | Order is in refund processing |
| 4004 | Order has exceeded the refund deadline |