Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Auto-Populating Delivery Address in Checkout Page Using Storefront API

Auto-Populating Delivery Address in Checkout Page Using Storefront API

sheena7
Visitor
1 0 2

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:

  1. I create a cart using the  cartCreate mutation.
  2. 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
}
}
}
Replies 5 (5)

thegreatone99
Shopify Partner
5 0 6

Hey, any luck with this? I am running into the same thing

julianotcp
Shopify Partner
2 0 1

Facing the same issue. Any updates?

collin-f4d
Shopify Partner
3 0 1

Also running into the same issue, the query comes back without errors too

B2CSupport
Shopify Partner
1 0 0

Same problem here. Any news on this?

Pranav_PHP1
Tourist
6 0 2

same issue please tell me how to resolve ??