Refund order
POST/v1/order/:order_id/refund
Endpoint to refund an order. The customer will receive a credit note with a description of the items that are credited. An order can also be partially refunded by specifying the exact items and amount that are refunded in the JSON request body. Where the order's credit notes are reported line by line to a tax authority (for example, Spanish merchants invoicing Spanish buyers), a partial refund must include line_items, either by the order line item id or as full line items. Otherwise the request fails with 400 REFUND_LINE_ITEMS_REQUIRED. Every refund line, including a goodwill adjustment not tied to an order line id and an order line id that overrides tax_rate or tax_code, must carry the tax_rate and tax_code of one of the order's lines, because it reduces the base of the original sale. Otherwise the request fails with 400 REFUND_ADJUSTMENT_TAX_MISMATCH.
Request
Responses
- 201
- 400
- default
Refund order
Invalid refund request. Where the order's credit notes are reported line by line to a tax authority: REFUND_LINE_ITEMS_REQUIRED means a partial refund must include line_items, and REFUND_ADJUSTMENT_TAX_MISMATCH means a line (an adjustment, or an order line id with an overridden rate or code) has a tax_rate and tax_code that no order line has.
Error response