Delete customer payment method
Delete a customer payment method resource
Endpoint
DELETE /customers/:id/payment_methods/:payment_method_id
Sample code
- curl
- Node
- PHP
- Python
- Ruby
curl --location 'https://api.payrexhq.com/customers/<insert customer id>/payment_methods/<insert payment method id>' \
--request DELETE \
-u replace_with_secret_api_key:
const client = require('payrex-node')('insert your PayRex Secret API key.');
await client.customers.deletePaymentMethod('<insert customer id>', {
payment_method_id: '<insert payment method id>'
});
$client = new \Payrex\PayrexClient('insert your PayRex Secret API key.');
$client->customers->deletePaymentMethod('<insert customer id>', [
'payment_method_id' => '<insert payment method id>'
]);
from payrex import Client as PayrexClient
client = PayrexClient('insert your PayRex Secret API key.')
client.customers.delete_payment_method(
'<insert customer id>',
{
'payment_method_id': '<insert payment method id>'
}
)
client = Payrex::Client.new("insert your PayRex Secret API key.")
client.customers.delete_payment_method(
'<insert customer id>',
{
payment_method_id: '<insert payment method id>'
}
)
Parameters
id REQUIRED
ID of the customer
payment_method_id REQUIRED
ID of the payment method ID to be deleted
Returns
Returns a deleted resource.