This is the Python Library for integrating with Chargebee. Sign up for a Chargebee account here.
Chargebee now supports two API versions - V1 and V2, of which V2 is the latest release and all future developments will happen in V2. This library is for API version V2. If you’re looking for V1, head to chargebee-v1 branch.
Install the latest version 2.x.x of the library with the following commands:
$ pip install 'chargebee>=2,<3'
or
$ easy_install --upgrade 'chargebee>=2,<3'
If you would prefer to install it from source, just checkout the latest version for 2.x.x by git checkout [latest 2.x.x release tag]
and install with the following command:
$ python setup.py install
See our Python API Reference.
To create a new subscription:
import chargebee
chargebee.configure(api_key, site)
res = chargebee.Subscription.create({
"plan_id" : "basic"
})
print res.subscription
See the LICENSE file.