White-Label Subscriptions
White-Label Subscriptions
Entity-level subscription management for white-label products.
The White-Label Subscription object
object
Attributes
featurestring
Feature being checked
allowedboolean
Whether the feature is allowed on the current plan
requires_upgradeboolean
Whether an upgrade is needed to access this feature
Other attributes
upgrade_plan_slugstringnullable
Get current subscription
GET
/white-label-subscriptionsReturns the current entity subscription with plan details and usage stats. Requires entity context.
Response
Returns
statusstring
billing_intervalstringnullable
current_period_startstring
current_period_endstring
payment_providerstring
shopify_managedboolean
currency_codestring
billing_profilestring
allowed_payment_providersarray of strings
stripe_publishable_key_kindstring
bank_referencestringnullable
billing_emailstringnullable
coupon_codestringnullable
trial_ends_atstringnullable
trial_days_remainingintegernullable
trial_started_nowboolean
cancel_atstringnullable
{
"plan": {
"id": "plan_123abc",
"slug": "advanced",
"name": "Advanced",
"billing_interval": "monthly",
"base_price_cents": 999,
"limits": {
"documents_per_month": null,
"invoices_per_month": 500,
"overage_price_cents": null,
"e_invoicing_sends_included": 10,
"e_invoicing_send_price_cents": 10
},
"features": [
"invoices",
"estimates",
"customers",
"items",
"pdf_export",
"business_units",
"financial_categories",
"furs",
"eslog"
],
"is_free": false,
"display_order": 1
},
"status": "active",
"billing_interval": "monthly",
"current_period_start": "2025-01-01T00:00:00.000Z",
"current_period_end": "2025-01-31T23:59:59.999Z",
"shopify_managed": false,
"billing_email": "billing@example.com",
"trial_ends_at": null,
"trial_days_remaining": null,
"trial_started_now": false,
"cancel_at": null,
"scheduled_change": null,
"payment_method": {
"last4": "4242",
"brand": "visa",
"has_card": true
},
"store_billing": {
"connected_stores": 3,
"included_stores": 1,
"billable_extra_stores": 2,
"invoices_included_from_extra_stores": 2000,
"extra_store_price_cents_monthly": 599,
"extra_store_price_cents_yearly": 5900
},
"usage": {
"documents_count": 42,
"documents_limit": null,
"invoices_count": 8,
"invoices_limit": 2500,
"e_invoicing_send_count": 2,
"e_invoicing_sends_included": 10,
"period_start": "2025-01-01T00:00:00.000Z",
"period_end": "2025-01-31T23:59:59.999Z"
}
}Get available plans
GET
/white-label-subscriptions/plansReturns available subscription plans for the current white-label.
Response
Returns
current_plan_slugstringnullable
currency_codestring
billing_profilestring
allowed_payment_providersarray of strings
stripe_publishable_key_kindstring
{
"plans": [
{
"id": "plan_simple",
"slug": "simple",
"name": "Simple",
"billing_interval": "monthly",
"base_price_cents": 499,
"limits": {
"documents_per_month": null,
"invoices_per_month": 10,
"overage_price_cents": null
},
"features": [
"invoices",
"estimates",
"customers",
"items",
"pdf_export",
"email_sending"
],
"is_free": false,
"display_order": 0
},
{
"id": "plan_advanced",
"slug": "advanced",
"name": "Advanced",
"billing_interval": "monthly",
"base_price_cents": 999,
"limits": {
"documents_per_month": null,
"invoices_per_month": 500,
"overage_price_cents": null
},
"features": [
"invoices",
"estimates",
"customers",
"items",
"pdf_export",
"business_units",
"financial_categories",
"furs",
"eslog"
],
"is_free": false,
"display_order": 1
}
],
"current_plan_slug": "simple"
}Check feature access
GET
/white-label-subscriptions/check-feature/{feature}Checks if a specific feature is available on the current subscription plan.
Request
Path parameters
featurestringrequired
Feature slug to check
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.whiteLabelSubscriptions.checkWLFeature("furs", {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Response
Returns
featurestring
allowedboolean
requires_upgradeboolean
upgrade_plan_slugstringnullable
{
"feature": "furs",
"allowed": true,
"requires_upgrade": false,
"upgrade_plan_slug": null
}Check resource limit
GET
/white-label-subscriptions/check-limit/{resource}Checks if the current usage allows creating more of a resource type.
Request
Path parameters
resourcestringrequired
Resource type to check (e.g., 'documents')
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.whiteLabelSubscriptions.checkWLLimit("documents", {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Response
Returns
resourcestring
allowedboolean
usageinteger
limitintegernullable
percentagenumber
{
"resource": "documents",
"allowed": true,
"usage": 42,
"limit": 100,
"percentage": 42
}Update billing email
PATCH
/white-label-subscriptions/billing-emailUpdates the billing email used for white-label subscription notifications and invoices.
Request
Body parameters
billing_emailstring<email>requirednullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.whiteLabelSubscriptions.update({
billing_email: "billing@example.com"
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Example:
Response
Returns
billing_emailstringnullable
{
"billing_email": "user@example.com"
}