Updating the subscription's payment source

Learn how to update the subscription's payment source.

In this section, we'll guide you through updating the payment source for an existing subscription. You may need to update the payment source due to a change of card, expired payment information, or simply wanting to switch to a different payment method for your convenience. Following the steps outlined below, you can quickly and easily change the payment source associated with your subscription using a simple API request.

To update the payment source for an existing subscription, send a POST request to the following endpoint using curl:

curl --location --request POST 'https://api.digitalriver.com/v1/subscriptions/{subscriptionId}/payment-source' \
--header 'Authorization: Bearer [Your_Access_Token]' \
--data-raw '{
  "sourceId": "{Your_New_Payment_Source_ID}",
  "isShippingSameAsBilling": true

Replace{subscriptionId} with the actual ID of the subscription you want to update and {Your_Access_Token} with your authorization key. Refer to the Obtain API credentials topic for more information on your authorization key.

Include the new payment source information in the request body as shown above:

  • sourceId: The ID of the new payment source.

  • isShippingSameAsBilling: Set to true if the shipping address is the same as the billing address; otherwise false.

You will receive a 202 Accepted response upon successfully associating the new payment source with the subscription. See the Error codes for shopper APIs section if you get an error.

Last updated