anchor.diff:  "http://127.0.0.1:8080/1.0/kb/accounts/60035793-cbe5-472a-8bd8-3c67cc3beaf4/paymentMethods?isDefault=true"
   ----
   
  +
   [start = 3]
  -3. Create a subscription in the past to trigger some invoices and (failed) payment. 
  -
  -Obviously the ids, catalog, and dates used below should be adjusted with valid values and to achieve the correct overdue state.
  +3. Create a subscription to trigger some invoices and (failed) payment. 
  +
  +Note: The current date in the system is set to `2015-12-30` (date at which this experiment was conducted). You will need to either set the system time (suing endpoint shown below) to that date or translate to the dates of your choice.
   
   [source,bash]
   ----
  
positive.code: -H "Content-Type: application/json" \
  -H "X-Killbill-CreatedBy: demo" \
  -X POST \
  --data-binary '{"name":"Arthur","email":"arthur@laposte.fr","externalKey":"arthur","currency":"EUR"}' \
  "http://127.0.0.1:8080/1.0/kb/accounts"
  ----
  
  [start = 2]
  2. Add the payment method:
  
  [source,bash]
  ----
  
negative.code: -H "Content-Type: application/json" \
  -H "X-Killbill-CreatedBy: demo" \
  -X POST \
  --data-binary '{"accountId":"60035793-cbe5-472a-8bd8-3c67cc3beaf4","externalKey":"s1_arthur","productName":"Movies","productCategory":"BASE","billingPeriod":"MONTHLY","priceList":"DEFAULT"}' \
  "http://127.0.0.1:8080/1.0/kb/subscriptions"
  ----
   
  [start = 4]
  4. Move the clock to reach end of trial and see first payment
  
  [source,bash]
  ----
  curl -v \
  -u admin:password \
  -H "X-Killbill-ApiKey: bob" \
  -H "X-Killbill-ApiSecret: lazar" \
  -H "Content-Type: application/json" \
  -H 'X-Killbill-CreatedBy: demo' \
  -X POST \
  "http://127.0.0.1:8080/1.0/kb/test/clock?requestedDate=2016-01-10"
  ----
  
  [start = 5]
  5. Configure payment plugin to fail subsequent payments
  
  [source,bash]
  ----
  curl -v \
  -u'admin:password' \
  -H "X-Killbill-ApiKey: bob" \
  -H "X-Killbill-ApiSecret: lazar" \
  -H "Content-Type: application/json" \
  -H 'X-Killbill-CreatedBy: demo' \
  -X POST \
  --data-binary '{"CONFIGURE_ACTION":"ACTION_RETURN_PLUGIN_STATUS_ERROR", "METHODS":"purchase_payment"}' \
   -v 'http://127.0.0.1:8080/plugins/killbill-payment-test/configure'
  ----
  
  You can then refer to the  https://github.com/killbill/killbill-payment-test-plugin/blob/master/README.md[plugin documentation (section Global State Configuration)] to configure the plugin and trigger failures. 
  
  
  [start = 6]
  6. Move the clock to the next month and observe first failed payment
  
  
  [source,bash]
  ----
  curl -v \
  -u admin:password \
  -H "X-Killbill-ApiKey: bob" \
  -H "X-Killbill-ApiSecret: lazar" \
  -H "Content-Type: application/json" \
  -H 'X-Killbill-CreatedBy: demo' \
  -X POST \
  "http://127.0.0.1:8080/1.0/kb/test/clock?requestedDate=2016-02-10"
  ----
  
  [start = 7]
  7. Move clock +1 day and observe first payment retry
  
  [source,bash]
  ----
  curl -v \
  -u admin:password \
  -H "X-Killbill-ApiKey: bob" \
  -H "X-Killbill-ApiSecret: lazar" \
  -H "Content-Type: application/json" \
  -H 'X-Killbill-CreatedBy: demo' \
  -X POST \
  "http://127.0.0.1:8080/1.0/kb/test/clock?requestedDate=2016-02-11"
  ----
  
  Keep moving the clock as suggested above to go through all payment retries and overdue states.
  
  
  [[platform_use]]
  