#Kushal raut
1 messages · Page 1 of 1 (latest)
Here you go: https://stripe.com/docs/billing/subscriptions/trials
i want to give user free subscription for 30 days without any asking for any payment methods.
Yup, that guide tells you how to do that
sure. just to clarify
I will have to follow following steps?
- create a customer
- i might need to create a checkout session with
subscription_data={
"trial_settings": {"end_behavior": {"missing_payment_method": "cancel"}},
"trial_period_days": 30,
},
payment_method_collection="if_required",
(https://stripe.com/docs/payments/checkout/free-trials#section-1)
then do i need to call the create subscription api?
Nope, that Checkout Session will create a Subscription for you
great thank you so while listening for the web-hook which events should i listen to for subscription success and for sending email to user when trial end?
Ah, okay so this has wayyyy more info than I could give you: https://stripe.com/docs/billing/subscriptions/webhooks
If you're using Checkout, then you may want to listen for checkout.session.completed as well
great, thank you @hexed lantern. this is very useful saved so much of my time.