vercel / nextjs-subscription-payments

Clone, deploy, and fully customize a SaaS subscription application with Next.js.
https://subscription-payments.vercel.app/
MIT License
5.77k stars 1.18k forks source link

How to set up free trial payment option? #321

Open Akshath-Nagulapally opened 3 months ago

Akshath-Nagulapally commented 3 months ago

Hi, In the db autofill I see a free trial option for any user who is "trialing". This is a very important feature for my app in specific. It is not detailed in the readme.md file how to set up a free trial for any customer before they start using the product so I was wondering how it is meant to be set up?

szymonhernik commented 2 months ago

bump. i think there is lack of coherence between the stripe docs and the template atm. from my understanding you can't set up trial_period_days in Stripe anymore, and the functions in the starter use these values to calculate calculateTrialEndUnixTimestamp. can anyone help to clarify?

Akshath-Nagulapally commented 2 months ago

oh I see. Though that could be true, I tried setting up the stripe trial period and it did work and reflect in the DB. How recent was this change to stripe as I tried doing this 3 days after started this thread.

fullstackwebdev commented 2 months ago

oh I see. Though that could be true, I tried setting up the stripe trial period and it did work and reflect in the DB. How recent was this change to stripe as I tried doing this 3 days after started this thread.

are you saying it works now? was it a missing stripe event or code base?

szymonhernik commented 2 months ago

Here is a step by step guide for you. Hope it helps.

TO DO to add trial