Skip to content

Refund Preview

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

Operation

OperationType
previewAdminRefundMutation

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 error messages as Create Refund.

Released under the MIT License.