#Bryan_13
1 messages · Page 1 of 1 (latest)
I don't create a Subscription, I create a checkout session with mode 'subscription', is it the same functioning ?
Yes, it generates a Subscription object for you.
ok and is there an option to say i don't want to renew ?
i only find the 'cancel_at' key but idk if it's the key that i have to use
If you don't want to renew, you can set the cancel_at_period_end: https://stripe.com/docs/api/subscriptions/create#create_subscription-cancel_at_period_end
You can't set it when creating a Subscription with Checkout, unfortunately, but you can update the Subscription directly after it's created.
ok but i don't understant how can i set the period of 1 year for the subscription when i create the checkout session
what i want is a subscription that is renewed every month but with a validity of 1 year
It all depends on the Price.
oh i see so i set a period of 1 year and i use a price that is renewed every month
it's clear thank you
Not sure this is correct.
If you want your Subscription to renew every month, then you select a monthly Price. If you want to renew every year, you select the annual Price: https://stripe.com/docs/api/prices/object#price_object-recurring-interval
yes that's what i understood thank you very much
Nice. Please, let me know if you have any other questions.
no thank you for your help