How to email customers before their Stripe trial ends
Stripe sends an event three days before a trial ends. Send Stripe's own reminder, handle the event yourself, or let Kicklace write and send the email.
The short answer
Stripe fires an event called customer.subscription.trial_will_end three days before a trial ends. That is the default, set by the Trial ending events setting in the Stripe Dashboard, and if the trial is shorter than that the event fires straight away. Stripe can also email the customer itself, seven days before a free trial ends.
You have three ways to get an email out: turn on Stripe's reminder, handle the event in your own code, or connect Stripe to Kicklace and let it write and send the email in your voice.
The plain way
Stripe's own reminder. In the Dashboard, under Email notifications and customer management, turn on "Send a reminder email 7 days before a free trial ends". It uses your Stripe branding and links to a page where the customer can update their payment method. It is one switch, but the words are Stripe's.
Your own webhook.
- Add a webhook endpoint in Stripe that listens for
customer.subscription.trial_will_end. - Check the signature on every request. Stripe signs each one in a
Stripe-Signatureheader and needs the raw body untouched. - Return a 2xx fast and send the email after. Stripe can deliver an event more than once, so keep the event ids you have handled.
const event = stripe.webhooks.constructEvent(rawBody, signature, endpointSecret);
if (event.type === "customer.subscription.trial_will_end") {
const subscription = event.data.object;
// look up subscription.customer, then send your email
}
Stripe's own advice for this event is to check that the customer has a payment method on file, and optionally to tell them they will be charged. If you turn on both its reminder and yours, customers get two emails.
With Kicklace
- Go to Settings → Connections → Stripe → Connect. It asks for one restricted key. In Stripe, create one with Write on Webhook Endpoints and Read on Customers, Subscriptions, Invoices, PaymentIntents, Products and Prices.
- Paste it and press Connect. Kicklace adds its own webhook, called Kicklace, to your Stripe account and keeps the secret Stripe hands back. The key is locked away and never shown again.
- Stripe's
customer.subscription.trial_will_endnow lands in Kicklace as a trial ending, three days before it does. Kicklace finds the person by the email Stripe holds for the customer. - On your Lifecycle map, add a side road that starts from a trial ending. The first-run setup offers side roads like this, and the + at the top adds one later.
- Write the email, or let Kicklace write it from your site. An email with no words yet has Write it for me.
- Switch the sequence on. First Kicklace shows who would have got it over the last 30 days. Send yourself a test before you do.
A trial ending is an account email. It goes unless the address bounced or the person complained. Kicklace only reads Stripe: it never charges anybody or changes a customer, a price or a payment. Payments from Stripe has every event it hears. See it on your own site in the demo, with no sign-up.
What the email should say
Say when the trial ends, what happens next, and how to stay or leave. Be as clear about cancelling as about continuing.
Subject: Your trial ends in three days
Hi {{first_name}},
Your [your app] trial ends on [date]. After that, your card is charged [price] unless you cancel first.
If you want to keep going, there is nothing to do. If not, you can cancel on [your billing page] and you will not be charged.
Is something missing, or not working the way you hoped? Reply to this email. I would like to know.
[Your name]
Fill the brackets with your own details. The same idea, as a ready-made email, is in the trial ending email template.
FAQ
What if the trial has no card up front?
Then the email's job is to ask for one. Stripe lets you choose what happens when a trial ends without a payment method: it can create an invoice, cancel the subscription, or pause it. Tell people which, and when.
What if my trial is not in Stripe?
Kicklace hears trial endings from Stripe. If your trial lives in your own database, post an event of your own from a daily job, such as kl.track("trial_ends_soon", { email }), and start a side road from it. Events covers names of your own.
What does it cost?
Kicklace is free up to 1,000 contacts, sending from its own address with your name on it. Your own domain is part of Starter, $25 a month. See pricing. Failed cards are next door: emailing a customer when a Stripe payment fails.
Free up to 1,000 contacts.