Billing
Check the billing status and credit balances for your workspace.
Get billing overview
Returns the billing status and current credit balances for the workspace associated with your API key. Requires the read scope.
curl https://api.smoketest.sh/v1/billing \
-H "Authorization: Bearer $SMOKETEST_API_KEY"Sample response
{
"workspaceId": "018e1234-abcd-7000-8000-abc123456789",
"planKey": "pro",
"status": "active",
"cancelAtPeriodEnd": false,
"currentPeriodStart": "2026-06-01T00:00:00.000Z",
"currentPeriodEnd": "2026-07-01T00:00:00.000Z",
"trialEndsAt": "2026-05-15T00:00:00.000Z",
"subscriptionInterval": "monthly",
"plan": {
"key": "pro",
"name": "Pro - Monthly",
"interval": "month",
"priceAmount": 39900,
"currency": "usd",
"creditsPerMonth": 1000,
"endsAt": null
},
"balances": {
"trial": 0,
"subscription": 980,
"boost": 250,
"bonus": 15,
"manual": 0,
"total": 1245
},
"usage": {
"includedSubscriptionCredits": 1000
},
"grants": [
{
"id": "0190aa11-2233-7445-8566-778899aabbcc",
"source": "plan",
"amount": 1000,
"remaining": 980,
"grantedAt": "2026-06-01T00:00:00.000Z",
"expiresAt": "2026-07-01T00:00:00.000Z",
"note": null
}
],
"nextCreditResetAt": "2026-07-01T00:00:00.000Z",
"entitlements": {
"projectCap": 5,
"concurrency": 3,
"retentionDays": 30
},
"canManageBilling": true,
"hasCustomerPortal": true
}| Field | Type | Description |
|---|---|---|
workspaceId | UUID | Workspace this billing record belongs to |
planKey | string | Plan identifier: "trial", "pro", or the key of a custom plan |
status | string | "trial", "active", "past_due", "canceled", "paused", or "read_only" |
cancelAtPeriodEnd | boolean | Whether the subscription is set to cancel at the end of the current period |
currentPeriodStart | ISO 8601 | null | Start of the current billing period |
currentPeriodEnd | ISO 8601 | null | End of the current billing period |
trialEndsAt | ISO 8601 | When the trial expires or expired |
subscriptionInterval | "monthly" | "annual" | null | Billing cadence |
plan | object | null | The subscribed plan: name, billing interval, price in cents, and credits granted each month. endsAt is set when a free plan has an end date |
balances.trial | integer | Credits remaining from the trial allowance |
balances.subscription | integer | Credits remaining from this month's plan allowance |
balances.boost | integer | Credits remaining from boost packs |
balances.bonus | integer | Credits remaining from start-guide bonuses |
balances.manual | integer | Credits remaining that Smoketest added to the workspace |
balances.total | integer | Total usable credits across all sources |
usage.includedSubscriptionCredits | integer | Credits the plan grants each month |
grants | array | Every unexpired credit grant with a remaining balance. source is "trial", "plan", "pack", "bonus", or "manual". Grants that expire soonest are spent first |
nextCreditResetAt | ISO 8601 | null | When the plan's monthly credits are next replaced |
entitlements | object | Workspace limits. null means unlimited |