Deletes a payment source. Once the payment source is deleted, if
- Deleted payment source is Primary, and Backup is available
- The Backup payment source will become the Primary payment source.
- Deleted payment source is Primary, and no Backup is available
-
The other payment source available, but not assigned to any subscription, will become the Primary payment source.
Note: When multiple payment sources exist, the payment method added most recently will be considered.
-
If other payment sources available are assigned to subscriptions, the auto collection attribute for the customer will be set to Off, and the events card_deleted and payment_source_deleted will be triggered.
-
- Deleted payment source is attached to subscriptions
- Dunning will be initiated for subscriptions attached to this payment source if auto collection is set to On, and when no customer default is present.
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
Note :
If you delete the only available payment method of a customer in Chargebee, it also deletes the customer's record at the gateway. To delete the payment method locally(delete only in Chargebee), use Local Delete a Payment Source API .
Sample Request
URL Format
Returns
Resource object representing customer
Resource object representing payment_source