⚡ Solution Summary

  • TaxRate.list does not return inline TaxRates created by Stripe Tax
  • Use TaxRate.retrieve to access valid tax rates
  • This behavior is consistent with other APIs in Stripe
  • For further integration support, contact Stripe support.
### Describe the bug Calling `stripe.TaxRate.list` returns 0 records, however if I already have an id I can look it up with `stripe.TaxRate.retrieve` and get a valid record back. ### To Reproduce 1. Create an invoice (with automatic taxes from Stripe Tax enabled) 2. Look up the tax_rate_id from that invoice using the invoice retrieve API (in the "total_tax_amounts" column) 3. Call stripe.TaxRate.retrieve and see a valid response 4. Call stripe.TaxRate.list and see that no tax rates are returned. ### Expected behavior If there is a valid tax rate that I can retrieve then I would expect it to appear in stripe.TaxRate.list ### Code snippets ```Python res = stripe.TaxRate.retrieve('txr_1PUrVyIO11dAjf9NNO46SkIF') print(res) # This returns a valid record res = stripe.TaxRate.list(limit=100) print(res) # This does not ``` Response from TaxRates.retrieve ``` { "active": false, "country": "US", "created": 1719153334, "description": null, "display_name": "Sales Tax", "effective_percentage": 7.5, "id": "txr_1PUrVyIO11dAjf9NNO46SkIF", "inclusive": true, "jurisdiction": "Ohio", "jurisdiction_level": "multiple", "livemode": false, "metadata": {}, "object": "tax_rate", "percentage": 7.5, "state": "OH", "tax_type": "sales_tax" } ``` Response from TaxRates.list ``` { "data": [], "has_more": false, "object": "list", "url": "/v1/tax_rates" } ``` ### OS macOS ### Language version Python 3.12.4 ### Library version 10.1.0 ### API version 2024-04-10 ### Additional context _No response_

Discussion & Fixes

remi-stripe 2024-07-12
@AGPapa ithub issues are limited to bugs and feature requests with the SDK itself. This is more an integration support question about our API which is better directed at our support team: https://support.stripe.com/contact To unblock you though I can explain the behaviour. Stripe Tax will create inline TaxRate that it uses to represent the tax information it calculates. Those TaxRates exist in the API and can be retrieved but they won't appear in the List TaxRates API because you didn't directly create them. We have this behavior on other APIs such as when you create an inline Price with `price_data` and it doesn't appear in the List Prices API. I hope this clarifies the issue but if you have any follow up question please work with our support team for further help: https://support.stripe.com/contact

Get updates

We publish verified fixes weekly. No spam.

Subscribe