Reputation: 395
When a client subscribes to my service, their billing date is the date they subscribed on and every month on that date going forward. Sometimes, a client will ask if their billing date can be changed.
I've followed Stripe's Billing Cycle documentation but it doesn't work as I need it to (or maybe as expected?). Here's what I'm seeing...
If I update a subscription and set prorate
to false
and trial_end
to a date that is earlier than their next subscription renewal, the subscription date does change, but since the new date is earlier the client is effectively getting charged again for the difference in those days. So if today's the 5th, the current subscription renews on the 15th, and I set the new renewal date to the 10th, the client has already paid for the days between the 10th and the 15th but they get another subscription payment starting on the 10th. Hopefully that makes sense; there's basically an overlap.
The inverse is true too. If the date is changed to a date after their next subscription renewal date, the customer effectively gets free days.
I've tried setting prorate
to true
but that seems to just completely refund whatever is left on their current subscription entirely, then sets them up with a free trial until the next date - again free days.
Upvotes: 3
Views: 14570
Reputation: 5428
I think the only way to do it, is adding a trial period to the subscription. You will need to calculate the days between now and the date the customer wants the payment to come out and add that many days as the trial period.
As part of the change date process, you could force them to pay the prorated amount that they are missing before adding the trial, this will make sure they don't keep doing it to constantly push the payment into the future.
Upvotes: 0
Reputation: 3559
I think your best bet is canceling the plan and start new plan, it would make the process simpler. The cancel_at_period_end
flag must be set to false, Stripe will process the proration automatically. Just in case, if it does not work as you expected, you totally can use a coupon depends on situation: For early cancelation (from 15th to 10th, you can apply a coupon for subscription to reduce the unused portion days of customer, it will take effect once time for first cycle). This approach also avoids additional Stripe transaction fee happens between in/out process when you're trying to balance the cost that customer must pay for the update of billing cycle date.
About the cost how much the coupon should be, you can calculate it by the review upcoming invoice API
https://stripe.com/docs/subscriptions/upgrading-downgrading#previewing-prorations
To preview the cost of a proration before changing the customer’s subscription, make an upcoming invoice API call. This endpoint shows what the customer’s next invoice looks like after applying the provided parameters, such as a plan change. In the returned invoice, the invoice items reflect the prorations created by an update.
Upvotes: 0