Anchor to draftOrderPrepareForBuyerCheckoutdraft
draftOrderPrepareForBuyerCheckout
mutation
Requires access scope. Also: The user must have access to manage draft orders.
Updates a draft order before sending the invoice to the buyer by configuring settings relevant to the draft order.
Anchor to Arguments
Arguments
- Anchor to allowDiscountCodesInCheckoutallow•
Discount Codes In Checkout Whether discount codes are allowed during checkout of this draft order.
- Anchor to bypassCartValidationsbypass•
Cart Validations Whether to bypass cart validations on this draft order.
- •ID!required
The draft order to prepare for buyer checkout.
- Anchor to lockPricesForBuyerlock•
Prices For Buyer Whether to create price locks when preparing this draft for buyer checkout.
Was this section helpful?
Anchor to DraftOrderPrepareForBuyerCheckoutPayload returnsDraftOrderPrepareForBuyerCheckoutPayload returns
- Anchor to draftOrderdraft•
Order The prepared draft order.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation draftOrderPrepareForBuyerCheckout($allowDiscountCodesInCheckout: Boolean, $bypassCartValidations: Boolean, $id: ID!, $lockPricesForBuyer: LockDraftOrderPricesForBuyer) {
draftOrderPrepareForBuyerCheckout(allowDiscountCodesInCheckout: $allowDiscountCodesInCheckout, bypassCartValidations: $bypassCartValidations, id: $id, lockPricesForBuyer: $lockPricesForBuyer) {
draftOrder {
# DraftOrder fields
}
userErrors {
field
message
}
}
}
Input
{
"allowDiscountCodesInCheckout": true,
"bypassCartValidations": true,
"id": "gid://shopify/<objectName>/10079785100",
"lockPricesForBuyer": "LOCKALL"
}
{
"allowDiscountCodesInCheckout": true,
"bypassCartValidations": true,
"id": "gid://shopify/<objectName>/10079785100",
"lockPricesForBuyer": "LOCKALL"
}