Associating a new billing option to an existing subscription
Learn how to associate a new billing option to an existing subscription.
You can associate a new billing option to an existing subscription by payment source or option.
Payment source
The following POST /v1/subscriptions/{subscriptionId}/payment-source
request associates a new billing option to an existing subscription by payment source. You need to provide the subscriptionId
, and the payment sourceId
. The isShippingSameAsBilling
attribute is optional. When set to true
, the shipping address is the same as the billing address.
You will receive a 202 Accepted
response.
When associating a new billing option with an existing subscription by payment source, note the following:
If the system found a valid billing option by the given
sourceId
, it associates thatsourceId
to 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.|
Payment option
The following POST /v1/subscriptions/{subscriptionId}/payment-option
request associates a new billing option to an existing subscription by payment option. You need to provide the subscriptionId
, and the paymentOptionId
. The isShippingSameAsBilling
attribute is optional.
You will receive a 202 Accepted
response.
Last updated