#invoice-tax
1 messages · Page 1 of 1 (latest)
Hey @teal zephyr, i don't found any invoice ID with more then one invoiceTaxAmounts; i just wondering why InvoiceTaxAmounts is an array which can theoretically hold more then one item
(stripe-go)
The API reference highlights this:
The aggregate amounts calculated per tax rate for all line items.
So I guess if your invoice has multiple tax rates, then the array would contain multiple objects
Hey, thats what i saw too but how can have one item multiple tax rates? 😄
one item => one tax rate or do i miss something here?
Well you could have multiple items, each have their own unique tax rate
this is what i mean:
type InvoiceLine struct {
// The amount, in %s.
Amount int64 `json:"amount"`
// The amount of tax calculated per tax rate for this line item
TaxAmounts []*InvoiceTaxAmount `json:"tax_amounts"`
// The tax rates which apply to the line item.
TaxRates []*TaxRate `json:"tax_rates"`
}
There are no "multiple items" - its about one line item
I just try to understand why its designed like that
You can set multiple tax_rates per invoice item: https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-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.
Alright thanks ❤️