anchor.diff:  |getSecondPaymentReferenceId
   |Returns gateway specific second payment id if any
   |getProperties
  -|Returns a https://github.com/killbill/killbill-api/blob/4ae1c343a593de937415e21feecb9f5405037fa3/src/main/java/org/killbill/billing/payment/api/PluginProperty.java[PluginProperty] list. This can be used to return arbitrary plugin specific properties
  +|Returns a https://github.com/killbill/killbill-api/blob/4ae1c343a593de937415e21feecb9f5405037fa3/src/main/java/org/killbill/billing/payment/api/PluginProperty.java[_PluginProperty_] list. This can be used to return arbitrary plugin specific properties. See <<plugin_property_notes, "Plugin Property Notes">> section for more information.
   |===
   
  -It is very important to correctly populate the https://github.com/killbill/killbill-api/blob/4ae1c343a593de937415e21feecb9f5405037fa3/src/main/java/org/killbill/billing/payment/plugin/api/PaymentPluginStatus.java[PaymentPluginStatus]  in the `PaymentTransactionInfoPlugin` object. The following table elaborates how the status should be populated and the payment state that the plugin status translates to:
  +It is very important to correctly populate the https://github.com/killbill/killbill-api/blob/4ae1c343a593de937415e21feecb9f5405037fa3/src/main/java/org/killbill/billing/payment/plugin/api/PaymentPluginStatus.java[_PaymentPluginStatus_]  in the `PaymentTransactionInfoPlugin` object. The following table elaborates how the status should be populated and the https://github.com/killbill/killbill-api/blob/master/src/main/java/org/killbill/billing/payment/api/TransactionStatus.java[_TransactionStatus_] that the `PaymentPluginStatus` translates to:
   
   |===
  -|Plugin Status | Status Description | Payment State
  +|Plugin Status | Status Description | Transaction Status
   
   |PROCESSED
   |Indicates that the payment is successful
  
positive.code: [[purchasePayment]]
  ==== Step 6 - Implementing GoCardlessPaymentPluginApi#purchasePayment
  
  The `purchasePayment` is used to charge a customer against a payment method. So, once a user sets up a payment method as done above, the `purchasePayment` method can be used to trigger payments against a *mandateId*. So, this method can be implemented as follows (See https://github.com/killbill/killbill-gocardless-example-plugin/blob/9522498ecde5849c940574c598ceb5ce088d32a7/src/main/java/org/killbill/billing/plugin/gocardless/GoCardlessPaymentPluginApi.java#L94[_GoCardlessPaymentPluginApi#purchasePayment_]):
  
  [source,java,linenums]
  ----
  
negative.code: [NOTE]
  *Note*: `PROCESSED`, `ERROR` and `PENDING` are normal cases and it is okay to return these status values from plugin methods. However, `CANCELED` and `UNDEFINED` should be reserved for serious issues like plugin failure,  timeout, etc. 
  
  [[plugin_property_notes]]
  == Plugin Property Notes  
  
  Sometimes, it may be necessary to pass extra plugin/gateway specific data to/from a plugin. Plugin properties can be used in such situations. A https://github.com/killbill/killbill-api/blob/4ae1c343a593de937415e21feecb9f5405037fa3/src/main/java/org/killbill/billing/payment/api/PluginProperty.java[_PluginProperty_] consists of a *key-value* pair. For example, *city=San Francisco*. It is important to note that plugin properties passed to a plugin or returned by a plugin are opaque to Kill Bill. So, Kill Bill just passes these values through. 
  
  * Properties can be passed to a plugin method via the `properties` parameter (If you recall, all the <<paymentpluginapi_methods, plugin methods>> accept `Iterable<PluginProperty> properties` as a parameter).
  
  * Properties can be returned from a plugin via the <<PaymentTransactionInfoPlugin, PaymentTransactionInfoPlugin>> object (So the `PaymentTransactionInfoPlugin#getProperties` must be implemented to return the desired plugin properties).
  
  See the https://docs.killbill.io/latest/userguide_payment.html#_plugin_properties[__payment guide__] for more information on plugin properties.
  
  == GoCardless Plugin Tutorial
  
  In order to demonstrate creating a payment plugin, we will be creating a Kill Bill payment plugin for https://gocardless.com/[_GoCardless_]. GoCardless allows direct debit from customer's bank accounts. It requires a customer to set up a *mandate* the first time. A *mandate* is an *authorisation* from a customer to take payments from their bank account. Once a mandate is set up, it directly collects payments against the mandate. 
  