#bragma_unexpected

1 messages ยท Page 1 of 1 (latest)

karmic sierraBOT
#

๐Ÿ‘‹ 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.

wind marlin
#

hi there!

olive trench
#

๐Ÿ‘‹

wind marlin
#

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?

olive trench
#

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

wind marlin
#

can you share an Invoice ID (in_xxx) with this issue?

olive trench
#

Sure

#

in_1PyYMkGUavQZ0B3iYoblM6fY

#

The image is the list of events I receive

wind marlin
#

thanks! give me a few minutes to look into this.

olive trench
#

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...

wind marlin
#

what's your end goal here? why do you need to know when it moves to past due?

olive trench
#

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...

wind marlin
olive trench
#

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

wind marlin
#

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

karmic sierraBOT
olive trench
#

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

past depot
#

Hi taking over here. I think keeping track of the due_date on the invoice would be the way to go here

olive trench
#

Yes, I think so... But again, the unpleasant part is to have code to execute periodically to check this

olive trench
#

Well, in any case I got my answer. There is no real "past_due" state, so no event is sent