In this use case, you have a customer who wants to update billing contact and payment information.
Example: a customer moves to a new home and/or wants to use a different credit card to pay for a product.
In the example shown below, we will update only billing contact information and replace an existing payment method with a new one using the update_payment_method_m API. You can use the update_acct_complete_m API to change account and statement contact information if necessary.
Note: The sample call shown below contains a few key fields needed to successfully update billing contact and payment information. You may choose to pass in additional values based on your business requirements.
Example: you may want to validate the new payment method by using fraud protection.
Please see the update_payment_method_m API documentation for detailed information about additional available fields.
- Authenticate the customer logging into your user self-service (USS) application by calling the set_session_auth_m API.
- Call the get_acct_details_all_m API to obtain the customer's payment information.
- Call the update_payment_method_m API as follows:
- Pass in your client number and authorization key:
- Identify the customer whose billing contact and payment information will be updated as shown below:
- Identify the payment method to be replaced as shown below:
Obtain the payment method identifier from the <payment_method_no> field returned by the get_acct_details_all_m API.
Pass the new billing contact information into the fields shown below:
- Pass in a name to easily identify the payment method on the customer's list of payment methods as shown below:
- Identify the kind of payment method (examples: credit card, electronic check-ACH) being added as shown below:
Note: The primary and secondary payment methods in a billing group must be of the same <pay_method_type> (examples: credit card, direct debit, or electronic check).
Example: If Billing Group 1 has 2 different credit cards set up as the primary and secondary payment methods and you try to change the primary or secondary payment method to direct debit, you will get an error message.
- Pass the new payment information (example: credit card details) into the fields shown below:
- Specify whether to disable or keep the existing payment method as shown below:
The new payment method will be associated with the billing group previously linked to the disabled payment method. This means that payments for the plan(s) associated with that billing group will be made using the new payment method.
- If a payment method is associated with multiple billing groups, any payment method replacements/changes will be reflected in all of the associated billing groups.
- If a billing group has a primary and secondary payment method, each one will have its own unique <payment_method_no> (or your specified <client_payment_method_id>). Any changes you make to payment information will apply to the payment method with which your specified <payment_method_no> is associated.
- <payment_method_no> 4 (or your specified <client_payment_method_id>) is assigned to a Visa card ending in "1111".
- That Visa card is the primary payment method for Billing Group 1 and the secondary payment method for Billing Group 2.
- You pass <payment_method_no> 4 (or your specified <client_payment_method_id>) into the update_payment_method_m API to update the expiration date and billing contact for that Visa card.
- The changes will apply to that same Visa card associated with Billing Group 1 and Billing Group 2.