#bayli0068

1 messages · Page 1 of 1 (latest)

night driftBOT
sonic mirage
#

Can you be more specific? Do you have a Request ID for the requests that you're making? Why are you expecting the amount to be more than 0?

Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

next narwhal
#

Sure thing! I was trying the tax calculation feature from here https://stripe.com/docs/api/tax/calculations/create?lang=cli I ran in my terminal the same example from here but im not sure why Im not getting the same results, instead of getting a tax_amount_exclusive of 148 in my case its 0. I was having the same issue earlier, we want to include the tax calculation feature to our payment process but I was always getting 0, so I wanted to test the same examples from the documentation just to see if its an issue of configuration with stripe or if I was setting the clients adress wrong

sonic mirage
#

Is tax_amount_exclusive showing something other than 0 for that line item in the Dashboard?

next narwhal
#

Im not sure, in which part of the Dashboard can I see it?

sonic mirage
#

Is that part of an Invoice? If so, you can search the Invoice ID in the Dashbaord search bar

next narwhal
#

Well its not an invoice its a taxCalculation object, I searched its id in the search bar but it returned nothing

sonic mirage
#

So that payload in your screenshot came from the creation/retrievable of a Tax Calculation object?

next narwhal
#

Yes thats correct, let me share the whole response object

#

Nvm the text is to long to cpy and paste

sonic mirage
#

All good. How was the Tax Calculation created? Like, where did you get the ID?

#

It's possible to have a Tax Calcuation that essentially does nothing for locations where no tax was necessary, so this all could be entirely expected.

next narwhal
next narwhal
#

I first tested it using random amounts but with real addresses from our clients and all returned 0

#

Then I just tested in the cli the same example form the tax calculation api documentation to see if i would get the same result body as there but its different

sonic mirage
#

I'm so confused about what you're trying to do here.

next narwhal
#

So maybe, I have to first change the configuration from tax settings in the dashboard but im not sure

sonic mirage
#

Can you please try to be a bit more explicit about what you're trying to accomplish and then gibve a step-by-step explanation of what you're doing to accomplish that thing?

next narwhal
#

Okok sorry haha, we already finish implementing a payment process using the PaymentIntent element, now we want to add tax calculations because at the moment its all hardcoded so I saw that tax calculation may be the best approach

#

What I want to do before creating the paymentIntent element its to recalculate the total amount but with taxes

#

And at the moment Im stuck at this point because the calculation is always returning 0

#

So im not sure if Im using the tax calculation feature wrong or if Im missing some tax configuration in the dashboard first

night driftBOT
sonic mirage
#

There's no PaymentIntent Element. Do you mean the Payment Element?

#

Can you give a step by step reproduction of what you're doing?

next narwhal
tight yacht
#

The problem that he is having is that every time he tries to process a payment through Stripe, its not calculating the taxes correctly, if he tries to apply a payment in Alaska, Texas or any state in US it just takes 0 as the value for the tax, maybe there are some missing configurations

#

@sonic mirage ?

sonic mirage
#

Yes, but we still have absolutely zero idea what you're doing. I know what the problem is, as it's been elaborated on extensively, but I still have no idea how you're trying to solve that problem.

Please be explicit and give step by step reproduction steps so we can actually help you.

tight yacht
tight yacht
#

1.-We have a restaurant app.
2.-The app processes payments through Stripe.
3.-Each state has its own base tax rate for restaurant transactions.
4.-We want to implement Stripe tax calculation in our app.
5.-When running tests, we noticed that the base tax is always 0, indicating that the tax calculation might not be working correctly.
6.-We are uncertain about which configurations are missing or causing the base tax to be 0.

#

Is it better now @sonic mirage ?

next narwhal
#

The payment process starts when the user reaches the Checkout page, there the total amount before taxes and location are sent to the node js backend. There we first call the stripe.tax.calculations.create() to get the taxes amount, here we send as parameters the location data and original amount. After that we use the response of that function to get a new total amount with taxes, we then use the stripe.paymentIntents.create() and return the response to the frontend so the user can continue with the checkout.

tight yacht
#

@here?

dull spoke
#

Hi sorry for the delay

#

Taking over for two-shoes

tight yacht
#

Dont worry and thank you for the assistance

tight yacht
next narwhal
#

Thanks! As a general context what we are trying to do is to add tax calculations to our payment process, but we are unsure if we are doing it correctly

dull spoke
#

Ok reading

#

You've added all your tax registrations?

next narwhal
#

Note sure but probably not, what are those? Are those added in the Dashboard?

dull spoke
#

Recommend you read it thoroughly first to understand