我正在尝试使用此端点取消订单并退款:
https://help.shopify.com/en/api/reference/orders/order#cancel
使用以下有效负载:
{"refund": {
"shipping": {"full_refund": true},
"refund_line_items": [{
"quantity": 1,
"line_item_id": 2032498606169,
"price": "39.90",
"subtotal": "39.90",
"total_tax": "6.37",
"discounted_total_price": "39.90",
"total_cart_discount_amount": "0.00",
"location_id": null,
"restock_type": "no_restock",
"discounted_price": "39.90"
}],
"transactions": [{
"amount": "39.90",
"maximum_refundable": "39.90",
"kind": "refund",
"parent_id": 1147873263705,
"currency": "EUR",
"order_id": 922997620825,
"gateway": "amazon_payments"
}],
"notify": true
}}
订单只有这一篇,所以我基本上是全额退款。
然而,这个 REST API 调用返回成功,但是当我去查看订单页面时,我确实看到订单被取消了,但毕竟没有退款。
订单状态显示“已取消”、“已支付”、“未完成”。所以我最终不得不手动退款。
为什么我的 REST 调用只是取消了这个订单,但没有进行退款?
谢谢!