Chargify logo

This module integrates with the API of Chargify's recurring billing system. This module is an API wrapper for this library only, and doesn't actually "do" anything unless you implement the API in your own module. It's built according to the Chargify API version 1.

Installation

  1. Install the module as usual into your Drupal site.
  2. Install the library through Composer. Either install the Composer module or follow the instructions on the Composer homepage.
  3. Enter the Domain and API key for your Chargify account on the configuration page (/admin/config/services/chargify).
  4. Make sure you set the proper permissions ("access chargify").

Usage

The general concept is to first get a controller for the resource (product, customer, etc.) that
you want to interact with and then use the functions available.

For example to get a listing of all products in the system:

$pc = chargify_api_controller('product');
$products = $pc->getAll();

Sending data to Chargify is easy as well.

$data = array(
  'customer' => array(
    'first_name' => 'Joe',
    'last_name' => 'Smith',
    'email' => 'joe@example.com',
    'organization' => 'Example Corp.',
    'reference' => 'js',
  )
);

$cc = chargify_api_controller('customer');
$new_customer = $cc->create($data);

Versions

The Drupal 7.x version is the recommended version and under active development.
The Drupal 6.x branch will be supported, but won't get any new features.
A 8.x version will be available shortly after the release of Drupal 8.

Credits

Drupal 6.x version was built originally by Sprocket.
Drupal 7.x version was sponsored by The Jibe and Chargify.

Project information

Downloads