anchor.diff:  ----
   
   
  -Kill Bill keeps track of the mapping between invoice and payments, in such a way that it can correctly compute the invoice balance -- and also return the payment details associated with a given invoice. Such mapping, `InvoicePayment`, is logically part of the invoice subsystem, and is returned when one fetches invoices. There exists 3 types of `InvoicePayment` as described below:
  +Kill Bill keeps track of the mapping between invoices and payments, so that it can correctly compute the invoice balance, and also return the payment details associated with a given invoice. This mapping, `InvoicePayment`, is logically part of the invoice subsystem, and is returned when invoices are fetched.
   
   
  +If an invoice doesn't have a corresponding row in invoice payment, this means the invoice isn't paid (because either no payment was ever attempted, or the payment attempts were unsuccessful). There are three types of `InvoicePayment`: successful payment, payment followed by a refund, and payment fillowed by a chargeback. Each of these is described below.
   
  -If an invoice doesn't have any corresponding row in invoice payment, this means the invoice isn't paid (either because no payment was ever attempted, or the payment attempts weren't successful).
  +==== Successful Payment
   
   A successful payment against an invoice would have a single row (of type ATTEMPT):
   
  
positive.code: 
  ==== Chargeback
  
  Here is how a payment, followed by a chargeback would look like:
  
  [cols=4, options="header"]
  |===
  
negative.code: 
  ==== Refund
  
  A payment followed by a refund would look like this:
  
  [cols=4, options="header"]
  |===
  