Changing the subscription's payment source
Learn how to change the subscription's payment source.
This guide walks you through changing the payment source for an existing subscription. It might be necessary if the shopper wants to change their card, their payment information has expired, or they prefer a different payment method.
If a shopper needs to update the payment source for an existing subscription, use the POST /v1/subscriptions/{subscriptionId}/payment-source
request. It might be necessary if the shopper wants to change their card, their payment information has expired, or they prefer a different payment method.
The following example illustrates how to change the subscription's payment source:
In the request above:
Replace
{subscriptionId}
with the actual ID of the subscription you want to update.Replace
{Your_Access_Token}
with your actual authorization key. This key is necessary for authentication.Specify the new payment source ID by replacing
{Your_New_Payment_Source_ID}
in the request body.Set
isShippingSameAsBilling
totrue
if the shipping address is the same as the billing address; otherwisefalse
.
You will receive a 202 Accepted
response upon successfully associating the new payment source with the subscription. If you get an error, see the Error codes for shopper APIs section.
Last updated