Anchor to section titled 'undefined'

checkoutCustomerAssociateV2
mutation
deprecated

Requires unauthenticated_write_checkouts access scope.

Associates a customer to the checkout. 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.

Anchor to customerAccessToken
customerAccessToken
required

The customer access token of the customer to associate.


Was this section helpful?

The updated checkout object.

The list of errors that occurred from executing the mutation.

The associated customer object.

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


Was this section helpful?
Hide code
Mutation reference
Copy
mutation checkoutCustomerAssociateV2($checkoutId: ID!, $customerAccessToken: String!) {
  checkoutCustomerAssociateV2(checkoutId: $checkoutId, customerAccessToken: $customerAccessToken) {
    checkout {
      # Checkout fields
    }
    checkoutUserErrors {
      # CheckoutUserError fields
    }
    customer {
      # Customer fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "checkoutId": "gid://shopify/<objectName>/10079785100",
  "customerAccessToken": "<your-customerAccessToken>"
}