#goldman_code

1 messages · Page 1 of 1 (latest)

short sinewBOT
#

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

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

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.

frosty crater
#

You are creating a PaymentElement, but you are listening to a Checkout Session Event ?

#

What guide are you following exactly? to better understand your flow

#

Between, the stripeCheckout.on('change', (session) => { shouldn't be paymentElement.on('change', (event) => { ?

#

In all cases, you should use Address Element in order to recompute the Tax, you can't achieve that with just the PaymentElement

delicate quartz
#

We don´t want to use the Address Element because we don´t need the full address of the customer. Only the bare minimum for the tax calculation.

frosty crater
#

Unfortunately, you'll need to have Address Element for this with PaymentElement

delicate quartz
#

Oh, ok. We also tried (according to the docs) to set only the country manually with updateBillingAddress().
This is working to calculate the tax. But in this case we would need then our own dropdown list with (supported) countries I think.

#

Is this an alternative? And is there a way to get a country list somewhere in the library? I couldn´t found yet

#

The thing is, in the managed checkout hosted by stripe it works somehow. We have the country/address collection in the payment section and it also calculates the tax on the left correctly.

frosty crater
#

This is working to calculate the tax. But in this case we would need then our own dropdown list with (supported) countries I think.
Yeah I think that could be a workaround indeed

#

Is this an alternative? And is there a way to get a country list somewhere in the library? I couldn´t found yet
Stripe SDK doesn't expose a list of country, you can search in the community or hard code the list somewhere in the code

delicate quartz
#

Ok thanks 🙂
I guess we have then only these 2 options?

  • use billingAddessElement and collect full address
  • implement own country selection
frosty crater
#

Yes exactly 👌

delicate quartz
#

alright, thank you 👍