anchor.diff:  [[configuration]]
   == Configuration
   
  -Your catalog will have to specify the units for the usage section and also define the plan; for the sake of simplicity we omitted other catalog sections, but to see how the pieces fit together you can look at the example provided with the https://github.com/killbill/killbill/blob/master/profiles/killbill/src/main/resources/SpyCarAdvanced.xml[source code].
  +Your catalog will have to specify the units for the usage section and also define the available plans; for the sake of simplicity we omitted other catalog sections, but to see how the pieces fit together you can look at the example provided with the https://github.com/killbill/killbill/blob/master/profiles/killbill/src/main/resources/SpyCarAdvanced.xml[source code].
   
   
   [source,xml]
  
positive.code: [[intro]]
  == Introduction
  
  In this tutorial we will look at the Kill Bill *usage billing* feature. In particular we will see how recurring subscriptions and usage can be configured together. The tutorial will focus on a type of usage that we refer to as *consumable in arrear* and that we explained in that http://killbill.io/blog/usage-billing/[blog]; in short, that is the ability to charge the customer for units he consumed at the end of the billing period.
  
  
  === Scenario
  
  
  Let's assume you want to build an online store selling artisanal chocolates, and geared towards the chocolate aficionados. The service you provide is based on a monthly subscription, that includes 1 box of your (organic certified local produced) home made chocolates. In addition, you also provide videos on the topic (the history of chocolate, its fabrication, recipes of chocolate based dishes, the economy of chocolate, chocolate health benefits, ...) that are accessible online from your website. Customers that subscribed to the base service, can also stream your videos and will be invoiced based on their usage at the end of each period:
  
  * The base service is available for $30/month and includes that ecstatic box of chocolate,
  * The first 5 videos (streamed during the month) will be invoiced at $2/video
  
negative.code: On march 13th, the system will trigger an invoice that will cover the billing period march 13th -> april 13th, and it will contain one RECURRING item with a price of $30; in return, he will receive his first box of chocolate.
  
  On april 13th, the system will now trigger a new invoice that will cover:
  
  * A RECURRING item for the billing period from april 13th -> may 13th with a price of $30,
  * A USAGE item for a price of $18 (= 5 * 2 + 8 * 1)
  
  