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.4.2"}
  ]
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: "$my_site_namespace",
  api_key: "$my_site_api_key"

config :ex_chargebee, :second_site,
  namespace: "$second_site_namespace",
  api_key: "$second_site_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