anchor.diff:  
   == Further Reading
   
  -* https://docs.killbill.io/latest/plugin_development.html[_Plugin Development Guide_]
  -
   * https://docs.killbill.io/latest/plugin_installation.html[_Plugin Installation_]
   
   * https://docs.killbill.io/latest/Kill-Bill-Glossary.html[_Kill Bill Glossary_]
  
positive.code: 
  ==== Step 5 - Implementing GoCardlessPaymentPluginApi#addPaymentMethod
  
  The `addPaymentMethod` method is typically used to add a https://docs.killbill.io/latest/Kill-Bill-Glossary.html#payment_method[_payment method_] in Kill Bill corresponding to a https://docs.killbill.io/latest/Kill-Bill-Glossary.html#account[_customer/account_]. Most plugins use this method to create the payment method in the gateway and store payment method specific data in the plugin tables). This tutorial uses it to *complete* the *redirect flow*. Thus, it is implemented as follows (See https://github.com/killbill/killbill-gocardless-example-plugin/blob/9522498ecde5849c940574c598ceb5ce088d32a7/src/main/java/org/killbill/billing/plugin/gocardless/GoCardlessPaymentPluginApi.java#L223[`GoCardlessPaymentPluginApi#addPaymentMethod`]):
  
  [source,java,linenums]
  ----
  
negative.code: }
  ----
  
  * The `GoCardlessPaymentTransactionInfoPlugin` extends the https://github.com/killbill/killbill-plugin-framework-java/blob/46d94fbeb1cf089aa04e62cfecf751ca47032023/src/main/java/org/killbill/billing/plugin/api/payment/PluginPaymentTransactionInfoPlugin.java[`PluginPaymentTransactionInfoPlugin`] class from the https://github.com/killbill/killbill-plugin-framework-java[Kill Bill Plugin framework]. `PluginPaymentTransactionInfoPlugin` in turn implements the `PaymentTransactionInfoPlugin` interface.
  
  * The `GoCardlessPaymentTransactionInfoPlugin` constructor accepts parameters corresponding to the data to be returned by `PaymentTransactionInfoPlugin`. It simply invokes the superclass constructor with these parameters.
  
  