#Slushy
1 messages ยท Page 1 of 1 (latest)
Not that I know of, our current price preview is not coming from stripe itself
How are you calculating tax?
On the backend it's using the automatic calculation with stripe tax
Are you using the new Tax API? Ie did you follow https://stripe.com/docs/tax/custom
Not that I can see, the backend is all using the automatic tax and is set up the same way as this shows: https://stripe.com/docs/tax/checkout
Okay sorry you said Payment Element which is for our custom flow but sounds like you are actually using Stripe Checkout which is our hosted flow
The frontend is displaying the checkout form using a payment element (as far as I understand)
const elements = stripe.elements({
mode: 'payment',
Should it not be doing that in order to work with automatic tax?
Sadly I didn't write / set up any of this myself so I'm a bit confused ๐ฆ
Well Automatic Tax isn't really supported on Payment Element like it is in Checkout
So that's why I'm unsure what you are doing exactly
Do you have an example PaymentIntent that I can look at?
Not sure what I'm looking for, but the docs also seem to show payment element doesn't let me like "hook in" to the session and see the current tax amount on the price within a payment element
A PaymentIntent would be an object starting with a pi_ prefix on your Stripe account
It looks like pi_xxxxxx
If you go to the payments tab of your Dashboard and click on one of those you should see it
Hmm, I'll have to go spend some time to figure out what I have currently working because I haven't made a payment with the new tax settings yet myself
But it sounds like the only way to make the current setup to work with a payment form is to listen to the address changes and send that to the backend for it to calculate tax because the payment form can't display it automatically
Overall yes that's correct.
If you do use Invoices then you can do an invoice preview using https://stripe.com/docs/api/invoices/upcoming
Otherwise you basically want to calculate and display this yourself
Yeah that sounds right, we have to do it custom because we essentially build a custom form as part of this ๐ thanks