#Ioanna
1 messages · Page 1 of 1 (latest)
Yup, a couple different ways. What product are you using to accept payments?
I'm getting the card info through a set up session and then when a customer takes specific actions on the app I generate a payment intent and capture the amount of money they used
a set up session
What is this? Do you mean a Checkout Session insetupmode?
yes exactly
Ok so do I have to do this during the Checkout Session in setup mode?
I believe so. There are docs on multiple different workflows. Which one have you tested?
I haven't tested the checkout session version, I was trying to figure out whether or not there is a way to set this up on the payment intent
Although I'm trying the checkout session alternative as we speak and I'm getting the error: You cannot set automatic_tax[enabled]=true in setup mode.
Yup! You can use Tax with all the Stripe products mentioned here: https://stripe.com/docs/tax/set-up#integrate
Ok so correct me if I'm wrong, just ro make sure I've understood. Payment intents don't support tax out of the box so I have to look at the custom payment flows and take it from there correct?
Correct
Awesome thanks a lot!
I've got one more question if you are still here
Do you have any idea how can I get a tax refference?
Hello! I'm taking over and would be happy to help.
Not sure what you mean by "tax reference". Can you provide more details?
Of course I'm trying to set up a taxed payment intent and ate the stripe.tax.calculations.create docs say that the line_items argument requires a reference attribute
I can't seem to figure out where can I get that from
That's a unique reference that you generate on your end: https://stripe.com/docs/api/tax/calculations/create#calculate_tax-line_items-reference
How you generate it and what form it takes are up to you. As long as it's unique across the line items for a given calcuation and works for your tax reports it can be whatever you want.
Got it and does it have to be unique for every transaction?
I don't think so, no, just unique in the context of a specific tax calcuation.
Got it so it could even be our vat
No, it needs to be specific to the line item. If you sell two things you can't have both of the reference IDs be the same VAT.
I always sell only one
it is as if the stripe.tax item is not available in test mode could that be the case?
What do you mean? Are you seeing an error?
Yes I'm getting "Cannot read properties of undefined (reading 'calculations')" error
What code is producing that error?
Oh, wait, it sounds like maybe you're using an out of date version of the library? What version are you using?
Yeah, that version is quite old. Tax API support was added in 11.16.0: https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#11160---2023-03-23
But you should upgrade to the latest version if possible.