Skip to main content
Vindicia Knowledge Center

Cancel a subscription

Cancel a subscription

Cancel a subscription, with options to select immediate disentitlement versus registering the cancel now to take affect at the end of the current period; to select whether any pre-paid services should get a prorated refund; and to select whether or not an existing minimum commitment should be honored. The reason for the cancellation can also be tracked using Cancel Reason codes (which can use pre-defined codes or codes you’ve designed yourself in advance).

Route (URL) Parameters

Parameter Default Description Required
subscription n/a The id or the vid of the Subscription to retrieve Yes

Query Parameters

Parameter Default Description Required
disentitle No Indicates whether or not to dis-entitle immediately or leave service in effect until the end of the current billing period. No
force No Indicates whether to ignore unsatisfied minimum commitments No
settle No Indicates whether to issue a prorated refund for any pre-paid unconsumed services and to rate unbilled usage. No
send_cancellation_notice No Indicates whether to send a special cancellation notice to the customer No
reason_code n/a The predefined reason code for cancelling this subscription. No

Accepts

None.

Returns

JSON A full Subscription object.

  • cURL
  • Java
Example Request
curl -X POST \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \ 
"https://api.prodtest.vindicia.com/subscriptions/sub_1234x/actions/cancel?reason_code=101&settle=false&disentitle=false"
The above command returns JSON structured like this:
{
    "object": "Subscription",
    "id": "sub_1234",
    "vid": "796db5f7f7a1dea312f6c7e1393aebec1f1ecf1b",
    "account": {`...`},
    "billing_plan": {`...`},
    "payment_method": {`...`},
    "currency": "USD",
    "description": "Subscription_1234",

    "status": "Pending Cancel",
    "billing_state": "Billing Completed",

    "starts": "2016-05-27T05:52:02-07:00",
    "entitled_through": "2016-06-27T23:59:59-07:00",

    "items": {
        "object": "List",
        "data": [
            {
                "object": "SubscriptionItem",
                "id": "sub_1234.1",
                "index": 0,
                "product": {`...`},
                "quantity": 1,
                "created": "2016-05-27T05:52:02-07:00",
                "starts": "2016-05-27T00:00:00-07:00"
            },
            {
                "object": "SubscriptionItem",
                "id": "sub_1234.2",
                "index": 1,
                "product": {`...`},
                "quantity": 1,
                "created": "2016-05-27T05:52:02-07:00",
                "starts": "2016-05-27T00:00:00-07:00"
            }
        ],
        "total_count": 2
    },
    "minimum_commitment": 0,
    "notify_on_transition": false
}
import com.vindicia.client.CashBox;
CashBox.apiKey = "acaff38d462f9430d5cbcbaf:a575771fc679b9de";
Map<string,> params = new HashMap<string,>();
params.put("reason_code",  101);
params.put("disentitle",  "false");
params.put("settle",  "false");
Subscription.cancel(params);
            
The above command returns JSON structured like this:
{
    "object": "Subscription",
    "id": "sub_1234",
    "vid": "796db5f7f7a1dea312f6c7e1393aebec1f1ecf1b",
    "account": {`...`},
    "billing_plan": {`...`},
    "payment_method": {`...`},
    "currency": "USD",
    "description": "Subscription_1234",

    "status": "Pending Cancel",
    "billing_state": "Billing Completed",

    "starts": "2016-05-27T05:52:02-07:00",
    "entitled_through": "2016-06-27T23:59:59-07:00",

    "items": {
        "object": "List",
        "data": [
            {
                "object": "SubscriptionItem",
                "id": "sub_1234.1",
                "index": 0,
                "product": {`...`},
                "quantity": 1,
                "created": "2016-05-27T05:52:02-07:00",
                "starts": "2016-05-27T00:00:00-07:00"
            },
            {
                "object": "SubscriptionItem",
                "id": "sub_1234.2",
                "index": 1,
                "product": {`...`},
                "quantity": 1,
                "created": "2016-05-27T05:52:02-07:00",
                "starts": "2016-05-27T00:00:00-07:00"
            }
        ],
        "total_count": 2
    },
    "minimum_commitment": 0,
    "notify_on_transition": false
}
            

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top