Skip to main content
mutation

Requires write_draft_orders access scope. Also: The user must have access to mark as paid, or set payment terms.

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 draftOrderComplete mutation when a merchant is ready to finalize a draft order and create a real order in their store. The draftOrderComplete mutation also supports sales channel attribution for tracking order sources using the sourceName argument, 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.

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.


•ID!required

The draft order to complete.

•ID

The gateway for the completed draft order.

•String

A channel definition handle used for sales channel attribution.

•BooleanDeprecatedDefault:false

Was this section helpful?

Anchor to DraftOrderCompletePayload returnsDraftOrderCompletePayload returns

•DraftOrder

The completed draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?
OSZAR »