Rails : Stripe : Handle 14 days Trial subscriptions

What happens when Trial Period Ends

the customer.subscriptions.trial_will_end event fires 3 days before a trial ends.

When the trial period ends, there will be a customer.subscription.updated event and an invoice.created event. An hour (or so) later, you’ll then either see an invoice.payment_succeeded event or an invoice.payment_failed event. From those, you’ll know whether the payment went through or not.

You might also consider implementing the customer.subscription.trial_will_end webhook, this webhook will be sent three days before the customers trial is going to end and will allow you to send the customer a notification to update their payment information.

This way if the user does decide to go and update their payment information, Stripe will be able to take payment as soon as the customers trial has ended and they will be able to continue using your service without interruption.

Also, you might not have noticed, the

During Trial

"current_period_end": 1455808850
"current_period_start": 1455808791,
"status": "trialing",
"tax_percent": null,
"trial_end": 1455808850,
"trial_start": 1455808791


After Trial ends

"current_period_end": 1458314450,
"current_period_start": 1455808850, # Same as 'current_period_end' before
"status": "active",
"tax_percent": null,
"trial_end": 1455808850,
"trial_start": 1455808791






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s