The Subscription 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: 0
Default: false
Default: false
Default: false
Default: true
Default: End of the current subscription period
{
"id": "subscription_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"cancelation_date": "2024-01-15",
"trial_period_start": "trial_period_start_example",
"trial_period_end": "trial_period_end_example",
"current_invoice_start": "current_invoice_start_example",
"current_invoice_end": "current_invoice_end_example",
"days_until_due": 0,
"cancel_at_period_end": false,
"apply_additional_discount": "apply_additional_discount_example",
"additional_discount_percentage": 0,
"additional_discount_amount": 0,
"party_type": "party_type_example",
"party": "party_example",
"sales_tax_template": "sales_tax_template_example",
"purchase_tax_template": "purchase_tax_template_example",
"follow_calendar_months": false,
"generate_new_invoices_past_due_date": false,
"end_date": "2024-01-15",
"start_date": "2024-01-15",
"cost_center": "cost_center_example",
"company": "Example Corp",
"submit_invoice": true,
"generate_invoice_at": "End of the current subscription period",
"number_of_days": 0
} /api/accounts/subscription/{id} Retrieve a subscription
Retrieves the details of an existing subscription. Supply the unique subscription ID that was returned from a previous request.
Path parameters
The identifier of the subscription to retrieve.
Returns
Returns the subscription object if a valid identifier was provided.
curl https://api.overplane.dev/api/accounts/subscription/subscription_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "subscription_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"cancelation_date": "2024-01-15",
"trial_period_start": "trial_period_start_example",
"trial_period_end": "trial_period_end_example",
"current_invoice_start": "current_invoice_start_example",
"current_invoice_end": "current_invoice_end_example",
"days_until_due": 0,
"cancel_at_period_end": false,
"apply_additional_discount": "apply_additional_discount_example",
"additional_discount_percentage": 0,
"additional_discount_amount": 0,
"party_type": "party_type_example",
"party": "party_example",
"sales_tax_template": "sales_tax_template_example",
"purchase_tax_template": "purchase_tax_template_example",
"follow_calendar_months": false,
"generate_new_invoices_past_due_date": false,
"end_date": "2024-01-15",
"start_date": "2024-01-15",
"cost_center": "cost_center_example",
"company": "Example Corp",
"submit_invoice": true,
"generate_invoice_at": "End of the current subscription period",
"number_of_days": 0
} /api/accounts/subscription List all subscriptions
Returns a list of subscriptions. 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 objects.
curl https://api.overplane.dev/api/accounts/subscription \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "subscription_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"cancelation_date": "2024-01-15",
"trial_period_start": "trial_period_start_example",
"trial_period_end": "trial_period_end_example",
"current_invoice_start": "current_invoice_start_example",
"current_invoice_end": "current_invoice_end_example",
"days_until_due": 0,
"cancel_at_period_end": false,
"apply_additional_discount": "apply_additional_discount_example",
"additional_discount_percentage": 0,
"additional_discount_amount": 0,
"party_type": "party_type_example",
"party": "party_example",
"sales_tax_template": "sales_tax_template_example",
"purchase_tax_template": "purchase_tax_template_example",
"follow_calendar_months": false,
"generate_new_invoices_past_due_date": false,
"end_date": "2024-01-15",
"start_date": "2024-01-15",
"cost_center": "cost_center_example",
"company": "Example Corp",
"submit_invoice": true,
"generate_invoice_at": "End of the current subscription period",
"number_of_days": 0
}
],
"has_more": false,
"total": 1
} /api/accounts/subscription Create a subscription
Creates a new subscription object.
Body parameters
Default: 0
Default: false
Default: false
Default: false
Default: true
Default: End of the current subscription period
Returns
Returns the newly created subscription object if the call succeeded.
curl https://api.overplane.dev/api/accounts/subscription \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"party_type":"party_type_example","party":"party_example"}' {
"id": "subscription_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"cancelation_date": "2024-01-15",
"trial_period_start": "trial_period_start_example",
"trial_period_end": "trial_period_end_example",
"current_invoice_start": "current_invoice_start_example",
"current_invoice_end": "current_invoice_end_example",
"days_until_due": 0,
"cancel_at_period_end": false,
"apply_additional_discount": "apply_additional_discount_example",
"additional_discount_percentage": 0,
"additional_discount_amount": 0,
"party_type": "party_type_example",
"party": "party_example",
"sales_tax_template": "sales_tax_template_example",
"purchase_tax_template": "purchase_tax_template_example",
"follow_calendar_months": false,
"generate_new_invoices_past_due_date": false,
"end_date": "2024-01-15",
"start_date": "2024-01-15",
"cost_center": "cost_center_example",
"company": "Example Corp",
"submit_invoice": true,
"generate_invoice_at": "End of the current subscription period",
"number_of_days": 0
} /api/accounts/subscription/{id} Update a subscription
Updates the specified subscription by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the subscription to update.
Body parameters
Default: 0
Default: false
Default: false
Default: false
Default: true
Default: End of the current subscription period
Returns
Returns the updated subscription object.
curl https://api.overplane.dev/api/accounts/subscription/subscription_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"status":"draft","cancelation_date":"2024-01-15"}' {
"id": "subscription_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"cancelation_date": "2024-01-15",
"trial_period_start": "trial_period_start_example",
"trial_period_end": "trial_period_end_example",
"current_invoice_start": "current_invoice_start_example",
"current_invoice_end": "current_invoice_end_example",
"days_until_due": 0,
"cancel_at_period_end": false,
"apply_additional_discount": "apply_additional_discount_example",
"additional_discount_percentage": 0,
"additional_discount_amount": 0,
"party_type": "party_type_example",
"party": "party_example",
"sales_tax_template": "sales_tax_template_example",
"purchase_tax_template": "purchase_tax_template_example",
"follow_calendar_months": false,
"generate_new_invoices_past_due_date": false,
"end_date": "2024-01-15",
"start_date": "2024-01-15",
"cost_center": "cost_center_example",
"company": "Example Corp",
"submit_invoice": true,
"generate_invoice_at": "End of the current subscription period",
"number_of_days": 0
} /api/accounts/subscription/{id} Delete a subscription
Permanently deletes a subscription. This cannot be undone.
Path parameters
The identifier of the subscription to delete.
Returns
Returns a confirmation that the subscription has been deleted.
curl https://api.overplane.dev/api/accounts/subscription/subscription_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "subscription_abc123",
"deleted": true
}