Hello Shopify Community,
I’m currently developing a custom checkout experience using the Storefront API and have encountered a challenge. Despite successfully creating carts and associating them with user identities (including delivery address preferences), the delivery address fields are not being pre-populated on the generated checkout page.
Here’s a brief overview of my process:
- I create a cart using the cartCreate mutation.
- I update the buyer identity with the cartBuyerIdentityUpdate mutation, including deliveryAddressPreferences.
The checkout URL is generated correctly, but when navigating to this URL, the delivery address sections remain unfilled. I’m looking for guidance on how to ensure these fields are automatically populated with the information provided via the API.
Here’s a snippet of my cartBuyerIdentityUpdate mutation for reference:
mutation {
cartBuyerIdentityUpdate(cartId: "cart_id", buyerIdentity: {
email: "user_email",
phone: "user_phone",
countryCode: "user_country_code",
deliveryAddressPreferences: [{
deliveryAddress: {
address1: "user_address1",
city: "user_city",
province: "user_province",
country: "user_country",
zip: "user_zip"
}
}]
}) {
cart {
checkoutUrl
}
}
}