#Slushy

1 messages ยท Page 1 of 1 (latest)

orchid turretBOT
cosmic stump
#

Hi there

#

Are you using Invoices here?

arctic mirage
#

Not that I know of, our current price preview is not coming from stripe itself

cosmic stump
#

How are you calculating tax?

arctic mirage
#

On the backend it's using the automatic calculation with stripe tax

cosmic stump
arctic mirage
cosmic stump
#

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

arctic mirage
#

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 ๐Ÿ˜ฆ

cosmic stump
#

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?

arctic mirage
#

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

cosmic stump
#

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

arctic mirage
#

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

cosmic stump
#

Overall yes that's correct.

#

Otherwise you basically want to calculate and display this yourself

arctic mirage
#

Yeah that sounds right, we have to do it custom because we essentially build a custom form as part of this ๐Ÿ˜„ thanks