anchor.diff:  
   == System Properties
   
  -As described previoulsy, Kill Bill plugins are started with access to system properties through the use of a special interface https://github.com/killbill/killbill-platform/blob/master/osgi-api/src/main/java/org/killbill/billing/osgi/api/OSGIConfigProperties.java[OSGIConfigProperties]. System properties passed to the JVM are then accessible to the plugins and can be used to tweak the behavior of the plugin as needed.
  +Kill Bill plugins can access Kill Bill properties through the use of a special interface https://github.com/killbill/killbill-platform/blob/master/osgi-api/src/main/java/org/killbill/billing/osgi/api/OSGIConfigProperties.java[OSGIConfigProperties]. System properties passed to the JVM and properties from the `killbill.properties` configuration file are then accessible to the plugins and can be used to tweak the behavior of the plugin as needed.
   
   == Configuration File
   
  -Property files can be used to configure global settings for a plugin. Those property files need to be part of the archive (and OSGI mechanism) will make sure these are only visible to the particular plugin:
  +Property files can be used to configure global settings for a plugin. Those property files need to be part of the archive (the OSGI mechanism will make sure these are only visible to the particular plugin):
   
   * For `java` plugins, the property file needs to be on the classpath (`resource` directory)
   * For `ruby` plugins, the property file is often located at the root of the archive
   
  -There is no restriction on the format of the propery file, but often the case, `ruby` plugins will use `yml` files and `java` plugins will rely on `key-value`, `json` or `xml` files. 
  +There is no restriction on the format of the propery file, but typically `ruby` plugins will use `yml` files and `java` plugins will rely on `key-value` properties, `json` or `xml` files. 
   
   == Per-tenant Configuration
   
  -The two previous mechanisms work well for global settings, but are inadequate to configure the plugins on a per-tenant fashion (e.g for a payment plugin interacting with a payment gateway, different credentials might be needed for different tenants). In those situations, Kill Bill provides apis to upload/retrieve/delete per-tenant plugin configurations:
  +The two previous mechanisms work well for global settings, but are inadequate to configure the plugins on a per-tenant fashion (e.g for a payment plugin interacting with a payment gateway, different credentials might be needed for different tenants). In those situations, Kill Bill provides APIs to upload/retrieve/delete per-tenant plugin configurations:
   
   ```
   # Upload new config
  
positive.code: 
  === Java Plugins
  
  For `java` plugins, deploying by hand consists in building the self contained OSGI jar, and copying that jar at the right location. For example, the `adyen` plugin with a version with version `0.3.2` would show up as the following:
  
  ```
  java
  
negative.code:      http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/<pluginName>
  ```
  
  At a high level, the mechanism works in the following way:
  
  1. The administrator uses the kill bill API (or Kaui) to upload the configuration
  2. Kill Bill stores the config in the `tenant_kvs` table using a `tenant_key` of `PLUGIN_CONFIG_<pluginName>` and sets the `tenant_value` with the config provided
  3. Kill Bill broadcasts the change across the cluster of nodes and emits a configuration bus event: `TENANT_CONFIG_CHANGE` or `TENANT_CONFIG_DELETION`
  4. The plugin code is *responsible to listen to these events* and take appropriate action to reload/delete its configuration for that specific tenant.
  
  Note that when relying on the plugin frameworks, some amount of work is already provided:
  
  * For `java` plugins we can see the listener https://github.com/killbill/killbill-plugin-framework-java/blob/killbill-base-plugin-1.1.0/src/main/java/org/killbill/billing/plugin/api/notification/PluginConfigurationEventHandler.java#L37[here]
  * For `ruby` plugins, this is done automatically for https://github.com/killbill/killbill-plugin-framework-ruby/blob/v8.3.1/lib/killbill/helpers/active_merchant/payment_plugin.rb#L48[ActiveMerchant payment plugins]
  
  = Debugging Plugins
  
  