const url = 'https://example.com/api/members/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payment-methods/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/members/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payment-methods/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Removes a stored payment method and revokes its token at the payment gateway. The record is retained internally so the wallet a past charge was taken from stays on file, but the method is gone from this API - it disappears from the list endpoint - and it can never be charged again.
Subscriptions that aren’t cancelled and bill against this method are re-pointed at the member’s next chargeable method (the same ranking the biller walks), and that method becomes the default if this one was. When the member has no other chargeable method, the removal is rejected instead of leaving those subscriptions pointing at nothing: add a replacement method first, or cancel them.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The member’s unique identifier.
The payment method’s identifier.
Responses
Section titled “ Responses ”Payment method removed.
No payment method with the given ID exists, or it has already been removed.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}A subscription that isn’t cancelled bills against this method and the member has no other chargeable one.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}