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...