#twiddlecoding
1 messages · Page 1 of 1 (latest)
hi! hmm, what is a lifetime plan exactly, what requirements do you have for it?
The requirements is that users can pay a one time fee and get access to the service for ever.
I see. So wouldn't that just be : process a one-time payment, then mark some "has_paid_for_a_lifetime_access"=true boolean in your application's database(which you then check as part of your login functions and access control)?
if you really want to tie this to a Stripe subscription for some reason, it is possible to subscribe a Customer to a Price with amount:0 for a $0 subscription that just recurs forever. You could process a one-time payment and then create such a subscription, or you could change the Price on an existing paid subscription to be this special $0 Price.
I would like to use the one time payment solution. It’s no problem to implement this. The problem is that it doesn’t support a trial period.
That is why I am asking developers what their implementation looks like.
It’s great to be able to have the user put their payment information in, start the trial period and then charge the user if they didn’t cancel during the trial period.
I would like to have that same functionality with the lifetime access plan.
sounds good! there's lots of ways to implement this in Stripe really
the 'easiest' is to use Checkout with Subscriptions (https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=stripe-hosted) and you can set a trial period and specify to collect the payment information upfront. Then when you detect the trial has ended and the first payment happened via your webhooks, you move the subscription to a $0 Price. But not really perfect since the messaging in Checkout will not indicate that it's a lifetime subscription. But that's one way
so you're probably better off just implementing the logic directly yourself instead I would say
by which I mean
- use Elements+SetupIntent, collect payment details. Message to the customer what it's for and when they'll be charged. https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
- on your server, implement a "trial" with e.g. a cron job or so on so that you know when you need to attempt the payment.
- when that time comes, charge the saved payment method from the first step : https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements#charge-saved-payment-method
- if that payment succeeds, set something like that
has_paid_for_a_lifetime_accessboolean or whatever.