If I want to cancel and refund an order, i first would hit the calculate endpoint
POST https://{{store-name}}/admin/api/{{api-version}}/orders/5322564469010/refunds/calculate.json
and then we dump its response to the “refund” object in this endpoint
POST https://{{store-name}}/admin/api/{{api-version}}/orders/5322570367250/cancel.json?reason=customer&email=true
Now this works great for paid orders, but for COD order, the transactions
array from the calculate
endpoint is empty!
My X-Request-ID is 3764232d-79a2-4975-9b2c-a64fbdf3a7a3