#chip_code

1 messages · Page 1 of 1 (latest)

cloud locustBOT
#

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

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

prime shard
#

Do we need to add

  customer_update: {
    shipping: 'auto',
  },
``` for new customers without an existing address?
#

We usually only capture in the first checkout session the user creates, unless they themselves goes to the billing portal and adds it there.

#

and does this matter at all, if we in the dashboard have set our default tax behavior to 'Automatic'?

random bison
#

Hi, to enable automatic tax you can pass that and we use the shipping address entered during the session to determine the customer’s location for calculating tax. If you don’t collect shipping information, Checkout uses the billing address.

Yes, by passing that customer_update, https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer_update you're indicating that you'd like the customer object to be update with that address for shipping.

prime shard
#

Okay, so this is only related to the shipping address?

#

As in, we don't really need the shipping adress.

#

No, okay! So the shipping address options we set ourselves in order to enable that

random bison
#

Yes, and if no shipping address is provided we will take the billing address to calculate the tax when you pass that automatic tax behavior

prime shard
#

Gotcha! I had to set 'address' to 'auto'. If I set 'shipping' to 'auto' without an existing billing address, you end up with this

 [Error: 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.] {
#

I guess that's intended. Just the error message that is a bit misleading I guess, it seems. I intepret that as I have three options 😄

random bison
#

Yeah, that is intended.

prime shard