Possibility to implement users shipping address into orders field?

Hello all,

Previous ticket: Client addresses integrated into the Square orders form?

I’ve been struggling to get the user’s order address to show up in the mobile app under the transactions field. I’ve opened multiple tickets, but no matter what I try, I can’t get the address to populate.

Here’s the relevant code snippet:

checkout_options: {
  ask_for_shipping_address: true,
},
"merchant_support_email": "[email protected]",
"pre_populated_data": {
  "buyer_address": {
    "address_line_1": shippingDetails.streetAddress,
    "country": shippingDetails.country,
    "postal_code": shippingDetails.postalCode,
    "locality": shippingDetails.city
  }
}

And here’s the HTML form:

<label for="street-address">Street address</label>
<input type="text" id="street-address" name="street-address" autocomplete="street-address" required enterkeyhint="next">

<div>
    <label for="city">City</label>
    <input required type="text" id="city" name="city" autocomplete="address-level2" enterkeyhint="next">
</div>
<div>
    <label for="postal-code">ZIP or postal code</label>
    <input class="postal-code" id="postal-code" name="postal-code" autocomplete="postal-code" enterkeyhint="next">
</div>
<div>
    <label for="country">Country or region</label>
    <select id="country" name="country" autocomplete="country" enterkeyhint="done" required>
        <option></option>
        <option value="AE">United Arab Emirates</option>
        <option value="GB">United Kingdom</option>
        <option value="US">United States</option>
        <option value="UM">US Outlying Islands</option>
        <option value="VI">US Virgin Islands</option>
    </select>
</div>

The code works fine with no errors, but I still can’t get the address to appear. Any ideas on what might be going wrong? Thanks for any help!

I’ve been able to replicate this and am waiting on an update from the team. Thank you for your patience. :slightly_smiling_face:

Looks like the reason it’s not showing is because there’s not administrative_district_level_1.

{
    "quick_pay": {
      "location_id": "{{location_id}}",
      "name": "Plant Power - Your cart",
      "price_money": {
        "currency": "USD",
        "amount": 100
      }
    },
    "pre_populated_data": {
      "buyer_address": {
        "address_line_1": "32603 Hamilton Rd.",
        "country": "US",
        "postal_code": "74878",
        "locality": "Wanette"
      }
    },
    "checkout_options": {
      "ask_for_shipping_address": true,
      "merchant_support_email": "[email protected]",
      "enable_coupon": true,
      "accepted_payment_methods": {
        "afterpay_clearpay": false,
        "apple_pay": false,
        "cash_app_pay": true,
        "google_pay": true
      }
    }
  }

The team is looking into as to why the other provided information didn’t show without administrative_district_level_1. :slightly_smiling_face: