Billing & Usage
Monitor your plan usage, track verified deltas, and manage your subscription.
PacSpace uses a monthly subscription model. Each plan includes a set number of verified deltas per month. Use these endpoints to monitor your usage and plan details.
All routes require a valid JWT in the Authorization header:
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Base URL: https://balance-api.pacspace.io
Get Plan
Retrieve your current subscription plan details.
curl https://balance-api.pacspace.io/dashboard/billing/plan \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Response 200 OK
{
"statusCode": 200,
"data": {
"tier": "starter",
"monthlyAllotment": 100000,
"planPriceUsd": 3000,
"overagePriceUsd": 0.012,
"stripeSubscriptionId": "sub_1R...",
"cancelAtPeriodEnd": false,
"stripeCurrentPeriodEnd": "2026-03-13T00:00:00.000Z"
}
}
Plan Fields
| Field | Description |
|---|---|
tier | Your current plan: free, pilot, starter, growth, scale, or enterprise |
monthlyAllotment | Verified deltas included per month |
planPriceUsd | Monthly subscription price (in USD) |
overagePriceUsd | Per-delta rate if you exceed your allotment |
stripeSubscriptionId | Stripe subscription ID (null if no active subscription) |
cancelAtPeriodEnd | Whether the subscription is scheduled for cancellation |
stripeCurrentPeriodEnd | End date of the current period |
Get Usage
Retrieve your monthly usage and overage status for the current or a specified period.
curl https://balance-api.pacspace.io/dashboard/billing/usage \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Optionally specify a period:
curl "https://balance-api.pacspace.io/dashboard/billing/usage?period=2026-01" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Period in YYYY-MM format. Defaults to the current period. |
Response 200 OK
{
"statusCode": 200,
"data": {
"period": "2026-02",
"consumedDeltas": 1042,
"overageCount": 0,
"overageChargesUsd": 0,
"remainingDeltas": 98958
}
}
Usage Fields
| Field | Description |
|---|---|
period | Period (YYYY-MM) |
consumedDeltas | Verified deltas used so far this period |
overageCount | Deltas consumed beyond the plan allotment (0 if within limit) |
overageChargesUsd | Accumulated overage charges for this period |
remainingDeltas | Deltas remaining in your allotment (0 if in overage) |
Monitoring Usage
Via Webhooks
Each delta.verified webhook event includes usage data when available:
{
"event": "delta.verified",
"data": {
"usage": {
"plan": "growth",
"includedDeltas": 500000,
"consumedDeltas": 1042,
"remainingDeltas": 498958,
"overageRate": "$0.010/delta"
}
}
}
Set up a webhook endpoint to track consumption in real time.
Via Dashboard
View your usage, billing history, and plan details at app.pacspace.io.
Subscribe to a Plan
Start a new subscription for a self-serve tier (Pilot, Starter, Growth, or Scale). Returns a Stripe Checkout URL — redirect the user to complete payment.
curl -X POST https://balance-api.pacspace.io/dashboard/stripe/create-subscription-session \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "tier": "starter" }'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
tier | string | Yes | One of: pilot, starter, growth, scale |
Response 201 Created
{
"statusCode": 201,
"data": {
"url": "https://checkout.stripe.com/c/pay/..."
}
}
Redirect the user to url. After successful payment, Stripe redirects back to the dashboard Billing page. The plan is activated immediately via webhook.
Change Plan
Upgrade or downgrade an existing subscription. The change takes effect immediately with proration. Usage does not reset mid-cycle.
curl -X POST https://balance-api.pacspace.io/dashboard/stripe/change-plan \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "tier": "growth" }'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
tier | string | Yes | One of: pilot, starter, growth, scale |
Response 200 OK
{
"statusCode": 200,
"data": {
"subscriptionId": "sub_1R...",
"status": "active"
}
}
Requires an active subscription. If the tenant has no subscription, use the Subscribe endpoint first.
Open Customer Portal
Create a Stripe Customer Portal session for managing payment methods, viewing invoices, and downloading receipts.
curl -X POST https://balance-api.pacspace.io/dashboard/stripe/create-portal-session \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Response 201 Created
{
"statusCode": 201,
"data": {
"url": "https://billing.stripe.com/p/session/..."
}
}
Redirect the user to url. The portal returns them to the dashboard Billing page when done.
Cancel Subscription
Schedule the subscription for cancellation at the end of the current period. Access continues until that date, then the account reverts to the Free tier.
curl -X POST https://balance-api.pacspace.io/dashboard/stripe/cancel-subscription \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Response 200 OK
{
"statusCode": 200,
"data": {
"subscriptionId": "sub_1R...",
"cancelAtPeriodEnd": true,
"currentPeriodEnd": "2026-03-13T00:00:00.000Z"
}
}
Usage Limits
Free Plan
The Free plan is hard-capped at 100 verified deltas (lifetime cap). Once exhausted, write operations return 402 Payment Required. Upgrade to a paid plan to continue.
Paid Plans
Paid plans allow overage beyond the included allotment. Overages are billed at your plan's per-delta rate at the end of each period.
Endpoints Summary
| Endpoint | Method | Description |
|---|---|---|
/dashboard/billing/plan | GET | Current subscription plan details |
/dashboard/billing/usage | GET | Monthly usage and overage status |
/dashboard/stripe/create-subscription-session | POST | Start a new subscription (returns Checkout URL) |
/dashboard/stripe/change-plan | POST | Upgrade or downgrade an existing subscription |
/dashboard/stripe/create-portal-session | POST | Open Stripe Customer Portal (returns Portal URL) |
/dashboard/stripe/cancel-subscription | POST | Cancel subscription at period end |