Reputation: 360
I've been reading the Stripe API docs but I haven't found a clear answer to this to maybe somebody knows. I have Stripe subscriptions for customers that they pay for upfront for a year. I'd like to offer them the option to renew their subscriptions for another year before their expiration day (up to 60 days before hand). Can the currently active subscription be set to extend for an additional year (ending on the same expiration date, just a year later) without having Stripe automatically renew it? Thanks!
Upvotes: 4
Views: 2175
Reputation: 3268
We plan to set a custom metadata property, notify-days-before-renewal
, on the Stripe subscription that will specify the number of days prior to the renewal that we will send a renewal notice.
But there are two challenges here: (1) Stripe won't act on this metadata value itself, so we've got to set up something ourselves. (2) Stripe does not have a concept of "contract term", only billing frequency. For example, if you have an annual contract that bills monthly, Stripe sees this as a monthly contract.
For (2), we have customers we bill both monthly and annually, however only our annual customers require custom advance renewal notices. That means we can assume that the next billing data is also the contract renewal date.
For (1), we'll be using a Zapier zap that runs every 24 hours. The zap will get a list of all subscriptions and for each subscription, look up the notify-days-before-renewal
property and the next billing date. It will then compute the number of days between today and the next billing date, and if that number is exactly equal to notify-days-before-renewal
, then it will send an email notification to the customer's billing email address.
I think the real solution here is to track a customer's contract term as a first-class concept, which Stripe will hopefully support in the future. Then ideally Stripe will give allow us to set per-subscription webhooks X days before the subscription renews.
Until then, this hacked solution is the best we could come up with.
Upvotes: 1
Reputation: 402
Our solution was to use Subscription schedules and a webhook that is trigger on phase changes. So we put the end_date of the phase 1 month before the end of the current subscription. So when the webhook will notice the phase changes we can get the subscription on the month before and set the de billing_cycle_anchor to now for the subscription.
Upvotes: 0
Reputation: 8727
There's no direct way to do this, but what you could do is create an Invoice to take the payment, and then create a Customer Balance Transaction to store the 'credit' so when their renewal comes up, the balance is zero due to the credit.
Upvotes: 1