The Subscription Plan object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: Day
Default: 1
{
"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"
} /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
The identifier of the subscription plan to retrieve.
Returns
Returns the subscription plan object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/subscription-plan/subscription-plan_abc123 \
-H "Authorization: Bearer sk_test_..." {
"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"
} /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
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of subscription plan objects.
curl https://api.overplane.dev/api/accounts/subscription-plan \
-H "Authorization: Bearer sk_test_..." {
"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
} /api/accounts/subscription-plan Create a subscription plan
Creates a new subscription plan object.
Body parameters
Default: Day
Default: 1
Returns
Returns the newly created subscription plan object if the call succeeded.
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"}' {
"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"
} /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
The identifier of the subscription plan to update.
Body parameters
Default: Day
Default: 1
Returns
Returns the updated subscription plan object.
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"}' {
"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"
} /api/accounts/subscription-plan/{id} Delete a subscription plan
Permanently deletes a subscription plan. This cannot be undone.
Path parameters
The identifier of the subscription plan to delete.
Returns
Returns a confirmation that the subscription plan has been deleted.
curl https://api.overplane.dev/api/accounts/subscription-plan/subscription-plan_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "subscription-plan_abc123",
"deleted": true
}