#tomas at amenitiz
1 messages ยท Page 1 of 1 (latest)
Hello, do you have a request ID (req_123) from when you got that error?
You should be able to look up tax rates with that call. Are you using connect here? That error often comes up from trying to look up an object on a different account from the one it was created on.
req_BJXyqIsC243Tfd for the error itself,
req_NH3KBQrrII7mga for the succesful GET that returned that ID.
I also tried with expand: ['total_tax_amount.tax_rate'] but apparently that field cannot be expanded.
What's weird is that I'm running this as part of some tests, and with my former dataset it was working without issues; so I'm confused wether this is some intended behaviour of Stripe Tax I'm not completely understanding
Thank you, checking in to those requests.
Ah I see, I missed the "upcoming" angle before ๐คฆโโ๏ธ . Checking in to whether it is possible to retrieve that info. I wonder if those objects are temporary (and I really hope they aren't)
Thanks, that's my suspicion too, but given I managed to retrieve them successfully before it seems rather erratic. Is it possible I'm being rate limited somehow due to being a test environment?
Interesting, we do say that the tax rate on invoice items are expandable. https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_amounts-tax_rate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So are you using this method and it errors out saying it isn't expandable? https://stripe.com/docs/api/invoices/upcoming_invoice_lines
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, I'll send a request like that and give you the ID
I think I see it...
I'm sending
expand: ["total_tax_amounts.tax_rate"]
but total_tax_amounts is an array, I want the tax_rate of the first element, not of this object
Oh I see, so that would be in this field basically? https://stripe.com/docs/api/invoices/upcoming_invoice_lines#upcoming_invoice_lines-invoice_items-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.
customer: customer,
subscription_items: [{
price: "asdasd",
quantity: 99,
}],
automatic_tax: { enabled: true },
expand: ["total_tax_amounts.data.tax_rate"]
})
So evidently it does not like this syntax (req_XQDft7ikLcfZCD) , do you have any advice on how to expand on this type of array, if possible?
...
"total_tax_amounts": [
{"amount":0,"inclusive":false,"tax_rate":"txr_EfimerousTaxRate"}
],
...
Thanks btw ๐
https://stripe.com/docs/api/invoices/object#invoice_object-total_tax_amounts
This is the element I'm trying to expand; not sure how to check if it's actually expandable
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hi there. Taking over for Pompey. Give me a minute to catch up
Hm this might be due to api version
Can you try first passing total_tax_amounts.tax_rate instead (without data)?
Then we can go from there
I'll send it to you
And another thing, can you try the request again, expanding with expand: ["total_tax_amounts.data.tax_rate"] but manually setting the api version to 2022-08-01 , as is shown here: https://stripe.com/docs/api/versioning?lang=ruby
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
On it
"error": {
"message": "This property cannot be expanded (total_tax_amounts.data).",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_bWl4HFO7zZOUhK?t=1668616998",
"type": "invalid_request_error"
}
}```
Sorry for the delay ๐
Aw darn I was hoping the API version would help here. Thanks for trying, looking in to this further