Use the refundCreate mutation's calculateRefund input or the suggestRefund query to obtain a preview of the refund amounts including line items, shipping, and taxes before committing
Review the refundLineItems, shippingRefund, and totalRefundedSet fields in the preview to confirm correctness
Decide whether to restock returned items by setting restockType on each refund line item
Construct the final refundCreate mutation with refundLineItems, shippingRefund, and the chosen refund method (original payment method, store credit via storeCreditAccountCredit, or manual)
Submit refundCreate and handle the returned userErrors array before assuming success
Reconcile the refunded amounts against your internal order management system using the returned transaction objects
Known gotchas
Taxes on partial refunds must be calculated proportionally; passing incorrect tax amounts will cause validation errors
Restocking items to a location requires specifying the correct location ID; the default location is used if omitted, which may not match the fulfillment location
The refund preview does not reserve any state; another refund can be submitted between your preview and your final mutation
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp