#driesvints_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257341859823358054
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello
The Invoice PDF is frozen once it is finalized. That is due to regulatory matteres with how Invoices work.
Here's extra screenshots from the problem. The first one is a generated invoice from Cashier Stripe. "Amount due" is the direct value of amount_due from the Stripe object.
So none of that information changes, regardless of the acutal status of the Invoice
@eager cobalt I don't understand sorry. This hasn't gotten anything to do with the info on the invoice. It's the combination of paid and amount_due that's not expected.
If the info is frozen, then why is it different in the stripe dashboard?
Because the Stripe Dashboard can be dynamic -- it is not dictated by regulatory matters so it does update.
So, if I get that right, the amount due on stripe dashboard is a dynamically computed value?
Yes
If so, how does Stripe determine it? Can it be accessed through the invoice object? And if not, how would you recommend we mimic this behavior?
The amount_due should be returned dynamically via the API as well: https://docs.stripe.com/api/invoices/object#invoice_object-amount_due
Are you not seeing that?
It should only be the actual PDF itself that is frozen
@eager cobalt that's what I'm trying to explain (please see above). amount_due is 1000 for me, not 0 as indicated in the stripe dashboard. See in_1PXhAH4MjUVeuXeNXVXdglQI
It's indeed the value of the invoice pdf
Ah wait I might be wrong and that API value is also frozen. One moment let me double check
Okay yeah sorry, we do not mutate that value in the API either
So you would actually need to calculate this yourself by looking at whether it is paid or not