Samse
Samse

Reputation: 111

Stripe: Send email/notification before a subscription is cancelled at period end

My users can subscribe to a monthly or yearly plan in stripe. When they subscribe to my plan, they can set the flag, that they want to cancel it at the period end (so after 1 month or after 1 year).

Now three (or an variable amount) of days before the subscription is cancelled the customer should receive an email stating, that their subscription will be cancelled and they should remove the flag, so they can still benefit from the plan.

Something like this is integrated for trials with the customer.subscription.trial_will_end webhook. But I didn't find any for subscriptions.

So how would you guys suggest to solve this problem? Or is there a webhook I didn't find?

Upvotes: 2

Views: 2089

Answers (2)

Simon Ness
Simon Ness

Reputation: 2550

For anyone looking for a general event near renewal time then the webhook event invoice.upcoming is what you're looking for. At the time of writing this is documented as:

Sent a few days prior to the renewal of the subscription. The number of days is based on the number set for Upcoming renewal events in the Dashboard. For existing subscriptions, changing the number of days takes effect on the next billing period. You can still add extra invoice items, if needed.

See Subscription Webhook Events for more details.

As @MrColes points out with the accepted answer subscription_schedule.expiring is triggered when using Subscription Schedules.

Upvotes: 0

Samse
Samse

Reputation: 111

There's subscription_schedule.expiring - "Occurs 7 days before a subscription schedule will expire." – Sergio Tulentsev

This worked. Thank you!

Upvotes: 1

Related Questions