#geordi
1 messages · Page 1 of 1 (latest)
Yep, you'd use the upcoming invoice API: https://stripe.com/docs/tax/subscriptions#preview-price
It doesn't show tax rate as a percentage, just the amounts?
Or can you expand the tax_rates field or similar?
You'd get it from the tax_rates field on the line item: https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes, but that isn't expandable? I would have to fetch that separately no?
It the full array of hashes should be returned in the preview call, no expanding needed
This is what I receive in the preview
{
"amount": 7497,
"inclusive": false,
"tax_rate": "txr_1JNGiZLLAsLlRiDe4P2lV4Mx"
}
]```
But not the VAT rate given the customer is located in Sweden (25%)
this was the "total_tax_amounts" property of an upcoming invoice request
Ah, that's annoying. API reference implies its fully expanded. Can you expand it?
Ah, you're looking at the wrong field. I sent the tax_rates field on the individual line item objects
Ah yep, the individual invoice line item also has an empty array under "tax_rates"
Hmm, maybe that's not returned for upcoming invoices then. I'm not sure
I guess if you need the explicit % applied then you'll need to retrieve the txr_xxx
haha yep, thanks for your help!