#justinkennedy10-custom-emails
1 messages · Page 1 of 1 (latest)
One of the places Test mode and Live mode do differ is on what emails are sent.
Looking in to what to listen for here...
I think invoice.finalized may also be appropriate. Do you have considerations for listening to sent over finalized ?
Well I really want to send a custom email to the recipient when the invoice is actually due (for example, 60 days from when it was created). If I use the invoice.finalized event, I would end up sending the email a couple hours after it was created (because I am using auto_advance, if auto_advance=false, I would receive the event whenever I call the finalize_invoice API manually).
For this reason, I think I must use invoice.sent because it is the only one that gets sent when the invoice is due (I think)
I understand that the actual sending of emails differs between Live and Test mode, but surely I would imagine both modes would send the invoice.sent event, so the integration could be tested properly.
That makes sense. Unfortunately the Test mode behavior can be tricky with emails specifically. One other event I can think of would be invoice.upcoming which you can configure to be sent X days before a payment is due. https://stripe.com/docs/api/events/types#event_types-invoice.upcoming
invoice.upcoming will not work because the invoice won't have even been created yet (and I am not using Stripe Subscriptions)
It is almost like Stripe is missing an event: invoice.due that gets sent once when the Invoice becomes due.
Would you be able confirm that this reliance on invoice.sent will indeed work in Live Mode? Again the restraints are:
- I have emails turned off for invoices in my settings
- My invoice has auto_advance=true
- My invoice has collection_method=send_invoice
- days_until_due=<some_number_greater_than_1>
- live_mode=true
And I want to receive an invoice.sent event when the invoice becomes due (for example, 60 days after it was finalized).
catching up here one sec
I don't think invoice.sent will be sent if you have Invoice emails disabled... thinking about this
Hello! I looked around internally and it appears this is an outstanding feature request, so I don't think it's possible to be notified when the Invoice becomes past due today.
I added details about your use case to the feature request internally, but there's no ETA for implementing this.
@proven turtle I think at the very least the public documentation should be updated, seems like gap in the docs. And ok thank you for adding my use case, if it helps, my ideal solution is to have an invoice.due event sent once when it is due.
Yep, that's what I flagged internally. 🙂
Any chance you can update my email (justin@vendrive.com) when it gets on the roadmap (we will have to build our own cron job that figures out when invoices are due)
Thanks so much for clarifying
If you'd like to receive updates about this I recommend you write in to support with your feature request: https://support.stripe.com/contact/email
Thats fine I'll just wait to look through the v73 changelog
@quasi crescent we have no plans to build this though so it wouldn't be in the v73 changelog