News & Buzz

Recent and featured coverage about Chargify.

Rails Powered Recurring Billing Service

Peter Cooper
January 25, 2010


Click here for the original article.
RailsInside features Chargify - Rails Powered Recurring Billing Service With An ActiveResource API

Over the last couple of months, a new billing and subscription company - Chargify - have been popping up around the Web 2.0, SaaS, and Rails scenes. Notably, Chargify’s CEO is Lance Walley, co-founder of Rails hosting company Engine Yard. Rails developers are a pretty entrepreneurial lot and Chargify have a lot to offer Rails developers who need to set up billing systems.

Upside? Dead Simple Billing

In short, Chargify offers “recurring billing for Web 2.0 & SaaS companies.” Once you’ve started an account (which is free, until you top 50 customers) you can add information about your merchant account, products, subscription plans and pricing models. Then you either direct your customers to a Chargify hosted payment page or supply payment details through an ActiveResource-powered API, and billing is done.

Downside? Merchant Account Needed

Sadly, it seems that Chargify is authorize.net only right now. I asked them whether they were considering adding other systems such as PayPal, but that’s not currently a priority. You currently need a merchant account (or be ready to apply for one through them). For other systems, however, there are other services such as Spreedly (which supports 10 different systems and has a gem built by a third party - Richard Livsey).

All Rails: Backend and API

I spoke with Jonathan Kay and Michael Klett of Grasshopper (the company behind Chargify) and it turns out they’re Rails powered back and front. Not only that, but their API (chargify_api_ares) is too. Here’s some example code for creating a recurring billing record in their system (assuming you’ve already added the customer to the system - just one other API call):

# Create a subscription from a customer reference
subscription = Chargify::Subscription.create(
  :customer_reference => ‘moklett’,
  :product_handle => ‘chargify-api-ares-test’,
  :credit_card_attributes => {
:first_name => "Michael",
:last_name => "Klett",
:expiration_month => 1,
:expiration_year => 2020,
:full_number => "1"
}
)

# Update credit card information
subscription.credit_card_attributes = {:full_number => "2", :expiration_year => "2015"}
subscription.save

Nice, right? It’s ActiveResource powered but doesn’t necessarily require Rails.

Demo App

Nathan Verni has put together an entire Rails demo app for showing off how Chargify works from a Rails POV. Compared to the old school wrestling with payment systems directly, it’s ridiculously easy.

Disclaimer: Chargify is a Ruby Inside advertiser but this is not a paid post or similar. It merely comes from editorial interest caused by talking with them a lot!

«Back

Earn money by referring Chargify Learn More