Skip to main content
Vindicia Knowledge Center

Fetch a specific subscription

Fetch a specific subscription

Retrieves a specific Subscription.

Route (URL) Parameters

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

Query Parameters

None.

Accepts

None.

Returns

JSON A full Subscription object.

  • cURL
  • Java
Example Request
curl -X GET  \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
"https://api.prodtest.vindicia.com/subscriptions/sub_1234"
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": "Active",
    "billing_state": "Good Standing",
    "starts": "2016-05-27T05:52:02-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,
    "next_billing": {`...`}
}
import com.vindicia.client.CashBox;
CashBox.apiKey = "acaff38d462f9430d5cbcbaf:a575771fc679b9de";
Subscription.fetch( "sub_1234");
            
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": "Active",
    "billing_state": "Good Standing",
    "starts": "2016-05-27T05:52:02-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,
    "next_billing": {`...`}
}
            

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top