Changing the subscription's payment option

Learn how to change the subscription's payment option.

Managing a subscription's payment method is critical to maintaining uninterrupted service. Digital River's Commerce API provides a straightforward way to update a customer's subscription payment option. Whether they are switching to a new credit card, updating an expired card, or simply changing their billing preferences, our guide will walk you through the steps to modify the subscription's payment method. It ensures the customer's account stays in good standing, and your services continue without disruption.

To change the subscription's payment option, use the POST /v1/subscriptions/{subscriptionId}/payment-option request. Include the subscriptionId and the new paymentOptionId in the request body. Optionally, you can indicate whether the shipping address is the same as the billing address by setting isShippingSameAsBilling to true or false.

Here is an example request using cURL:

curl --location --request POST 'https://<<host>>/v1/subscriptions/{subscriptionId}/payment-option' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ***' \
--data-raw '{
 "paymentOptionId": "23443434343434",
 "isShippingSameAsBilling": true
}'

Upon successfully associating a new billing option to the subscription, you will receive a 202 Accepted response.

When associating a new payment option with an existing subscription by payment source, note the following:

  • If the system finds a valid payment option by the given sourceId, it associates that sourceId with the subscription. It does not update any other data for that billing option.

  • If it is a valid source and no existing billing option is associated with it in Global Commerce, the system creates a new billing option for this given source. Here are the rules for creating a billing option:

    • The system generates a unique nickname for this billing option.

    • If this shopper doesn’t have an existing default billing option, the system sets the default flag to true on this new billing option.

    • If this shopper has an existing default billing option, the system sets the default flag to false on this new billing option.|

Last updated