Checkout doesn't remember address/payment details when using GraphQL checkoutCreate

peters
New Member
2 0 0

Hi,

We have built a mobile app (with Flutter) for shopping, where we for checkout call the GraphQL checkoutCreate mutation and then open a web view with Shopify's checkout (webUrl) to complete payment. Shopify's address page has a checkbox to remember all address information that the user enters, but for some reason it doesn't work between sessions. Next time the user goes to complete a new purchase, only the address fields that we explicitly include in the checkoutCreate request, plus the user's email, is remembered/prefilled in the checkout, but other fields like First Name, Last Name, Address2 and Phone number are empty and have to be entered again by the user, which of course is rather annoying.

My mutation request looks something like this:

mutation {
  checkoutCreate(input: {
    allowPartialAddresses: true
    lineItems: [{ 
      variantId: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zOT==", 
      quantity: 1 }],
    shippingAddress: {
      address1: "My Street 1"
      zip: "11122"
      city: "My City"
      country: "Country Name"
    }
    }){
    checkout {
      id
      webUrl
      }
    }
  }
}

Any ideas what's going on and if there's a way to fix this so that all address information is remembered between sessions (without being explicitly included in every checkoutCreate request)?

Thank you so much in advance!

PS. If you're wondering, that reason why the app only sends a few address fields in the GraphQL request is that it uses Google Places API in an earlier step in the funnel, and it's the only address information for the user that the app currently has access to. This can be changed, but involves quite a bit of work. DS.

0 Likes