Anchor to section titled 'undefined'

checkoutAttributesUpdateV2
mutation
deprecated

Requires unauthenticated_write_checkouts access scope.

Updates the attributes of a checkout if allowPartialAddresses is true. The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.


Anchor to checkoutId
checkoutId
required

The ID of the checkout.

The checkout attributes to update.


Was this section helpful?

The updated checkout object.

The list of errors that occurred from executing the mutation.

The list of errors that occurred from executing the mutation. Use checkoutUserErrors instead.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation checkoutAttributesUpdateV2($checkoutId: ID!, $input: CheckoutAttributesUpdateV2Input!) {
  checkoutAttributesUpdateV2(checkoutId: $checkoutId, input: $input) {
    checkout {
      # Checkout fields
    }
    checkoutUserErrors {
      # CheckoutUserError fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "checkoutId": "gid://shopify/<objectName>/10079785100",
  "input": {
    "allowPartialAddresses": true,
    "customAttributes": [
      {
        "key": "<your-key>",
        "value": "<your-value>"
      }
    ],
    "note": "<your-note>"
  }
}
input CheckoutAttributesUpdateV2Input {
  allowPartialAddresses: Boolean
  customAttributes: [AttributeInput!]
  note: String
}

input AttributeInput {
  key: String!
  value: String!
}