Subscription with trial period in stripe

Hi everyone,

I need some help with Stripe API. I created subscription plans by following Greg’s youtube tutorial and I want to add a 14 days trial period. However this step is not included in the lessons. After doing some reserach I added two parameters in the API checkout session, however I get an error message 400 for a wrong parameter from Stripe. Can someone have a look and help me improve this?

subscription_data[trial_period_days] - value: 14

trial_end - value: now + 14 days

Many thanks in advance:

@superremontbg"now + 14 days" is a text. It’s not a dynamic expression where it will be converted into a timestamp.

Secondly, I’d suggest try getting rid of trial_end parameter altogether as “subscription_data[trial_period_days] = 14” is enough to tell how long the trial will be

thank you! now its working :slight_smile: