Stripe annual billing but different set of months - stripe-payments

I want to bit a customer on an annual basis but the billing should happen between August current year - July of the next year. Can this be done via webhooks or some other method on Stripe ?

You can update the subscription with the trial_end parameter to choose the next billing date (and prorate set to false).
When the "trial" ends, a new billing cycle will start and Stripe will attempt to bill the customer for the plan's amount.
More info about this: https://stripe.com/docs/subscriptions/billing-cycle#api

Related

How to give discount on new Stripe subscription?

We have a free subscription concept separate from Stripe. When a user signs up for a paid subscription we want to charge them immediately but still honor any remaining free-period.
I know I can use trial period to delay the start of the Stripe subscription, but we wanted to charge immediately to confirm valid credit card details. Is it possible to give a discount on a new subscription instead, to account for the users remaining free-time?
For example, if
today is the 1st
user has free subscription until 15th
monthly subscription is $10
I would like to charge them $5 today and immediately begin their subscription in Stripe with a Stripe renewal on the next 1st.
Easiest way to do this is to add an invoice item for the amount you want to charge and set a trial period until you want the renewing charge to occur (so in your example you set a trial_end for the next 1st of month). This will generate an initial invoice with the invoice item and then set your recurring payment as you desire.

Stripe subscription set billing date as first of each month

I'm using Stripe Checkout flow to collect the users' payment details and automatically collect the subscription. I have also implemented webhooks to listen to checkout.session.completed so that I can edit the subscription. What I want is as follows:
Say, the user registers on January 15th. I'm using metered billing, so the user pays $0.00 on the first invoice.
In webhooks, I apply a trial period of 7 days to the subscription like so stripe.subscriptions.update([id], {trial_end: [seven_days_into_future]}). So the billing anchor date on the subscription becomes the 22nd of each month.
However, I would like to set the billing anchor date as the first day of each month. So I would like the user to receive the first invoice for January 22-31 (prorated), and then get invoices for full calendar months onwards.
How do I achieve that?
I cannot set the billing_cycle_anchor to the desired date because it accepts only now and unchanged values...
If you're working with already created subscriptions, then you'll need to add trial periods to shift the billing_cycle_anchor:
https://stripe.com/docs/billing/subscriptions/billing-cycle#using-a-trial-to-change-the-billing-cycle
If you know exactly how you want to structure your trial and billing_cycle_anchor at the time the subscription is being created, then you can future-date the billing_cycle_anchor during creation:
https://stripe.com/docs/billing/subscriptions/billing-cycle#new-subscriptions

Pausing and unpausing a payment collection on stripe

I'm working on stripe subscription and trying to build a flow using which admin can pause and unpause the payment collection of customers.
To achieve this I'm using this from stripe documentations.
Now the major issue which I'm facing with this method is.
Suppose a customer is on monthly subscription and is billed on 1st of every month.
Admin has paused the customer's billing on 15th October and Unpaused it on 15th November.
Now the upcoming invoice shows that customer will be billed on 1st December for the upcoming cycle.
My questions are:
Is there any way I can charge customer for the period of 16th-30th November which customer used.(Somehow adjusting amount on the 1st December invoice)
And the period of 16th-31st October, for which Customer has already paid on 1st October, can be uncharged/adjusted somehow.
Thanks
Instead of pausing, which does not take into account prorated amounts or credits, I recommend canceling the Subscription instead of pausing it. You can use the prorate parameter when canceling Subscriptions to issue a credit to the Customer for the unused time.
Later, when you want to resume payments, create a new Subscription for the Customer and specify a billing_cycle_anchor set to the first of the month. That will charge them for the partial month up front followed by full monthly Invoices starting on the first of every month.

Stripe - after changing plan, don't bill for the new subscription until current cycle ends

I want to let user to change their subscription plan. However, they won't be refunded after switching. If i set the prorate to false, stripe will bill for the new subscription right away.
For example, if the user is subscribed to a yearly plan in Jun 2018, and wants to change to monthly in Oct 2018. They will be charged with monthly plan after Jun2019, as current cycle hasn't ended yet.
How can I do with stripe api when i am updating the current subscription?
in the stripe api docs (https://stripe.com/docs/api/subscriptions/update)
"if you set prorate to false when switching between different billing intervals (monthly to yearly, for example), we won't generate any credits for the old subscription's unused time—although we will still reset the billing date and will bill immediately for the new subscription."
In 2019 Stripe shipped support for Subscription Schedules which allow you to control multiple sequential phases on a Subscription. You can read more about this in the docs: https://stripe.com/docs/billing/subscriptions/subscription-schedules
With this API, you can now explicitly schedule a future change of a Subscription. The idea would be to use the Create SubscriptionSchedule API a schedule from your Subscription and plan a second phase to move the Subscription to the new price on the next billing cycle.
Past answer, which still work but less optimized:
One solution for this would be to follow those steps:
Mark the current subscription to cancel at the end of the current period so that you don't attempt to charge that customer again.
Create a new subscription to the monthly plan but put the customer on a trial period until the end of the current subscription (June 2019 in your example). This allows you to not charge him until the other subscription ends so that you switch the customer to the monthly plan as expected.

Stripe Start Date

How do you set the start date for a subscription? Many of our customers began using our service a few days before we could collect their payment information so we'd like to charge them for these additional days.
This is not something that the Subscriptions API supports today. You would need to charge your customer the full amount and then put them on a trial period until their next billing date.
The flow would look like this:
Create a Customer with the card token
Create an invoice item for the plan amount
Create a subscription and set them on a trial period until their next billing date using trial_end
The last step will create an invoice for the trial, automatically pull the pending invoice item into the invoice and charge the customer for that amount. Then, they won't be charged until the date you set in trial_end and each month moving forward on that date.

Resources