#bks_customer-address-automatic-tax
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/1368994176468779078
๐ 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.
- bks_checkout-customer-id-email, 1 hour ago, 8 messages
bks_checkout-customer-id-email is the thread
Hi ๐
we don't re-open threads.
Also, as the welcome message to this thread says, we will close threads due to inactivity
What is the current state of your question?
It hasn't been resolved.
Okay, what is your question?
The question I asked in bks_checkout-customer-id-email hasn't been resolved. I tried the suggested changes but it didn't resolve the issue.
What are you currently attempting to do?
If I just use the customer id, the checkout form doesn't loads
integrating the checkout form in my application
The requests to create a Checkout Session, before you attempt to load the form on your website, will make an API request.
Can you share an API request ID for this request? It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
There is no request id in this case as the checkout form doesn't gets loaded
The request to create a Checkout Session before the form loads is what creates an API request.
You should still see requests to /v1/checkout/sessions
You are not understanding the issue I am having.
What error is thrown?
Something went wrong
Please try again or contact the merchant.
No, not on the form
This is the error
An actual error is thrown in the code and that is what I need to see
When you attempt to create a checkout session, this returns a response. What is in that response?
The call is wrapped in a try catch block and it is not capturing any error that is being returned
Try omitting the try..catch block and immediately log the value returned when you attempt to create a Checkout session
Okay. Let me try that. It will take some time. How can. post back to this thread?
We expect you to be able to test out code modifications in real time. We will keep this thread open for a while but generally close them if we have not heard back in ~45m.
stripe._error.InvalidRequestError: Request req_UeowBx9vY7X9tO: Automatic tax calculation in Checkout requires a valid address on the Customer. Add a valid address to the Customer or set either customer_update[address] to 'auto' or customer_update[shipping] to 'auto' to save the address entered in Checkout to the Customer.
This is the error I get
Okay so we can see that there IS an API request and the ID is logged here
You can see that request here: https://dashboard.stripe.com/test/logs/req_UeowBx9vY7X9tO
Okay
I tried to search that request id and it is telling me no results found for that request id
It's in a Sandbox account, are you searching in the Sandbox acccount?
yes
hello! i'm taking over this thread. looking into the error message now
Thanks
ok, it looks like the customer you're passing in to the Create a Checkout Session request doesn't have an address. the error message is asking you to update the parameters of your request to include customer_update.address: 'auto' which would tell the session to save the address to the customer and allow automatic tax calculation. have you tried doing that yet?
I haven't tried that yet. I'll give this a try and see if that resolves this issue.
That resolved the issue. Thank you for your help with this. Appreciate it.
yep, no worries!