#ahsan575

1 messages ยท Page 1 of 1 (latest)

compact elbowBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

red cape
#

Not sure, do you have any examples of where you're seeing this?

brisk gorge
#

i have a webhook listening for checkout.session.completed events and yesterday, a customer paid after filling in all details, but i received following (relevant code only):

"customer_details": { "address": { "city": null, "country": "GB", "line1": null, "line2": null, "postal_code": "XXX XXX", "state": null }, "email": "xxx@xxxx.com", "name": "xx xxx", "phone": "+44xxxxxxxxx", "tax_exempt": "none", "tax_ids": [ ] }

#

But i can see the address in payments in stripe dashboard

#

It might be useful for you to know that i do not see the address in customers section in (stripe dashboard) for the customer in question. Just the postcode like in the object above

#

My precise question would be, how do I overcome it? Do i need to listen to some other event or do I need to make a request to stripe after payment confirmation to get the address?

mental kelp
#

Can you share the event id like evt_123?

#

I can take a look

brisk gorge
#

yes

#

gimme a sec

mental kelp
#

My guess, before looking, is that these details are required for tax calculation

#

the other full address you see might be associated with the payment method as a billing address

#

You said it does this in some cases, not others, so two IDs showing the two patterns you see would be ideal

#

So i can help figure out why you see a difference

brisk gorge
#

Problematic event: evt_1OGhqDEf0s7M4UhFaHHWu0wx

Working event: evt_1OGfpoEf0s7M4UhFM8koG6cH

brisk gorge
#

and just in case you might be curios regarding use case of address, it is stored in private db for personal record and fulfillment/order delivery workflow if that makes sense

#

its not really for tax purposes

mental kelp
#

Ok, so this is the other way around. Those customer_details mirror the payment method billing_details.

#

Eg: pi_3OGfpmEf0s7M4UhF1fmjHoY2
and
pi_3OGhq9Ef0s7M4UhF0dNjCXoK

brisk gorge
#

im actually using stripe checkout and not payment intent. So is there any way I can keep the underlying code same but extend it some way?

mental kelp
#

You can retrieve those PIs directly via the API, or retrieve the checkout sesison and use expansion to expand the associated payment_intent: https://stripe.com/docs/expand

#

Yes, but checkout uses payment intents

#

You don't need to change how you use checkout, you need to change how to access the shipping address after the session is completed

brisk gorge
#

So can i achieve the required functionality by epxanding it to payment_intent.payment_method

mental kelp
#

You don't need the payment method unless you want the billing address

#

You get shipping from the payment intent.

#

You can either retrieve that payment intent or retrieve the session with payment_intent expanded

brisk gorge
#

alrighty, that look cool. Really appreciate your help, cant get to the point answers to support queries these days, nice to see logical answers.

#

have a good rest of the day

mental kelp
#

hang on, might be an easier answer

brisk gorge
#

sure, shoot

mental kelp
#

similar to customer_details helper mirroring the PM billing address, the checkout event already has the PI shipping details mirrored in shipping_details

#

Sorry I missed that at first, was too focused on those customer details ๐Ÿ˜…

#

So you don't need to request anything, just inspect shipping_details instead of customer_details

brisk gorge
#

damn

#

silly me

#

yes that is the PERFECT solution lol

#

thats why should read docs every time

#

thanks a lot mate