#sanderfish

1 messages ยท Page 1 of 1 (latest)

cedar bluffBOT
hoary haven
#

Hi there, the retrieveUpcoming would return an invoice object, and you'll find all invoice properties, including default_tax_rates in that invoice object

urban willow
#

I thought that, but the default_tax_rates endpoint comes back as an empty array

#
{
  ...
  "default_tax_rates": [],
  ...
  "tax": 609,
  "total": 3509,
  "total_discount_amounts": [],
  "total_excluding_tax": 2900,
  "total_tax_amounts": [
    {
      "amount": 609,
      "inclusive": false,
      "tax_rate": "txr_1Njyy8J7i86GeQKl3UTiQFCT",
      "taxability_reason": "standard_rated",
      "taxable_amount": 2900
    }
  ],
  ...
}
hoary haven
#

can you tell me what you want to achieve here? do you want to set a default_tax_rates when retriving an upcoming invoice?

urban willow
#

In our checkout flow, I want to display the tax type (sales tax, vat, gst etc), percentage and resulting tax amount

hoary haven
urban willow
#

Sorry if that's confusing, it doesn't have to be from default_tax_rates, but that's what I found in the API docs

#

I was looking where Stripe returns the tax_type and percentage

#

but I thought I wouldn't need to use the tax calculation endpoint when using automatic tax on subscriptions

hoary haven
#

Hmm, I think you want to expand the total_tax_amounts.tax_rate? the information that you want to get can be found in the tax_rate object (txr_1Njyy8J7i86GeQKl3UTiQFCT)

urban willow
#

Ooooooh YES

#

that's it! I didn't see it was expandable

#

thanks ๐Ÿ™