#hamilton_checkout-customer-phone

1 messages ยท Page 1 of 1 (latest)

glossy schoonerBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1281656667435438194

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tall heron
#

I'm a bit confused about what you're doing currently. Can you point to the specific API methods you're using and elaborate on what you want to do with them?

next plume
#

Sure... I am using the event API endpoint /v1/events. I need to have an event type that includes customer info, shipping info, customer and shipping phone, customer and shipping email, and product description. I can do this for suscription purchases by using the type invoices.paid. When I pull with a type that includes web based orders ( with type charge.updated) I do not get phone numbers. It shows as a null field even when I know the phone number was submitted.

#

I am using a GET request

tall heron
#

RIght, but what are you using to accept payments? Where is your customer providing their phone number?

next plume
#

ah... We added a link on our web site for products defined in stripe to the pricing table. The "require phone number" was added when the new pricing table is created.

#

Does that answer your question?

#

When I see a phone number on the customer and billing I dont see it on the GET for event type charge.updated.

tall heron
glossy schoonerBOT
next plume
#

The object comes back as NULL instead of the expected value

chilly escarp
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague needs to go. What object are you referring to here?

next plume
#

event API endpoint, Type charge.updated - objects data/data/object/billing_details/phone and data/data/object/shipping/phone

#

both come back as null even when I can see a phone number is supposed to be there. I could also be misinterpreting things

chilly escarp
#

In which request are you saving the phone number?

#

Where does it come in to Stripe?

next plume
#

Let me ask a different way. If I see a phone number for a customer in the web portal UI under Customers tab > CustomerA ..... should that show for billing details?

chilly escarp
#

in the web portal UI
I don't know what UI you are referring to here

next plume
#

Just a sec... You almost have it but wrong request type.

#

I am only having issues with web based orders.

#

Just a sec

#

I will get you a request to see

#

req_O6ilegof3ugti3

chilly escarp
#

Thanks, taking a look

#

No

#

This is incorrect. I am looking for the requests that SET the phone number

#

Where this data is collected from the customer

#

IF your only problem is that, when you retrieve the webhook event, the customer property on the Checkout Session is null, that is expected

#

These phone numbers are being set directly on the Customer

next plume
#

Ah... I saw in the stripe dashboard
Insights
Spent
$295.00
Details
Guest details
Diana McCarty
didicoop@yahoo.com
Customer since

Sep 4
Billing details
714 Gakona Court
Fairbanks, AK 99701 US
(907) 662-5115

#

and assumed that customer would ahve the phone number included in billing details.

chilly escarp
#

I cannot speak to what the Dashboard displays. We focus primarily on API integrations here

#

Because it's a Stripe owned surface, we keep building "helpful" features into the Dashboard. But it can mean it is difficult to map those data points directly back to the APIs

next plume
#

gotcha, it seems like a disconnect between the two.

#

I appreciate your time. Bummer.

#

Know anyone who built an API from Stripe to XPS Shipper yet? I am almost done but for this phone number hurdle.

chilly escarp
#

In this case, the phone number appears to be collected by the Checkout Session. This data is then saved to the Customer object. If you want to retrieve this information you will need to include another API call using the Customer ID from the checkout session
https://docs.stripe.com/api/customers/retrieve

next plume
#

That endpoint is the closest I have seen to having all the info XPS requires.

chilly escarp
#

Know anyone who built an API from Stripe to XPS Shipper
I am not familiar with this shipping software and do not know of anyone working on something like it.

You can check our partners directory though: https://stripe.com/partners

#

QQ

chilly escarp
#

Wait a sec..

next plume
#

k

chilly escarp
#

Why are you using the webhook events list api?

#

You could use the Checkout Session List API and include the Customer in the expand parameter to get all the data in one shot

next plume
#

I could not find another that gave all the info I needed.

#

EXPAND?

#

ooooh

#

I will go back to the docs... I must have missed something

chilly escarp
#

So it would look like (in Python)

sessions = stripe.checkout.Session.list(status='complete', expand=['customer'])
next plume
#

I will dive into that. Thanks for the tip!

chilly escarp
#

And the phone number would be at session.customer.phone

next plume
#

That just might be my solution

#

Thanks

chilly escarp
#

Great ๐ŸŽ‰ Happy to help ๐Ÿ™‚