#stephen-crosby_api

1 messages ยท Page 1 of 1 (latest)

crisp elbowBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1419761075469029428

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

sly steppe
#

Here the tax rate appears
Stripe::TaxRate.retrieve('txr_1N5pC7B8wovMzpKJJfCTx8g4')
=> #<Stripe::TaxRate:0x3f82c id=txr_1N5pC7B8wovMzpKJJfCTx8g4> JSON: {
"id": "txr_1N5pC7B8wovMzpKJJfCTx8g4",
"object": "tax_rate",
"active": false,
"country": "BR",
"created": 1683633543,
"description": null,
"display_name": "",
"effective_percentage": 0.0,
"flat_amount": null,
"inclusive": false,
"jurisdiction": "Brazil",
"jurisdiction_level": null,
"livemode": true,
"metadata": {},
"percentage": 0.0,
"rate_type": null,
"state": null,
"tax_type": null
}

#

But here it does not:
Stripe::TaxRate.list
=> #Stripe::ListObject:0x3f8f4 JSON: {
"object": "list",
"data": [
{"id":"txr_1CLEitB8wovMzpKJLuiB77P3","object":"tax_rate","active":false,"country":null,"created":1524766899,"description":null,"display_name":"Tax","effective_percentage":null,"flat_amount":null,"inclusive":false,"jurisdiction":null,"jurisdiction_level":null,"livemode":true,"metadata":{},"percentage":0.0,"rate_type":"percentage","state":null,"tax_type":null}
],
"has_more": false,
"url": "/v1/tax_rates"
}

south fable
#

Hello
The tax rate is most likely in-active

#

Ah you see the active: false ?

sly steppe
#

I do, but the one that appears when I run 'list' is also active: false

south fable
sly steppe
#

sure. here is one with active: false:

Stripe::TaxRate.list(active: false)
=> #Stripe::ListObject:0x3f944 JSON: {
"object": "list",
"data": [
{"id":"txr_1CLEitB8wovMzpKJLuiB77P3","object":"tax_rate","active":false,"country":null,"created":1524766899,"description":null,"display_name":"Tax","effective_percentage":null,"flat_amount":null,"inclusive":false,"jurisdiction":null,"jurisdiction_level":null,"livemode":true,"metadata":{},"percentage":0.0,"rate_type":"percentage","state":null,"tax_type":null}
],
"has_more": false,
"url": "/v1/tax_rates"
}

RequestID: req_YSlR0bYFVW9NEO

#

I just need a list of all the tax rates archived or not, so if you know a better way, I could use that

south fable
#

The other reason this one might be hidden from the API is if maybe it was created by an invoice for temporary use or something..

Not 100% sure about that theory, let me check though

sly steppe
#

fwiw it is also hidden from the UI, but I can still find it if I search for that ID

south fable
#

Gotcha. The recommended way to retrieve all tax rates is to use the List API but I'm still looking into why that specific one doesn't show.

The behavior you've described is usually seen when the associated object has been deleted but I don't think you can delete the Tax Rates using the API so it has to be associated with a temporary object like a Preview invoice or something.

Can you share more about where exactly you found this tax rate?

sly steppe
#

Its linked from an invoice via invoice.total_tax_amounts

south fable
#

Can you share the invoice ID?

sly steppe
#

I don't have that at the moment

south fable
#

Ah It'd be helpful to look at the invoice too so if you can find the invoice ID, it'd be most helpful.

I do see that the tax rate wasn't created by you/your integration via the API so I'm more confident in it being associated with a temporary Invoice (in which case, it missing from the List API is expected)

sly steppe
#

ok i think i have an idea of what i need to do. thanks

south fable
#

Sounds good!
Happy to help ๐Ÿ™‚