Draft Order Complete Payload
Return type for mutation.
Anchor to FieldsFields
- draftOrder (DraftOrder)
- userErrors ([UserError!]!)
- Anchor to draftOrderdraft•Draft
Order Order The completed draft order.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Anchor to Mutations with this payloadMutations with this payload
- draftOrderComplete (DraftOrderCompletePayload)
- •mutation
Completes a draft order and converts it into a regular order. The order appears in the merchant's orders list, and the customer can be notified about their order.
Use the
mutation when a merchant is ready to finalize a draft order and create a real order in their store. Themutation also supports sales channel attribution for tracking order sources using theargument, cart validation controls for app integrations, and detailed error reporting for failed completions.You can complete a draft order with different payment scenarios:
- Mark the order as paid immediately.
- Set the order as payment pending using payment terms.
- Specify a custom payment amount.
- Select a specific payment gateway.
NoteWhen completing a draft order, inventory is reserved for the items in the order. This means the items will no longer be available for other customers to purchase. Make sure to verify inventory availability before completing the draft order.
Note:When completing a draft order, inventory is reserved for the items in the order. This means the items will no longer be available for other customers to purchase. Make sure to verify inventory availability before completing the draft order.
Note: When completing a draft order, inventory is <a href="https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states">reserved</a> for the items in the order. This means the items will no longer be available for other customers to purchase. Make sure to verify inventory availability before completing the draft order.
- •ID!required
The draft order to complete.
- Anchor to paymentPendingpayment•Boolean
Pending DeprecatedDefault:false - Anchor to paymentGatewayIdpayment•ID
Gateway Id The gateway for the completed draft order.
- Anchor to sourceNamesource•String
Name A channel definition handle used for sales channel attribution.
- Anchor to bypassCartValidationsbypass•Boolean
Cart Validations Default:false Whether to bypass cart and checkout validations. This will ignore any validations added by apps during completion.
Arguments