Fun fact. When working with Stripe API, you come across a ton of unnecessary empty fields. When you just want to get the same information as on the payment page, you have to study a bunch of nested objects.
The calculated amount of VAT for the current payment, for example, you will not receive anywhere at all! This is the official answer from support. This information is simply not available anywhere, all you can do is subtract the paid amount from the cost of the product.
Great architecture, great docs page, great articles. But awful experience in real life.
Thanks for the feedback! Can you provide examples of unnecessary empty fields? I'd like to flag those to the team.
It's true that you can't get calculated VAT directly from a PaymentIntent, we actually recommend that you store the Tax Transaction ID as metadata on your PaymentIntent so you can retrieve it later.
In your case however it appears that you're using Checkout Sessions, where you can get the tax amount after the fact, although you'll need to expand the breakdown field to get the details.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Fun fact. When working with Stripe API, you come across a ton of unnecessary empty fields. When you just want to get the same information as on the payment page, you have to study a bunch of nested objects.
The calculated amount of VAT for the current payment, for example, you will not receive anywhere at all! This is the official answer from support. This information is simply not available anywhere, all you can do is subtract the paid amount from the cost of the product.
Great architecture, great docs page, great articles. But awful experience in real life.
Thanks for the feedback! Can you provide examples of unnecessary empty fields? I'd like to flag those to the team.
It's true that you can't get calculated VAT directly from a PaymentIntent, we actually recommend that you store the Tax Transaction ID as metadata on your PaymentIntent so you can retrieve it later.
In your case however it appears that you're using Checkout Sessions, where you can get the tax amount after the fact, although you'll need to expand the
breakdownfield to get the details.