koudoku
koudoku copied to clipboard
Freemium Enhancements
In order to use Koudoku with a freemium model (a free account or upgraded pay accounts) we must change Koudoku to support adding a customer without taking a credit card (most customers dont want to provide a CC for a free account). In order for this to work, you need to have a "Free" plan in your Stripe.com account. For our model, we overrode the default Devise confirmations_controller.rb and extended the do_confirm! method to create the free subscription (and create the customer object) at stripe.
def do_confirm @confirmable.confirm! if @confirmable.subscription.nil? subscription = Subscription.new subscription.user = @confirmable subscription.plan = Plan.find_by_name('Free') subscription.save end set_flash_message :notice, :confirmed sign_in_and_redirect(resource_name, @confirmable) end
We had to significantly update the views for our application but thanks to rails engine magic those are easy to override (thanks for rake task to set those up as well!)
It would be great if this could be included by default. A flag on the config that allowed completely free plans to skip the payment form entirely would be needed I think...
I just updated my freemium banch to head. Is there any chance we can get this PR accepted or find out what needs to be done to do so?
Would love an update about freemium plans. Any details on the status of this PR? Willing to assist however I can also - not very experienced but very keen :)
@DaKaZ How is this configured? How do people switch between CC upfront and no CC required?
The implementation I did was very simple. It merely looked for the price of the plan and if it was free, it went ahead and created the account in Stripe WITHOUT the customer's card. If a customer were to switch from a free plan to a paid plan, then your app would need collect the customer's card (via stripe) before switching plans. The original code worked well but candidly the service I built it for has since shut down so I have not maintained the patch. It would not take much to make it current though.
Andrew is the maintainer of the Koudoku repository though, he needs to chime in at some point about this PR and the freemium approach.
--Kaz
On Sun, Jul 26, 2015 at 7:15 PM, yas4891 [email protected] wrote:
@DaKaZ https://github.com/DaKaZ How is this configured? How do people switch between CC upfront and no CC required?
— Reply to this email directly or view it on GitHub https://github.com/andrewculver/koudoku/pull/42#issuecomment-125055783.
+1 to this
+1 from me too
I did freemium work on Payola, glad to it's already in PR here. @andrewculver any chance you can hit merge on this 😀?