# shippingcontactchanged event listener not giving back full contact details

**URL:** <https://developer.squareup.com/forums/t/shippingcontactchanged-event-listener-not-giving-back-full-contact-details/19118>\
**Category:** Questions\
**Tags:** payments-api, web-payments-sdk\
**Created:** [October 10, 2024, 10:48pm UTC](https://developer.squareup.com/forums/t/shippingcontactchanged-event-listener-not-giving-back-full-contact-details/19118 "2024-10-10T22:48:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ActionJackson](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ActionJackson](https://developer.squareup.com/forums/u/ActionJackson)\
**Post date:** [October 10, 2024, 10:48pm UTC](https://developer.squareup.com/forums/t/shippingcontactchanged-event-listener-not-giving-back-full-contact-details/19118/1 "2024-10-10T22:48:42Z")

</div>

**BACKGROUND**

Hi, I’ve been stuck with this the past few days, and the email to square didn’t answer me, so hopefully someone here can help out??? Anyways, I have the Web Payments SDK setup properly. It works fine for credit / debit / gift cards, and partially google pay. I am not using node, but that shouldn’t matter because the only relevant part here is the front end JavaScript.

**GOAL**

Enable google pay so people can click a button, and have a real life product shipped to them automatically. Just 1 click, and done.

**PROBLEM**

Everything works so far. I got google pay to make the sale correctly. BUT, I’m only getting part of the shipping contact details back. Specifically, I’m only getting the city, countryCode, postalCode, and state… But I need their name, street address, and email at a minimum for the shipping, otherwise I have to get them to fill out extra details they probably don’t want to.

**RELEVANT PARTS OF MY CODE**

First, I already setup google pay. See the images below for proof. I would host them here, but I’m getting 422 errors from your site for it. I’m blocking out the details, but all of the data on it is correct. They have my real info.

[Google wallet card enabled.](https://ibb.co/c34r2m7)

[Google pay privacy settings are shared.](https://ibb.co/KVq34Xv)

So, I make the paymentRequest object…

```auto
const req = payments.paymentRequest({
    // ...
    requestShippingContact: true,
});

```

The PaymentRequest API page says that when I have [requestShippingContact: true,](https://developer.squareup.com/reference/sdks/web/payments/objects/PaymentRequestOptions#PaymentRequestOptions.requestShippingContact) then it should be giving me ALL the ShippingContact data.

Then I add the [shippingcontactchanged method the docs say to add:](https://developer.squareup.com/docs/web-payments/payment-requests#3-add-a-shipping-contact-changed-event-listener)

```auto
req.addEventListener('shippingcontactchanged', (contact) => {
    console.dir(contact);
}

```

When I click the google pay button, _ **ALL** _ the REAL data I gave google pay is showed to me, _ **but only in the popup.** _ It shows my real full name, address, phone number, etc. notice how it even says: _“Your billing details will also be shared with the merchant”_.

[Google pay button popup.](https://ibb.co/9hDh2FM)

But when the above console.dir(contact) runs, the only value I’m returned is the city, countryCode, postalCode, and state:

[console.dir(contact) shows this.](https://ibb.co/VNjCq3V)

Every value all of these things return is correct. It’s what I gave to google pay. I didn’t fill out any details on my site. So it’s only what google is giving me.

And that code runs in the console every time I try to change the address due to the event listener, so I know it’s running.

As a test, I also checked the console, and network requests from the popup… But nothing there either. That wouldn’t make sense anyway, but I did it just to see.

**QUESTION**

Why isn’t it giving me the rest of the details from the [ShippingContact](https://developer.squareup.com/reference/sdks/web/payments/objects/ShippingContact) object??? Specifically: addressLines, email, familyName, and givenName???

Did square or google disable this or something?? Is there some hidden setting I didn’t enable in google wallet or square?? Because I’d really like this one click functionality to work correctly.

Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [October 10, 2024, 10:49pm UTC](https://developer.squareup.com/forums/t/shippingcontactchanged-event-listener-not-giving-back-full-contact-details/19118/2 "2024-10-10T22:49:02Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Web Payments SDK Requirements](https://developer.squareup.com/docs/app-marketplace/requirements/web-payments-sdk)**
>
> Learn about the Square App Marketplaces requirements related to the Web Payments SDK.

> **[Payment API: Process Online and In-Person Payments](https://developer.squareup.com/docs/payments)**
>
> Process online, in-app, and in-person payments with Square payment APIs. Manage disputes and subscriptions and perform other payment-related tasks.

> **Additional Documentation**
>
> [Online Payment Solutions](https://developer.squareup.com/docs/online-payment-options)  
> [Enable Google Pay](https://developer.squareup.com/docs/in-app-payments-sdk/add-digital-wallets/google-pay)  
> [Supported Payment Methods by Country](https://developer.squareup.com/docs/payment-card-support-by-country)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![josh-square](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@josh-square](https://developer.squareup.com/forums/u/josh-square)\
**Post date:** [October 11, 2024, 7:47pm UTC](https://developer.squareup.com/forums/t/shippingcontactchanged-event-listener-not-giving-back-full-contact-details/19118/3 "2024-10-11T19:47:28Z")

</div>

Hey @ActionJackson! Based on the object outlined in our [technical reference](https://developer.squareup.com/reference/sdks/web/payments/objects/PaymentRequestOptions#PaymentRequestOptions.shippingContact), I believe that this _should_ be returning more information than that. I’ve gone ahead and escalated this to the team to get clarification. I’ll let you know when we have an update!

---

<div class="post-metadata">

**Author:** ![ActionJackson](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ActionJackson](https://developer.squareup.com/forums/u/ActionJackson)\
**Post date:** [October 16, 2024, 5:31pm UTC](https://developer.squareup.com/forums/t/shippingcontactchanged-event-listener-not-giving-back-full-contact-details/19118/4 "2024-10-16T17:31:03Z")

</div>

@josh-square Awesome, sounds good.

Any idea when an update might come?
