Create order refund record
POST/openapi/2026-07/orders/:order_id/refund
Attaches a new refund record to the specified order, declaring how much to refund and on which payment channels. Returns the new refund record id and the associated after-sales (post-sale) record id.
Request
Path Parameters
Order ID
- application/json
- Body
- Example
Bodyrequired
- Array [
auto: auto-calculate refund quantity by typeshipped: refund only shipped itemswaiting_ship: refund only items not yet shipped- ]
- Array [
- ]
- Array [
- ]
refund objectrequired
Refund request body including amounts, line items, payment channels, and notes
Total refund amount. If refund_payments is specified, the total equals the sum of all refund_payments amounts
Total refund amount for shipping fees
Refund amount for the tip
Total refund amount for additional fees
Total refund amount for products
refund_line_items object[]
List of refund line items by product line item
ID of the order line item being refunded
Refund item type:
Refund quantity
Whether to restock the refunded items to inventory
refund_payments object[]
List of refund amounts per payment channel
ID of the payment channel to refund through
Refund amount on this payment channel
refund_additional_prices object[]
List of refund amounts per additional fee
Name of the additional fee being refunded
Refund amount for this additional fee
Refund note from the merchant
{
"refund": {
"refund_total": "string",
"refund_shipping_total": "string",
"refund_tip": "string",
"refund_additional_total": "string",
"refund_product_total": "string",
"refund_line_items": [
{
"line_item_id": "string",
"refund_item_type": 0,
"quantity": 0,
"return_inventory": true
}
],
"refund_payments": [
{
"payment_line_id": "string",
"refund_price": "string"
}
],
"refund_additional_prices": [
{
"name": "string",
"price": "string"
}
],
"note": "string"
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
error code
error message
data object
Created refund record ID
After-sales (post-sale) record generated alongside the refund ID
{
"code": "string",
"message": "string",
"data": {
"refund_record_id": "string",
"post_sale_id": "string"
}
}