- **Use Case Number:**2-4-06
- **Completed By:**Software Developer
- Estimated Completion Time: <1 day
Basic Scenario
A subscriber accesses their account through your self-care portal and chooses to change the credit card payment method on one or more subscriptions.Design Approach
As shown in the following diagram, you must use Payment Method Tokenization (PMT) to add the new payment method. Subscribe responds with a new payment method VID that the self-care portal stores. You must then call the subscriptions endpoint to update the subscription with the new payment method VID.
Update Credit Card Using Subscribe APIs
To enable Subscribers to update their credit card on-file:- Use REST PMT to create the new payment method and get the payment method VID.
-
Use the accounts endpoint to POST the new payment method to the Account.
POST the new payment method to the accounts endpoint with the following URL parameters:
update_behavior=Update: Since the Subscription is Active and card validation was performed in PMT, you can just update the Subscription with this new card.replace_on_all_subscriptions=1: Applies the payment method to all Subscriptions (a value of false validates and adds the new payment method to the Account).ignore_avs=1: Ignores the AVS code, as it was completed in the PMT step.ignore_cvn=1: Ignores the CVN code, as it was completed in the PMT step. Sample Code:
- The new payment method is associated with the Subscription.

