Reputation: 6805
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:
stripe.subscriptions.update([id], {trial_end: [seven_days_into_future]})
. So the billing anchor date on the subscription becomes the 22nd of each month.How do I achieve that?
I cannot set the billing_cycle_anchor
to the desired date because it accepts only now
and unchanged
values...
Upvotes: 1
Views: 1365
Reputation: 622
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
Upvotes: 0