#tvanantwerp_invoice-items-computed
1 messages ยท Page 1 of 1 (latest)
๐ 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/1277659419177648209
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Unfortunately
- We don't know much about how the Dashboard does custom computations
- There isn't super great parity between Dashboard functionality and the APIs.
That being said, can you elaborate on what is not behaving as you expect in the API? Maybe there's another way to get the info you want.
Looking at this Invoice and the single line item, what is the amount you want to get?
What I'm trying to do is to move line item data from Stripe into a line item of a third party accounting SaaS. This SaaS's line items can take values like unit amount, quantity, discounts, and taxes, and will compute a final amount for the line item. I want to make sure that any information I send from Stripe will result in the correct computation so that there's parity between the two systems.
Currently, amount and amount_excluding_tax seem to usually be the same value. I don't seem to have access to a final value for the line item against which to compare. I've only seen this computed_amount from the dashboard workbench.
My goal is to make sure that, in the event of an edge case where the unit amounts, quantities, etc., that I extract don't sum up properly, that I can fall back to sending a correct final computed amount instead of letting the SaaS try and fail to calculate it correctly.
I'm concerned about edge cases where data may be missing or not where I expect it to be. I've commonly seen (and in_1PrmpqB6upHt2yhLAhM1pq9p is a good example) that I'll have discount_amounts and tax_amounts but empty arrays for discounts and tax_rates.
The computed_amount shown there is the amount minus the discount_amounts + the tax_amount.
In these cases your code would need to take those situations into account. Focus on the tax_amounts and discount_amounts properties for individual invoice items. This is where the discounts and tax_rates get applied to the actual amount being invoiced.
Ok. Thank you for the clarifications.
Happy to shed what ๐ก I can ๐