The Subscription Plan object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

plan_name string required
currency string required
item string required
price_determination string required
cost number
price_list string
billing_interval string

Default: Day

billing_interval_count integer

Default: 1

payment_gateway string
cost_center string
product_price_id string
The Subscription Plan object
{
  "id": "subscription-plan_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "plan_name": "plan_name_example",
  "currency": "USD",
  "item": "item_example",
  "price_determination": "price_determination_example",
  "cost": 0,
  "price_list": "price_list_example",
  "billing_interval": "Day",
  "billing_interval_count": 1,
  "payment_gateway": "payment_gateway_example",
  "cost_center": "cost_center_example",
  "product_price_id": "product_price_id_example"
}
GET /api/accounts/subscription-plan/{id}

Retrieve a subscription plan

Retrieves the details of an existing subscription plan. Supply the unique subscription plan ID that was returned from a previous request.

Path parameters

id string required

The identifier of the subscription plan to retrieve.

Returns

Returns the subscription plan object if a valid identifier was provided.

GET /api/accounts/subscription-plan/{id}
curl https://api.overplane.dev/api/accounts/subscription-plan/subscription-plan_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "subscription-plan_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "plan_name": "plan_name_example",
  "currency": "USD",
  "item": "item_example",
  "price_determination": "price_determination_example",
  "cost": 0,
  "price_list": "price_list_example",
  "billing_interval": "Day",
  "billing_interval_count": 1,
  "payment_gateway": "payment_gateway_example",
  "cost_center": "cost_center_example",
  "product_price_id": "product_price_id_example"
}
GET /api/accounts/subscription-plan

List all subscription plans

Returns a list of subscription plans. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of subscription plan objects.

GET /api/accounts/subscription-plan
curl https://api.overplane.dev/api/accounts/subscription-plan \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "subscription-plan_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "plan_name": "plan_name_example",
      "currency": "USD",
      "item": "item_example",
      "price_determination": "price_determination_example",
      "cost": 0,
      "price_list": "price_list_example",
      "billing_interval": "Day",
      "billing_interval_count": 1,
      "payment_gateway": "payment_gateway_example",
      "cost_center": "cost_center_example",
      "product_price_id": "product_price_id_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/subscription-plan

Create a subscription plan

Creates a new subscription plan object.

Body parameters

plan_name string required
currency string required
item string required
price_determination string required
cost number
price_list string
billing_interval string

Default: Day

billing_interval_count integer

Default: 1

payment_gateway string
cost_center string
product_price_id string

Returns

Returns the newly created subscription plan object if the call succeeded.

POST /api/accounts/subscription-plan
curl https://api.overplane.dev/api/accounts/subscription-plan \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"plan_name":"plan_name_example","currency":"USD","item":"item_example","price_determination":"price_determination_example"}'
Response
{
  "id": "subscription-plan_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "plan_name": "plan_name_example",
  "currency": "USD",
  "item": "item_example",
  "price_determination": "price_determination_example",
  "cost": 0,
  "price_list": "price_list_example",
  "billing_interval": "Day",
  "billing_interval_count": 1,
  "payment_gateway": "payment_gateway_example",
  "cost_center": "cost_center_example",
  "product_price_id": "product_price_id_example"
}
PATCH /api/accounts/subscription-plan/{id}

Update a subscription plan

Updates the specified subscription plan by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the subscription plan to update.

Body parameters

plan_name string
currency string
item string
price_determination string
cost number
price_list string
billing_interval string

Default: Day

billing_interval_count integer

Default: 1

payment_gateway string
cost_center string
product_price_id string

Returns

Returns the updated subscription plan object.

PATCH /api/accounts/subscription-plan/{id}
curl https://api.overplane.dev/api/accounts/subscription-plan/subscription-plan_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"plan_name":"plan_name_example","currency":"USD"}'
Response
{
  "id": "subscription-plan_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "plan_name": "plan_name_example",
  "currency": "USD",
  "item": "item_example",
  "price_determination": "price_determination_example",
  "cost": 0,
  "price_list": "price_list_example",
  "billing_interval": "Day",
  "billing_interval_count": 1,
  "payment_gateway": "payment_gateway_example",
  "cost_center": "cost_center_example",
  "product_price_id": "product_price_id_example"
}
DELETE /api/accounts/subscription-plan/{id}

Delete a subscription plan

Permanently deletes a subscription plan. This cannot be undone.

Path parameters

id string required

The identifier of the subscription plan to delete.

Returns

Returns a confirmation that the subscription plan has been deleted.

DELETE /api/accounts/subscription-plan/{id}
curl https://api.overplane.dev/api/accounts/subscription-plan/subscription-plan_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "subscription-plan_abc123",
  "deleted": true
}