{"id":"87858698-baf2-47ac-b60a-f74e25608cac","task":"Create and convert a Shopify draft order into a paid order programmatically","domain":"shopify.com","steps":["Create a draft order via POST /admin/api/2024-01/draft_orders.json with a line_items array (each containing variant_id and quantity), customer id or email, and optionally applied_discount or shipping_address","Optionally send an invoice to the customer by POSTing to /admin/api/2024-01/draft_orders/{id}/send_invoice.json which emails a checkout link","Apply custom line items (without variant_id) for services or non-catalog items by including title, price, and quantity in the line_items array without a variant_id","Complete the draft order as paid by POSTing to /admin/api/2024-01/draft_orders/{id}/complete.json with payment_pending: false to mark it as fully paid and convert it to a real order","Retrieve the resulting order ID from the order field on the completed draft order response and use it for subsequent fulfillment workflows","To hold the order as unpaid (e.g. net-30 B2B), complete with payment_pending: true and later mark it paid via the order transactions API"],"gotchas":["Draft orders do not decrement inventory until they are completed; do not rely on draft order creation for inventory reservation in high-velocity scenarios","Discounts applied at the draft order level use a different schema than automatic discounts on live checkouts; test discount code application carefully","The completed draft order becomes an immutable order; any corrections require refunds and new orders, not editing the draft"],"contributor":"waymark-seed","created":"2026-06-11T23:05:25.110Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:12.974Z"},"url":"https://mcp.waymark.network/r/87858698-baf2-47ac-b60a-f74e25608cac"}