Search…
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
1
curl --location --request POST 'http://{host}/v1/subscriptions/{subscriptionId}>/reduce' \
2
--header 'Content-Type: application/json' \
3
--header 'authorization: bearer ***\
4
--data-raw '{
5
"product" : {
6
"id" : "5410723500"
7
},
8
"quantity" : 1
9
}'
Copied!
You will receive a 202 Accepted response.
JSON
1
{
2
"subscriptionId" : "29123",
3
"subTotal" : 20.5,
4
"credit" : 0.0,
5
"totalTax" : 1.54,
6
"totalAmountDue" : 22.04,
7
"currency" : "USD",
8
"prorationDate" : "2020-11-26",
9
"previewCharges" : [ {
10
"product" : "5410723500",
11
"quantity" : 1,
12
"unitPrice" : 20.5,
13
"proratedUnitPrice" : 20.5
14
} ],
15
"previewSubscription" : {
16
"product" : {
17
"id" : "5410723500"
18
},
19
"quantity" : 1,
20
"proratedUnitPrice" : 20.5
21
},
22
"isCartNeeded" : false,
23
"isPaymentOnFile" : true
24
}
Copied!
Last modified 5mo ago
Copy link