#0xpete_api

1 messages ¡ Page 1 of 1 (latest)

fast geodeBOT
#

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

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

raven hollow
#

I see I can create a payment intent first then pass that into my checkout session
Where do you see this? Checkout doesn't support passing in a pre-created Payment Intent.

but I'd rather create the stripe checkout session first
This is how Checkout works. Checkout creates a payment intent. You don't pass one in.

#

Are you using Stripe Tax?

#

Or do you just want to store tax data in metadata in Stripe and use some 3rd party tax provider?

reef flare
#

ha sorry, didn't get notifications here on the thread.

reef flare
reef flare
#

Yea my hope here was in some scenarios I'm shipping direct to a customer so I want that customers tax information to be used based on their shipping address, and others i have a handful of customers paying but they are all shipping to one specific state. I want to reflect that shipping address on those ordres.

#

so in some cases i'm using the collect_shipping param, but in others I want to remove that, apply the actual shipping address (which I thought was done via paymentIntents)

raven hollow
#

others i have a handful of customers paying but they are all shipping to one specific state
So basically for these customers you have their shipping address stored ahead of time and you just want to pass it through so they don't have to provide it in Checkout?

reef flare
#

Exactly; or in my case it's a team order. 30 team members all placing an order, and shipping to the team managers address.

fast geodeBOT
stone shore
#

Hello! I'm taking over and catching up...

reef flare
#

tldr:

I have 2 ways I want to collect tax.

  • Based on the purchasers shipping address
  • Based on a pre-defined shipping address

I have the first working, based on shipping_address_collection, but for the second i am hoping to define the address.

stone shore
#

Yeah, I don't think the second thing is possible with Checkout. You can't pre-fill or set a shipping address, it needs to be supplied by the customer inside Checkout.

reef flare
#

hmm, am I just solving the wrong problem? I'm trying to get the proper tax information and using the shipping information to do that.

#

Is there a way to pre-calculate that tax via another API and apply that way vs just using automatic_tax param on the checkout session

stone shore
#

Tax calculations are typically based on the shipping address provided at Checkout.

#

No, you can't calculate it ahead of time with Checkout.

reef flare
#

shucks, so I'd have to move off checkout in order to achieve this?

stone shore
#

Yep.

reef flare
#

or could i create the checkout session, retreive and update the payment intents shipping address?

stone shore
#

No, you can't update the shipping address at that point, the tax will have already been calculated.

reef flare
#

bah that was my worry.

#

I really like checkout; it certinly takes a lot of the heavy lifting out of play

#

Alrighty, thank you so much. I appreciate the information! Have a wonderful day