delete https://testapi.payarc.net/v1/customers//cards/
This API is used to delete a customer's card.
Default Card Behavior
Overview
When managing customer payment methods, it's important to understand how the default card is handled when changes are made to the list of stored cards.
Behavior Explanation
- Default Card Deletion:
- If the default card for a customer is deleted, the system will automatically designate the most recently added card as the new default card.
- Automatic Update:
- This behavior ensures that there is always a default card assigned, minimizing the risk of failed transactions or incomplete payment processes.
- Example Scenario:
- Before Deletion:
- Customer has three cards stored:
- Card A (Default)
- Card B
- Card C (Most recently added)
- Customer has three cards stored:
- Action:
- Card A is deleted.
- After Deletion:
- Card C automatically becomes the new default card.
- Before Deletion:
Important Considerations
- Consistency: Always ensure that the card you want as the default is either not deleted or is the most recently added card if you plan on deleting the current default card.
- User Notification: Consider notifying users when a default card is deleted and a new one is automatically set, to maintain transparency and avoid confusion.
- Edge Cases: If no cards remain after the deletion, the system will not have a default card set, which may require user intervention to add a new payment method.