#mink4501_api

1 messages ¡ Page 1 of 1 (latest)

steel shoreBOT
#

👋 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/1228189777501622352

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

celest boltBOT
graceful thicket
#

Hi there, are you asking whether you can get the location info of the customer?

fair summit
#

For one-time payments, use the checkout.session.completed event.

For subscription payments, use the checkout.session.completed event only for the first payment, and use the invoice.paid webhook event for re-payments in the next subscription cycle.

#

Hi there, are you asking whether you can get the location info of the customer?

=> I want to know the country code that applies when I charge taxes.

graceful thicket
#

Are you asking how the tax is calculated?

https://docs.stripe.com/tax/calculating tax calculating is complicated. It's not just the customer's location, the seller's location and many other factors can be invovled.

Learn how to calculate tax with Stripe Tax.

fair summit
#

So how do I know the customer's country code at the time of the payment through the API?

graceful thicket
#

Let me see if the API surfaces this information

#

No, there's no API to retrieve the customer's location or country code at the time of the payment was made

fair summit
#

Doesn't Stripe collect the country code at the point of checkout internally, even for fraud detection? I don't understand why I can't get this.

graceful thicket
#

Yes Stripe collects the IP address, but this info isn't returned in API.

#

But you can get the customer's billing address through API.