Skip to main content
Vindicia Knowledge Center

Create a Billing Plan

Create a Billing Plan

Creates a new BillingPlan object.

Route (URL) Parameters

None.

Query Parameters

None.

Accepts

JSON A full BillingPlan object.

Returns

JSON A full BillingPlan object.

  • cURL
  • Java
Example Request
curl -X POST 
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
-d '{
    "object": "BillingPlan",
    "id": "plan_1235",
    "description": "Simple Monthly Plan with Trial",
    "trial": {
        "object": "BillingPlanPeriod",
        "type": "Day",
        "quantity": 7,
        "cycles": 1,
        "prices": [
            {
            "object": "BillingPlanPrice",
            "amount": 0,
            "currency": "USD"
            }
        ]
    },
    "periods": [
        {
        "object": "BillingPlanPeriod",
        "type": "Month",
        "quantity": 1,
        "cycles": 1,
        "prices": [
            {
            "object": "BillingPlanPrice",
            "amount": 49.99,
            "currency": "USD"
            }
        ]
        }
    ],
    "metadata": {
        "plan info": "trial billing plan"
        },
    "entitlements": [
        {
        "object": "Entitlement",
        "id": "ent_p1235",
        "description": "Access to ent_p1235"
        }
    ]
    }' \
"https://api.prodtest.vindicia.com/billing_plans"
          
The above command returns JSON structured like this:
{
    "object": "BillingPlan",
    "id": "plan_1235",
    "vid": "2c2742220b9d30ef7ec658c33e3a1758f5162154",
    "created": "2016-05-31T11:15:07-07:00",
    "description": "Simple Monthly Plan with Trial",
    "status": "Active",
    "trial": {
        "object": "BillingPlanPeriod",
        "type": "Day",
        "quantity": 7,
        "cycles": 1,
        "prices": {
        "object": "List",
            "data": [
            {
            "object": "BillingPlanPrice",
            "amount": 0,
            "currency": "USD"
            }
            ],
            "total_count": 1
            }
        },
    "periods": {
        "object": "List",
        "data": [
        {
            "object": "BillingPlanPeriod",
            "type": "Month",
            "quantity": 1,
            "cycles": 1,
            "prices": {
                "object": "List",
                "data": [
                    {
                    "object": "BillingPlanPrice",
                    "amount": 49.99,
                    "currency": "USD"
                    }
                ],
            "total_count": 1
            }
        }
        ],
        "total_count": 1
    },
    "skip_initial_billing_notification": false,

    "metadata": {
        "plan info": "trial billing plan"
        },
    "entitlements": {
        "object": "List",
        "data": [
        {
        "object": "Entitlement",
        "id": "ent_p1235",
        "description": "Access to ent_p1235"
        }
        ],
        "total_count": 1
        },
    "times_to_run": "1"
}
          
import com.vindicia.client.CashBox;
CashBox.apiKey = "acaff38d462f9430d5cbcbaf:a575771fc679b9de";
Map<string,> params = new HashMap<string,>();
params.put("name",  "Charlie Brown");
params.put("email", "charlie.brown@peanuts.com");
params.put("id",    "plan_1234");
BillingPlan.create(params);
          
The above command returns JSON structured like this:
{
    "object": "BillingPlan",
    "id": "plan_1235",
    "vid": "2c2742220b9d30ef7ec658c33e3a1758f5162154",
    "created": "2016-05-31T11:15:07-07:00",
    "description": "Simple Monthly Plan with Trial",
    "status": "Active",
    "trial": {
        "object": "BillingPlanPeriod",
        "type": "Day",
        "quantity": 7,
        "cycles": 1,
        "prices": {
        "object": "List",
            "data": [
            {
            "object": "BillingPlanPrice",
            "amount": 0,
            "currency": "USD"
            }
            ],
            "total_count": 1
            }
        },
    "periods": {
        "object": "List",
        "data": [
        {
            "object": "BillingPlanPeriod",
            "type": "Month",
            "quantity": 1,
            "cycles": 1,
            "prices": {
                "object": "List",
                "data": [
                    {
                    "object": "BillingPlanPrice",
                    "amount": 49.99,
                    "currency": "USD"
                    }
                ],
            "total_count": 1
            }
        }
        ],
        "total_count": 1
    },
    "skip_initial_billing_notification": false,
    "metadata": {
        "plan info": "trial billing plan"
        },
    "entitlements": {
        "object": "List",
        "data": [
        {
        "object": "Entitlement",
        "id": "ent_p1235",
        "description": "Access to ent_p1235"
        }
        ],
        "total_count": 1
        },
    "times_to_run": "1"
}
          

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top