Features
Large catalog
If you have a very large catalog (e.g. thousands of products) and/or if it is highly dynamic, maintaining the catalog as an XML file may not be practical. Instead, you can use the CatalogPluginApi to write a plugin that would provide an alternative catalog implementation (such as integrating with your existing catalog system).
Coupons and discounts
There are several ways to handle coupons and discounts:
-
The simplest option is for your catalog to include discount plans (plans can additionally include discount phases)
-
An alternative is to use the PhasePriceOverride element when creating a subscription
-
Finally, to implement a fully fledged coupon functionality, use the EntitlementPluginApi to write your custom plugin (here is an example)
For more details, check this blog post.
Email notifications
The email notifications plugin lets you send emails to your customers regarding upcoming invoices, payment successes and failures, subscription cancellations, etc.
Tax
Kill Bill can be integrated with Avalara AvaTax, as a tax provider. The plugin can be downloaded here.
Testing subscription changes over time
We have a clock abstraction in Kill Bill that can be manipulated through an API, as long as you start Kill Bill with org.killbill.server.test.mode=true:
curl -v \
-u admin:password \
-H "X-Killbill-ApiKey: bob" \
-H 'X-Killbill-ApiSecret: lazar' \
-H "Content-Type: application/json" \
-H 'X-Killbill-CreatedBy: admin' \
"http://127.0.0.1:8080/1.0/kb/test/clock"
curl -v \
-u admin:password \
-H "X-Killbill-ApiKey: bob" \
-H 'X-Killbill-ApiSecret: lazar' \
-H "Content-Type: application/json" \
-H 'X-Killbill-CreatedBy: admin' \
-X POST \
"http://127.0.0.1:8080/1.0/kb/test/clock?requestedDate=2015-12-14T23:02:15.000Z"
curl -v \
-u admin:password \
-H "X-Killbill-ApiKey: bob" \
-H 'X-Killbill-ApiSecret: lazar' \
-H "Content-Type: application/json" \
-H 'X-Killbill-CreatedBy: admin' \
-X PUT \
"http://127.0.0.1:8080/1.0/kb/test/clock?days=10"
Here is an example how it could be used in tests.
Development
Building from source
Kill Bill is a standard Maven project. Simply run the following command from the project root directory:
mvn clean install -DskipTests
On the first build, Maven will download all the dependencies from the internet and cache them in the local repository (~/.m2/repository), which can take a considerable amount of time. Subsequent builds will be faster.
Once built, you can start Kill Bill by running:
./bin/start-server -s
Note that master is in development, so some dependencies may have to be built from source as well (such as killbill-oss-parent, killbill-commons and killbill-platform).
Calling APIs from Ruby plugins
Take a look at these snippets.
Reloading plugins
When developing plugins, you can update the plugin Jar or the plugin Ruby code directly, then tell Kill Bill to reload it:
curl -v \
-u admin:password \
-H "X-Killbill-ApiKey: bob" \
-H 'X-Killbill-ApiSecret: lazar' \
-H "Content-Type: application/json" \
-H 'X-Killbill-CreatedBy: admin' \
-X POST \
-d '{"systemCommandType":"true","nodeCommandType":"RESTART_PLUGIN","nodeCommandProperties":[{"key":"pluginName", "value":"analytics-plugin"} ]}' \
"http://127.0.0.1:8080/1.0/kb/nodesInfo"