#bando-checkout
1 messages ยท Page 1 of 1 (latest)
ok lemme check
for js what would i format that as
subscription_data: [
{trial_period_days: 7},
],```
like that?
or
subscription_data: {
'trial_period_days': 7
}
second one
Thank you. I'm now onto using Create Subscription.
I was wondering if prices.trial_period_days returns empty if it will cause an error or if stripe will indicate that its empty and not to try to use it?
stripe.subscriptions.create({
customer: 'cus_fdawfa',
items: [
{price: 'price_fwafP'},
],
trial_period_days: prices.trial_period_days
});
Otherwise i have to copy and paste and do an if condition based on if prices.trial_period_days is null
it will cause an error if you don't pass in null / empty for trial_period_days
so i can make trial_period_days return null and it will be fine?
sorry, typo, it will cause an error if you pass in null / empty for trial_period_days
Thanks i figure it out
๐
Do you happen to know the max amount of trial_period_days you can have
The maximum number of trial period days is 730 (2 years).
awesome tysm
have a good night
๐