Welcome to NodeConductor KillBill plugin’s documentation!

NodeConductor KillBill allows to make invoices via KillBill.

Guide

Installation

git clone git@code.opennodecloud.com:nodeconductor/nodeconductor-killbill.git
  • Install NodeConductor KillBill into NodeConductor virtual environment
cd /path/to/killbill/
python setup.py install

Billing integration

NodeConductor can integrate with billing systems and expose typical features via REST API and admin interface. At the moment, only KillBill is supported as a backend. The following features are available:

  • Pushing chargeback information from the services for invoice generation (based on resource and license consumption). Usages of resources is accounted on an hourly basis.
  • Getting invoice data from the backend.
  • Propagating price lists to the backend.

Configuration of integration with KillBill

Connecting NodeConductor with KillBill means defining KillBill API endpoint along with user credentials that have admin access. API access for the NodeConductor service must be enabled in KillBill before connection can be established.

To setup a KillBill integration, add a billing block of configuration as shown in the example below.

# Example of settings for billing using KillBill API.
NODECONDUCTOR_KILLBILL['BACKEND'] = {
    # url of billing API
    'api_url': 'http://killbill.example.com/1.0/kb/',
    # credentials
    'username': 'admin',
    'password': 'password',
    # tenant credentials
    'api_key': 'bob',
    'api_secret': 'lazar',
    # extra options
    'currency': 'USD',
}

Synchronisation with product prices of KillBill

NodeConductor can populate its price list based on the configured products in KillBill.

The following conventions are in place:

  • KillBill product names and descriptions are taken as price list item names in NodeConductor.
  • KillBill hourly price is taken as an item price.

API

Invoices

To get a list of invoices, run GET against /api/killbill-invoices/ as an authenticated user.

Filtering of invoices is supported through HTTP query parameters, the following fields are acceptable:

  • ?customer=<customer uuid>
  • ?month=<month>
  • ?year=<year>

Invoice PDF

PDF version of invoice is available with GET against /api/killbill-invoices/<invoice_uuid>/pdf/. In order to force browser to download and save PDF use ?download=1 parameter.

Invoice items

To get items of invoice run GET against /api/killbill-invoices/<invoice_uuid>/items/.

Invoices amount for customers

PDF version of invoices sum for all customers is available against /api/killbill-invoices/annual_report/. To group invoices by month use ?group_by=month parameter. Otherwise they will be grouped by customers. In order to force browser to download and save PDF use ?download=1 parameter.

Endpoints

NodeConductor KillBill

NodeConductor KillBill

/api/killbill-invoices/

Supported actions and methods:

/api/killbill-invoices/

Methods: GET

Filter fields:

  • ?customer = string
  • ?customer_native_name = string
  • ?customer_abbreviation = string
  • ?month = string
  • ?year = string
  • ?customer_name = string

Order fields: amount, customer_abbreviation, customer_name, customer_native_name, date

/api/killbill-invoices/annual_report/

Methods: GET

/api/killbill-invoices/<uuid>/

Methods: GET

/api/killbill-invoices/<uuid>/items/

Methods: GET

/api/killbill-invoices/<uuid>/pdf/

Methods: GET

/api/killbill-invoices/<uuid>/usage_pdf/

Methods: GET

License

NodeConductor KillBill plugin is open-source under MIT license.

Indices and tables