Software as a Service Rails Kit
Write your app. Not billing code.
Are you starting to build a new web service with Ruby on Rails? Do you want to avoid having to write the subscription management, recurring billing, and credit card management code?
The SaaS Rails Kit gets your new software-as-a-service site off to a running start by providing you a well-tested and proven recurring billing system with credit card payments. You also get a framework for building membership-based applications, including account signups/upgrades/downgrades, tiered pricing levels with customizable limits (e.g, # of users, # of projects, etc.), multi-tenant data security in a single database, and more.
- Stripe (Easiest PCI Compliance -- Credit card info never hits your server)
- Authorize.net (CIM)
- Payment Express (non-US merchants)
- Any other gateway supported by ActiveMerchant (if you write the code to store the credit card info)
3 Jan 2014: Added support for Rails 4
Choose your license based on your development needs. All licenses come with full source code. They are not limited to a set number of developers, but they are limited based on the number of sites you want to build. A “site” is one web application served from one domain, such as example.com.
The license is a one-time fee. You don’t need to pay yearly, per developer, or per server.
Not sure whether you are going to build multiple sites at this point? You can always buy the Single Site License now and get a discount equal to the cost of the Single Site License on a purchase of the Multiple Site License later.
Single Site License
Suitable for developers building a single hosted web service. If you’re a startup building one product, this is the license for you. You can use the SaaS Rails Kit - Single Site License as the basis for one subscription-based site.
Multiple Site License
This license is intended for companies / developers that are building multiple subscription-based services. This would be suitable for companies offering a suite of products, like 37signals, or independent consultants and agencies building solutions for clients. You can build multiple products with the SaaS Rails Kit - Multiple Site License.
By purchasing a license you are agreeing to the license agreement
- Supported gateways: Authorize.net CIM, Braintree, Payment Express, Stripe, and TrustCommerce, all via ActiveMerchant
- No local credit card storage. All credit card information is stored with the payment gateway, so you don’t have to worry about the PCI implications of storing credit card numbers.
- Automated billing script runs nightly for anniversary billing.
- Configurable subscription renewal period (defaults to one month).
- Automated notification and retry of failed renewals.
- Free accounts and one-month trials are supported.
- Optionally collect payment information for paid accounts at account creation.
- Optionally collect setup fees, if you collect payment info up-front and don’t have a trial period.
- Easy customization of plan levels — pricing and custom limits.
- Ability to tweak limits and fees per account.
- Self-serve account creation.
- Self-serve account upgrades and downgrades, with limit checking to prevent downgrading to a plan for which the account does not qualify, based on the plan limits.
- Account lookups by subdomain (multi-tenant).
- Ability for users to reset their own passwords (Forgot your password?…)
- Uses the inherited_resources gem to easily scope all model access to the current account.
- Comes with a limit on the number of users each account can have, complete with controller code, as an example of how to implement limits.
- Integration of devise gem, customized for a multi-tenant web service.
- Compatible with Rails 4
Here are some details of the implementation, to give you a better idea of what you’re getting when you purchase a license to use this Rails Kit. Below are the key files that make up the guts of the Rails application:
- account.rb - The center of the application. Accounts are created by your customers, and everything associated with your application — users, projects, files, etc. — hang off the Account.
- subscription.rb - This is where the limits are kept, along with how much to charge and when.
- subscription_address.rb - Tableless model for passing billing address to the payment gateway.
- subscription_notifier.rb - Emails for account creation, cancellation, up/downgrades, billing receipts, and billing failures.
- subscription_plan.rb - The plan levels (Free, Basic, Advanced, etc.) and the limits associated with each level.
- user.rb - A typical Devise user model, with one change in the logins and emails having the uniqueness check scoped to the account.
- accounts_controller.rb - Account creation, up/downgrades, etc.
- users_controller.rb - An example of a basic CRUD controller that shows how to use the account scoping and account limits.
If you have more questions about the details of the implementation, feel free to contact me.
Watch the 6 minute video that shows setting up and trying out the SaaS Rails Kit.
You can get a demo of the customer-facing functionality by creating a free account at Catch the Best, the application I created that is the source of the SaaS Rails Kit. Once you create your account, click on the Settings link at the top-right to see the account edit action, self-serve plan changing, and account cancellation. If you upgrade to a non-free plan, you’ll get access to the billing information page. Of course you can downgrade back down to a free plan if you really want to. :)
You’ll get some emails as you go through those steps, so watch out for those. Those email triggers and templates are in the Kit as well.
If you have more questions after checking out the UI, feel free to contact me.