anchor.diff:  
   A few pointers for implementing these methods:
   
  -* Almost all the methods accept parameters like `kbAccountId`, `kbPaymentId`, `kbTransactionId`, etc., which are self-explanatory. These may or may not be used by your plugin code. But you may need some of these values to populate the `PaymentTransactionInfoPlugin` object that is returned by most of the methods (refer to the <<PaymentTransactionInfoPlugin, "PaymentTransactionInfoPlugin">> section).
  +* Almost all the methods accept parameters like `kbAccountId`, `kbPaymentId`, `kbTransactionId`, etc., which are self-explanatory. These may or may not be used by your plugin code. But you may need some of these values to populate the `PaymentTransactionInfoPlugin` object that is returned by most of the methods (refer to the <<PaymentTransactionInfoPlugin, PaymentTransactionInfoPlugin>> section).
   
   * All the methods accept `Iterable<PluginProperty> properties` as a parameter. These can be used to pass arbitrary data to the plugin method as explained in the <<plugin_property_notes, Plugin Property Notes>> section.  
   
  
positive.code: 
  === What should I do if my payment gateway processes payments offline or processes payments after a delay?
  
  If the payment gateway does not process a payment synchronously, the corresponding plugin method (`purchasePayment`, `capturePayment`, etc.) should return a *PENDING* status (Refer to the <<payment_plugin_status, "Payment Plugin Status">> section). This sets the `transactionstatus` to *PENDING* in the Kill Bill database. This can subsequently be converted to the *PAYMENT_SUCCESS*/*PAYMENT_FAILURE* status in one of the following ways:
  
  * *Explicitly by the plugin* - Once the plugin receives a notification from the payment gateway about the payment being processed, it can explicitly invoke the https://github.com/killbill/killbill-api/blob/4ae1c343a593de937415e21feecb9f5405037fa3/src/main/java/org/killbill/billing/payment/api/PaymentApi.java#L402[_PaymentApi#notifyPendingTransactionOfStateChanged_] method. You can take a look at how this is done in the https://github.com/killbill/killbill-adyen-plugin/blob/5bb6ad36a868bab15a4123af32a8c453f383e3b7/src/main/java/org/killbill/billing/plugin/adyen/core/KillbillAdyenNotificationHandler.java#L350[_Adyen plugin_]. 
  +
  
negative.code: 
  At a high level, you must perform the following steps to develop a payment plugin:
  
  . Clone one of our existing sample plugins and set it up as explained in the https://docs.killbill.io/latest/plugin_development.html#_getting_started[__Plugin Development Guide__]. You can use one of the following:
  .. https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] - This is a sample plugin that you can use as a template for developing other plugins. 
  ..  https://github.com/killbill/killbill-gocardless-example-plugin[GoCardless Example Plugin] - This is a sample payment plugin for https://gocardless.com/[GoCardless] and is used in this tutorial.
  . Create a class that implements the `PaymentPluginApi` interface (Similar to https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldPaymentPluginApi.java[`HelloWorldPaymentPluginApi`] or https://github.com/killbill/killbill-gocardless-example-plugin/blob/main/src/main/java/org/killbill/billing/plugin/gocardless/GoCardlessPaymentPluginApi.java[`GoCardlessPaymentPluginApi.java`]).
  . Implement the desired methods from the `PaymentPluginApi` interface within your class. These methods are explained in the <<paymentpluginapi_methods, PaymentPluginApi Methods>> table below.
  . Create an activator class that is responsible for starting the plugin (Similar to https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldActivator.java[`HelloWorldActivator`] or https://github.com/killbill/killbill-gocardless-example-plugin/blob/main/src/main/java/org/killbill/billing/plugin/gocardless/GoCardlessActivator.java[`GoCardlessActivator`]).
  
  [[paymentpluginapi_methods]]
  