Skip to main content
DELETE
/
customers
/
{customer_id}
/
payment-methods
/
{payment_method_id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

await client.customers.deletePaymentMethod('payment_method_id', { customer_id: 'customer_id' });
Remove a saved payment method from a customer’s account. Use this to clean up outdated or unwanted payment methods.
If the deleted payment method is the only one on file for an active subscription, the subscription may fail to renew at the next billing cycle. Ensure the customer has an alternative payment method before deleting.

Use Cases

  • Customer request: Remove a payment method the customer no longer wants on file
  • Expired cards: Clean up payment methods with expired card details
  • Security: Remove compromised payment methods immediately

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customer_id
string
required

Customer Id

payment_method_id
string
required

Payment Method Id

Response

Payment method deleted successfully

Last modified on April 4, 2026