🔒

Requires write_order access scope. More access scope

The Order Refund API processes order refunds, supports product selection, supports setting refund amounts for shipping and other charges, and supports specifying payment channels and refund amounts.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredDescriptionExample
idstringYesThe unique ID of the order.1232123

Body Parameters

Field Type Required Example Description
order_id string yes ORD12345 Order ID
refund_total string yes 100.00 The total refund amount. If refund_payments are specified, this value must equal the sum of all refund_payments amounts.
refund_shipping_total string no 10.00 The total shipping amount to be refunded.
refund_tip string no 5.00 The tip amount to be refunded.
refund_additional_total string no 15.00 The total amount for additional refunded charges.
refund_product_total string no 70.00 The total refund amount for the refunded products.
refund_line_items array of LineItem no [{"line_item_id": "LI123", "quantity": 2}] The items being refunded. Refund items. See LineItem for details.
refund_payments array of RefundPayment no [{"payment_line_id": "PAY123", "refund_price": "50.00"}] The payment methods used for the refund. See RefundPayment for details.
refund_additional_prices array of RefundAdditionalPrices no [{"name": "Handling Fee", "price": "5.00"}] Additional charges included in the refund. See RefundAdditionalPrices for details.
note string no Refund for damaged items Remark

LineItem

FieldTypeExampleDescription
line_item_idstringLI123Refund item ID
quantityinteger2Refund quantity
waiting_ship_quantityinteger1The refund quantity of waiting shipping goods
return_inventorybooleantrueWhether to return inventory

RefundAdditionalPrices

FieldTypeExampleDescription
namestringHandling FeeAdditional price name
pricestring5.00Additional price refund amount

RefundPayment

FieldTypeExampleDescription
payment_line_idstringPAY123Refund payment channel ID
refund_pricestring50.00Refund amount

Response Description

Public Response Fields

📘

Public Response Parameters

Success Response

RefundOrderResponse

FieldTypeExampleDescription
codestringSUCCESSError code
messagestringRefund processed successfullyError message
dataobject{ "refund_record_id": "R12345", "post_sale_id": "A67890" }Order refund response data. See RefundOrderResponse_Data for details.

RefundOrderResponse_Data

FieldTypeExampleDescription
refund_record_idstringR12345Refund record ID
post_sale_idstringA67890After-sales ID

Error Response

FieldTypeDescriptionExample
codestringThe error code indicating the type of issue.InvalidParameter
messagestringA detailed message describing the error.Order id is required.

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
422InvalidParameterThe argument does not pass an order id{ "code": "InvalidParameter", "message": "Order id is required." }
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!