#gracine

1 messages · Page 1 of 1 (latest)

peak magnetBOT
fervent forge
#

hello, what do you need help with?

also are you a developer writing a Stripe integration?

sharp plover
#

yes i am a dev

#

I need to write a script to convert existing users in our db to Stripe subscription

#

I just want to know if I am doing the right thing

#
  • I have existing users that are considered premium for 1 year by default
#
  • I have to select their subscription start date, add 1 year and create a Stripe subscription that will end up at this specific date (for each users)
#

My plan is the following

#

1 - For each user, create a new coupon on the fly with 100% free discount

#

2 - Create a Stripe customer matching my user, setting the email + coupon on it

#

3 - Create a Stripe subscription with a period start of NOW and a period end of the user's creation date (in our db) + 1 year

#

My issue is at #1 where I cannot create a coupon for a duration of days

#

i wanted to match my billing period, which will be custom per user depending on their creation date

fervent forge