#0xpete_api
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/1324778736284860489
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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?
ha sorry, didn't get notifications here on the thread.
I must have been mis-reading the interface associated with the typescript here. Good to know!
Yep!
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)
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?
Exactly; or in my case it's a team order. 30 team members all placing an order, and shipping to the team managers address.
Hello! I'm taking over and catching up...
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.
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.
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
Tax calculations are typically based on the shipping address provided at Checkout.
No, you can't calculate it ahead of time with Checkout.
shucks, so I'd have to move off checkout in order to achieve this?
Yep.
or could i create the checkout session, retreive and update the payment intents shipping address?
No, you can't update the shipping address at that point, the tax will have already been calculated.
You would need to not use Checkout and instead use the Tax API combined with a custom payment form: https://docs.stripe.com/tax/custom