版本:202506
创建订单退款记录
POST/openapi/2025-06/orders/:order_id/refund
为指定订单新增一条退款记录,声明退款金额及使用的支付渠道;返回新建退款 记录的 ID 与关联的售后记录 ID。
请求
Path参数
order_id string必填
订单 ID
- application/json
- 请求体
- 示例
请求体必填
- Array [
auto: 自动按类型计算退款数量shipped: 仅退已发货的商品waiting_ship: 仅退未发货(待发货)的商品- ]
- Array [
- ]
- Array [
- ]
refund object必填
退款请求体,包含退款金额、商品明细、支付渠道及备注等信息
refund_totalstring必填
退款总金额。若指定了 refund_payments,则退款总金额等于所有 refund_payments 退款金额之和
refund_shipping_totalstring
运费退款总金额
refund_tipstring
小费退款金额
refund_additional_totalstring
附加费用退款总金额
refund_product_totalstring
商品退款总金额
refund_line_items object[]
按商品行项目划分的退款明细列表
line_item_idstring必填
被退款的订单商品行 ID
refund_item_typeenum
退款项目类型:
quantityint32
退款数量
return_inventoryboolean
是否将退款商品退还到库存
refund_payments object[]
按支付渠道划分的退款金额列表
payment_line_idstring必填
退款使用的支付渠道 ID
refund_pricestring必填
该支付渠道的退款金额
refund_additional_prices object[]
按附加费用划分的退款明细列表
namestring必填
被退款的附加费用名称
pricestring必填
该附加费用的退款金额
notestring
商家填写的退款备注
{
"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"
}
}
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
codestring
错误码
messagestring
错误信息
data object
refund_record_idstring
创建的退款记录 ID
post_sale_idstring
随退款一并生成的售后记录 ID
{
"code": "string",
"message": "string",
"data": {
"refund_record_id": "string",
"post_sale_id": "string"
}
}