#justinkennedy10-custom-emails

1 messages · Page 1 of 1 (latest)

vernal pelican
#

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 ?

quasi crescent
#

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.

vernal pelican
quasi crescent
#

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:

  1. I have emails turned off for invoices in my settings
  2. My invoice has auto_advance=true
  3. My invoice has collection_method=send_invoice
  4. days_until_due=<some_number_greater_than_1>
  5. 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).

green lark
#

catching up here one sec

#

I don't think invoice.sent will be sent if you have Invoice emails disabled... thinking about this

proven turtle
#

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.

quasi crescent
#

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

proven turtle
#

Yep, that's what I flagged internally. 🙂

quasi crescent
#

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

proven turtle
quasi crescent
#

Thats fine I'll just wait to look through the v73 changelog

golden glacier
#

@quasi crescent we have no plans to build this though so it wouldn't be in the v73 changelog