--- title: draftOrderPrepareForBuyerCheckout - GraphQL Admin description: Updates a draft order before sending the invoice to the buyer by configuring settings relevant to the draft order. api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/draftorderprepareforbuyercheckout md: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/draftorderprepareforbuyercheckout.md --- # draft​Order​Prepare​For​Buyer​Checkout mutation Requires `write_draft_orders` 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. ## Arguments * allow​Discount​Codes​In​Checkout [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Whether discount codes are allowed during checkout of this draft order. * bypass​Cart​Validations [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Whether to bypass cart validations on this draft order. * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required The draft order to prepare for buyer checkout. * lock​Prices​For​Buyer [Lock​Draft​Order​Prices​For​Buyer](https://shopify.dev/docs/api/admin-graphql/unstable/enums/LockDraftOrderPricesForBuyer) Whether to create price locks when preparing this draft for buyer checkout. *** ## Draft​Order​Prepare​For​Buyer​Checkout​Payload returns * draft​Order [Draft​Order](https://shopify.dev/docs/api/admin-graphql/unstable/objects/DraftOrder) The prepared draft order. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/UserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### draftOrderPrepareForBuyerCheckout reference ## Mutation Reference ```graphql mutation draftOrderPrepareForBuyerCheckout($id: ID!, $lockPricesForBuyer: LockDraftOrderPricesForBuyer, $allowDiscountCodesInCheckout: Boolean, $bypassCartValidations: Boolean) { draftOrderPrepareForBuyerCheckout(id: $id, lockPricesForBuyer: $lockPricesForBuyer, allowDiscountCodesInCheckout: $allowDiscountCodesInCheckout, bypassCartValidations: $bypassCartValidations) { draftOrder { # DraftOrder fields } userErrors { field message } } } ``` ## Input ##### Variables ```json { "id": "gid://shopify//10079785100", "lockPricesForBuyer": "NOCHANGE", "allowDiscountCodesInCheckout": true, "bypassCartValidations": true } ```