Reputation: 2116
I'm developing an application that uses Stripe, through Laravel Cashier to handle user subscriptions. When the user account is made, It has to be manually verified (has to be done this way due to the business logic) however the subscription starts immediately. Is there a way to pause the subscription, and only start it once each account has been verified? I'm using Laravel 5.
Upvotes: 0
Views: 415
Reputation: 3323
I think something like the following could work:
Create a boolean variable in your "users" table that you could call something like "verify_subscription".
Whenever a new user account is created, set "verify_subscription" to false.
Don't send the subscription off to Stripe (which will pause the subscription) while a new user has their "verify_subscription" set to false.
I can think of two different options at this point: Either create a confirmation email that gets sent to you (instead of or in addition to the user) where when you are ready to unpause the subscription you can click on that link for that particular user which will send the subscription off to Stripe and "unpause" their subscription OR you could create a route with a form where you can look up the user who you would like to unpause and simply search for that user, submit a form that gets processed which does the same thing (unpause the user by sending the subscription off to Stripe).
Hope that gives you some ideas to work with if you haven't already solved this issue!
Upvotes: 1