#chip-subscription-trial
1 messages ยท Page 1 of 1 (latest)
Hi ๐
How do your customers "apply for a trial period"?
Sorry, "apply" was bad wording. I mean that they just start the trial
and we use the stripe node sdk
Okay, so it's your code that creates /updates the Subscription.
I would hope I could something when we create the checkout session
const checkoutSession = await stripe.checkout.sessions.create({
customer: customer.id,
mode: 'subscription',
line_items: [
{
price: priceId,
quantity: 1,
},
],
success_url: 'http://localhost:3000/profile/billing',
cancel_url: 'http://localhost:3000/profile/billing',
subscription_data: {
trial_period_days: 14,
},
});
this is all that happens now
Okay so you would need to determine if they have previously had a free trial and dynamically adjust the trial_period_days parameter
Right, so I can just list the subscriptions from a customer then, and check if there are any, cancelled or not?
using the status=canceled
good to know
thanks
Happy to shed what ๐ก I can ๐