#exxmaxx_
1 messages · Page 1 of 1 (latest)
yes there is a customer.subscription.deleted event at the end of the period when the subscription does cancel
so i dont actually need to just listen to subscription.updated , look at canceled_at and create a cron job to actually cancel it
i can just listen to subsction.deleted, and alter the status of the subscription accordingly
sure
Another question. One user can join into multiple free trials with the same email adress and not sure how is that posible
i got 2 weeks free trials setup in the dashboard. However one user can cancel and then create another one after the trial ends. i thought stripe was supporting that
yes, Stripe doesn't prevent that, if you want to enforce a limitation like that it needs to be in your own business logic
How can i do it though? in the checkout page stripe asks the email address so i dont have a way to control which email address ot add a validation
you can build a web page before the Stripe Checkout page that asks for an email and then not allow them access to Checkout if they already have a Customer in your account with that address. But it's not really practical if using the PricingTable I think
yea, because on the checkout page they will need to enter the email again
recorded user email can be different, then they can use a different email at the checkout page everytime
Hi! I'm taking over this thread.
so i think this should be something to be handled via stripe's api. Maybe with a button at the dashboard, limiting the use of free trial
If you pass a customer that has an email when creating the Checkout Session, then the email will be prefilled and not editable.
I am using the pricing table to Checkout Session is created automatically i believe
https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-customer
If the Customer already has a valid email set, the email will be prefilled and not editable in Checkout. If the Customer does not have a valid email, Checkout will set the email entered during the session on the Customer.
Ah yes with Pricing Table this won't work.
Wait, there's this: https://stripe.com/docs/payments/checkout/pricing-table#customer-email
oh just realized that
okey but then i guess this still doesnt fix the issue about handling the limited free trials
I can do a front-end validation on my end. looking at my own DB and seeing if that user had used a free trial before.
However it is just untidy
There's also this: https://stripe.com/docs/payments/checkout/pricing-table#limit-subscriptions
yes i saw this before
this is only limiting the subscription though. Even after ticking this box you can start a free- trial
twice
just 1 product at a time
but you can create as many free-trials as you want
Yes possible I'm not really familiar with this.
I can do a front-end validation on my end. looking at my own DB and seeing if that user had used a free trial before.
That seems like hte right approach.
I mean it is a bit of a hacky solution i guess
hehe
The best solution would be, if Stripe's API could support this out of the box
Agreed, but we don't support this right now.