Hey! These docs are for version 1.0, which is no longer officially supported. Click here for the latest version, 2.0!

Update quantity of a subscription

A single subscription may hold many subscriptioncharges. Each of these charges determine the state and quantity of a subscription and may impact future billing cycles when altered.

Active subscriptioncharges have a statecode = 1, status=1 and nextchargedate is provided whilst previouschargedate is null. These charges can be updated using the following method. To set a specific charge, compare with the productplanchargeid provided of the list.

PUT https://api.upodi.io/v2/subscriptionCharges/{id}/setamount/ HTTP/1.1

Get list of active subscription charges

To get charges, either retrieve a subscription including the full list of charges. A method provided for this action is as follows:

GET https://api.upodi.io/v2/subscriptions/{id}/?include=SubscriptionCharges HTTP/1.1

Alternatively, queryable methods can be used as follows. This will return the list of active subscription charges under the subscription id (a91673f0-d5ba-4c8e-98f0-6c278c888225):

GET https://api.upodi.io/v2/subscriptioncharges/?$filter=SubscriptionID eq guid'a91673f0-d5ba-4c8e-98f0-6c278c888225' and Status eq 1 and StateCode eq 1 HTTP/1.1

📘

Only update active charges

Active subscriptioncharges have a statecode = 1, status=1 and nextchargedate is provided whilst previouschargedate is null.