Call draftOrderCreate mutation with lineItems array including variantId, quantity, and an optional appliedDiscount at the line level specifying valueType (PERCENTAGE or FIXED_AMOUNT) and value
Add a customAttributes array for any order-level metadata needed by downstream systems
Optionally apply an order-level discount via the draftOrderApplyDiscount mutation or include it in the initial create call
Send the invoice to the customer via draftOrderInvoiceSend or complete the draft order directly via draftOrderComplete with paymentPending set to false for manual payment
After payment is captured outside Shopify or via a payment link, call draftOrderComplete to convert it to a finalized order
Known gotchas
Draft orders do not reserve inventory; if the product sells out between draft creation and completion, the order may complete successfully but fulfillment will be blocked by insufficient inventory
draftOrderComplete with paymentPending: true creates an open order but does not capture payment; you must separately create a payment via the Order Transactions API
Discounts applied to draft orders must comply with the shop's discount stacking rules; applying both a line-level and order-level discount may not produce the expected combined discount depending on configuration
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