ExChargebee

Elixir implementation of the Chargebee API.

ExChargebee is a fork of ChargebeeElixir by Nicolas Marlier. This project also borrows from the work of Chargebeex.

Installation

The package can be installed by adding ex_chargebee to your list of dependencies in mix.exs:

def deps do
[
{:ex_chargebee, "~> 0.3.0"}
]
end

Configuration

# config/dev.ex
config :ex_chargebee,
namespace: "$your_namespace",
api_key: "$your_api_key"
# or scoped to a single Chargebee site
config :ex_chargebee, :my_site,
namespace: "$site_specific_namespace",
api_key: "$site_specific_api_key"
config :ex_chargebee, :second_site,
namespace: "$site_specific_namespace",
api_key: "$site_specific_api_key"

Usage

iex> ExChargebee.Plan.list()
[%{"id" => "some_id", "name" => "some_name", ...}, ...]
# or scoped to a single Chargebee site
ExChargebee.Plan.list(_params = %{}, [site: :my_site])

Alternatives