Adyen / adyen-node-api-library

Adyen API Library for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Delete a stored payment method

lorenzosfarra opened this issue · comments

Is your feature request related to a problem? Please describe.
I cannot see a way to delete a stored payment method

Describe the solution you'd like
I would like a specific SDK method to accomplish this task. The main idea is to obtain the list of the stored payment methods:

checkout.paymentMethods({
      merchantAccount: ADYEN_MERCHANT_ACCOUNT_HERE,
      shopperReference: USER_ID_HERE,
    })

and let the user delete a given storedPaymentMethod, something like checkout.deletePaymentMethod(paymentMethodToken).

I have seen that something is going on in the develop branch, but I am not totally sure if it's just related to the recurring payments (I would like to let the user delete any given stored payment method).

Describe alternatives you've considered
Actually I'm having a hard time trying to find the API call that would let me delete a stored payment method.

Even if it's not in the plan of the feature request, I am more than open to suggestions and feedbacks.

Thanks!

Update: found: this, so it should be a new feature in the API, too

Hi @lorenzosfarra,

Thanks a lot for reaching out to us with your issue. Indeed, the endpoint you linked one can use to deprecate a given (recurring) stored payment method. This is something that has actually just been added this week to the checkout endpoints. We have already added these new endpoints in this PR #1092 to the library and will try to release it as soon as possible. Hope this clears everything up!

Best,
Jilling
Adyen