#Ankoro
1 messages · Page 1 of 1 (latest)
Hi there!
So you want the subscription to automatically cancel after a specific number of billing cycles?
Yep that it
For the moment I create the sub and after whith webhook I update it and set the cancel_at to date + 3 months but its not equal to 3 cycles
I think its not a good way
Yes I think that's the best option. I don't see a way to set cancel_at directly when creating the Checkout Session.
Ok but Can i set a number of cycles to cancel_at, because a timestamp in PHP its weird
No that's not possible on the subscription object itself, but you could do that with subscription schedules:
- First create a subscription schedule with your existing subscription
- And then set the number of
iterationto 3.
You can learn more about this here: https://stripe.com/docs/billing/subscriptions/subscription-schedules
Thanks you for your help, I will look at this !
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!