Skip to content

Refund Preview

Computes the refund totals (subtotal, discount, tax, shipping, grandTotal, plus pre-formatted variants) for a hypothetical refund body without saving anything. Same request body as Create Refund — useful for live-updating the "Total Refund" widget in the admin refund form.

Endpoint

EndpointMethod
/api/admin/orders/{orderId}/refunds/previewPOST

Eligibility gates fire here too — if the order cannot be refunded at all (closed / fraud / no permission / nothing-to-refund), preview rejects with the same 422 messages as Create Refund.

Released under the MIT License.