{"action":"closed","issue":{"url":"https://api.github.com/repos/killbill/killbill-adyen-plugin/issues/16","labels_url":"https://api.github.com/repos/killbill/killbill-adyen-plugin/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/killbill/killbill-adyen-plugin/issues/16/comments","events_url":"https://api.github.com/repos/killbill/killbill-adyen-plugin/issues/16/events","html_url":"https://github.com/killbill/killbill-adyen-plugin/issues/16","id":109528517,"number":16,"title":"Store recurringDetailId","user":{"login":"pierre","id":51940,"avatar_url":"https://avatars.githubusercontent.com/u/51940?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre","html_url":"https://github.com/pierre","followers_url":"https://api.github.com/users/pierre/followers","following_url":"https://api.github.com/users/pierre/following{/other_user}","gists_url":"https://api.github.com/users/pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre/subscriptions","organizations_url":"https://api.github.com/users/pierre/orgs","repos_url":"https://api.github.com/users/pierre/repos","events_url":"https://api.github.com/users/pierre/events{/privacy}","received_events_url":"https://api.github.com/users/pierre/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"pierre","id":51940,"avatar_url":"https://avatars.githubusercontent.com/u/51940?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre","html_url":"https://github.com/pierre","followers_url":"https://api.github.com/users/pierre/followers","following_url":"https://api.github.com/users/pierre/following{/other_user}","gists_url":"https://api.github.com/users/pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre/subscriptions","organizations_url":"https://api.github.com/users/pierre/orgs","repos_url":"https://api.github.com/users/pierre/repos","events_url":"https://api.github.com/users/pierre/events{/privacy}","received_events_url":"https://api.github.com/users/pierre/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/killbill/killbill-adyen-plugin/milestones/2","html_url":"https://github.com/killbill/killbill-adyen-plugin/milestones/Release-0.2.3","labels_url":"https://api.github.com/repos/killbill/killbill-adyen-plugin/milestones/2/labels","id":1334891,"number":2,"title":"Release-0.2.3","description":"","creator":{"login":"pierre","id":51940,"avatar_url":"https://avatars.githubusercontent.com/u/51940?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre","html_url":"https://github.com/pierre","followers_url":"https://api.github.com/users/pierre/followers","following_url":"https://api.github.com/users/pierre/following{/other_user}","gists_url":"https://api.github.com/users/pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre/subscriptions","organizations_url":"https://api.github.com/users/pierre/orgs","repos_url":"https://api.github.com/users/pierre/repos","events_url":"https://api.github.com/users/pierre/events{/privacy}","received_events_url":"https://api.github.com/users/pierre/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":8,"state":"open","created_at":"2015-10-02T13:35:01Z","updated_at":"2015-11-19T13:27:59Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-10-02T16:42:21Z","updated_at":"2015-11-19T13:27:59Z","closed_at":"2015-11-19T13:27:59Z","body":"We should store the recurringDetailId in the column `adyen_payment_methods.token` and retrieve it in the [payment flow](https://github.com/killbill/killbill-adyen-plugin/blob/274eff6034fb087007d452dbf420070ea63e21cc/src/main/java/org/killbill/billing/plugin/adyen/api/AdyenPaymentPluginApi.java#L482).\r\n\r\nTo store it, we need to wait for the first payment (auth, purchase or credit). If the id is not part of the response (I'm unclear about that), we need to [retrieve it](https://github.com/killbill/killbill-adyen-plugin/blob/274eff6034fb087007d452dbf420070ea63e21cc/src/test/java/org/killbill/billing/plugin/adyen/recurring/AdyenRecurringClient.java#L21). Additionally, we need introduce a new `setRecurringDetailId` DAO method.\r\n\r\nWe should also [revoke](https://github.com/killbill/killbill-adyen-plugin/blob/274eff6034fb087007d452dbf420070ea63e21cc/src/test/java/org/killbill/billing/plugin/adyen/recurring/AdyenRecurringClient.java#L35) the id when `deletePaymentMethod` is called.\r\n\r\nFinally, [getPaymentMethods](https://github.com/killbill/killbill-plugin-api/blob/master/payment/src/main/java/org/killbill/billing/payment/plugin/api/PaymentPluginApi.java#L229) should pull all the recurring ids from Adyen if `refreshFromGateway` is set."}}