#bks_customer-address-automatic-tax

1 messages ยท Page 1 of 1 (latest)

shadow knollBOT
#

๐Ÿ‘‹ 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.

keen field
#

bks_checkout-customer-id-email is the thread

void prairie
#

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?

keen field
#

It hasn't been resolved.

void prairie
#

Okay, what is your question?

keen field
#

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.

void prairie
#

What are you currently attempting to do?

keen field
#

If I just use the customer id, the checkout form doesn't loads

#

integrating the checkout form in my application

void prairie
keen field
#

There is no request id in this case as the checkout form doesn't gets loaded

void prairie
#

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

keen field
#

You are not understanding the issue I am having.

void prairie
#

What error is thrown?

keen field
#

Something went wrong
Please try again or contact the merchant.

void prairie
#

No, not on the form

keen field
#

This is the error

void prairie
#

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?

keen field
#

The call is wrapped in a try catch block and it is not capturing any error that is being returned

void prairie
#

Try omitting the try..catch block and immediately log the value returned when you attempt to create a Checkout session

keen field
#

Okay. Let me try that. It will take some time. How can. post back to this thread?

void prairie
#

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.

keen field
#

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

void prairie
#

Okay so we can see that there IS an API request and the ID is logged here

keen field
#

Okay

shadow knollBOT
keen field
#

I tried to search that request id and it is telling me no results found for that request id

void prairie
#

It's in a Sandbox account, are you searching in the Sandbox acccount?

keen field
#

yes

spiral grail
#

hello! i'm taking over this thread. looking into the error message now

keen field
#

Thanks

spiral grail
#

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?

keen field
#

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.

spiral grail
#

yep, no worries!