Reducing the quantity of a subscription

Learn how to reduce the quantity of a subscription.

In this scenario, the customer has two subscriptions and decided to reduce the subscription product to one.

Use the POST /v1/subscriptions/{subscriptionId}/reduce resource to reduce the quantity of a subscription. You need to include the product identifier (id) and the updated quantity (quantity). In the following example, the value for the quantity is 1.

cURL
cURL
curl --location --request POST 'http://{host}/v1/subscriptions/{subscriptionId}>/reduce' \
--header 'Content-Type: application/json' \
--header 'authorization: bearer ***\
--data-raw '{
"product" : {
"id" : "5410723500"
},
"quantity" : 1
}'

You will receive a 202 Accepted response.

JSON
JSON
{
"subscriptionId" : "29123",
"subTotal" : 20.5,
"credit" : 0.0,
"totalTax" : 1.54,
"totalAmountDue" : 22.04,
"currency" : "USD",
"prorationDate" : "2020-11-26",
"previewCharges" : [ {
"product" : "5410723500",
"quantity" : 1,
"unitPrice" : 20.5,
"proratedUnitPrice" : 20.5
} ],
"previewSubscription" : {
"product" : {
"id" : "5410723500"
},
"quantity" : 1,
"proratedUnitPrice" : 20.5
},
"isCartNeeded" : false,
"isPaymentOnFile" : true
}