#bragma_unexpected
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/1284126733791924274
๐ 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.
- bragma_best-practices, 3 hours ago, 27 messages
- bragma_code, 3 days ago, 25 messages
- bragma_best-practices, 4 days ago, 10 messages
hi there!
๐
I'm not sure I follow. In your first sentence you said than an invoice.updated is sent. then in the second sentence you say it's not sent. can you clarify the issue?
Ok, first sentence is that I expected to receive an "invoice.updated" event when the invoice transitions from "open" to "past_due"
Second sentence is a statement of what I see, i.e. the invoice object's status changes, but no event is sent
I only receive a "cutomer.updated" event, which is useless for me
can you share an Invoice ID (in_xxx) with this issue?
thanks! give me a few minutes to look into this.
wait, there's no past_due status on Invoice: https://docs.stripe.com/api/invoices/object?lang=java#invoice_object-status
so the invoice iteself didn't change, so it's expected to not receive a invoice.updated event here
Dang! I was in fact seing the same thing!
Ok so how am I expected to actually check if an invoice becomes due?
Ok it seems that the "past due" state is only a badge...
what's your end goal here? why do you need to know when it moves to past due?
I'd like to send a notification (and change some internal states in my DB) when a stripe invoice becomes past due...
What puzzles me is that Stripe has an event for almost everything, but not for this...
the invoice object has a due_date property: https://docs.stripe.com/api/invoices/object?lang=java#invoice_object-due_date
you would need to keep track of it on your end
Yes, it seems there is no other solution... What I don't like is not having to track it (not a problem) but the need to have some code that runs periodically just for this
technically you did recive an even: customer.updated. maybe you could use this to track past due invoices.
by retriving the last customer invoice and checking the past_due date
Yes, I may consider that workaround, but I am unsure. The customer is updated because "delinquent" becomes true. If it is already true, I don't think this will work
Another ugly workaround is to create a subscription with a on one off payment and track its past_due state
Hi taking over here. I think keeping track of the due_date on the invoice would be the way to go here
Yes, I think so... But again, the unpleasant part is to have code to execute periodically to check this
Well, in any case I got my answer. There is no real "past_due" state, so no event is sent