#zach_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1335898840083202069
đ 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.
- zach_code, 2 days ago, 4 messages
hi there!
Answer to previous thread: "We'll be supporting line item currency updates which should help you with this. But in the meantime this isn't really supported"
My followup:
I don't need to chance currency on the line items, since I also need to change the price, so I'm already making a new checkout session when the country changes to country X .
My problem is that I want to disallow users to complete a checkout if they change to country X.
you could achieve this by plitting your flow in two steps:
- first ask the shipping country
- then, depending on the answer, create a Checkout Session with the correct currency & shipping set
Yes, this is what I am doing. And if the user changes to country X (which has other prices and currency), i redirect to a new checkout.
However, since this is done client side, I cannot avoid a malicious user from avoiding the redirect and checking out with a "bad" country.
So I'm wondering if it is possible to set the billing country server-side, when creating the checkout session, since I already have their billing address from the previous step.
Or, to provide allowed_billing_countries on the server, just like it is possible with shipping.
Oh also there is no shipping country in this context. Only billing address.
sorry I wasn't clear.
- have a page on your website that only collect the shipping address
- when then submit the form, your backend server created a Checkout Session with the shipping country and currency is preset
Can I do that with a billing address also?
oh, let me double check
you can restrict the shipping address, but not the billing address. so you would need to collect the full billing address before creating the Checkout Session
Ok, I've already collected the billing address, created a customer with that address, and create a Checkout Session with that customer. However, since billing address can be set using stripe js client side, I don't know how I can enforce that a user cannot confirm the payment with a "Bad country". I would like to either restrict the allowed billing countries, or perform a final check on the server.
are you using Stripe Tax?
Yes