Skip to content

Billing

Check the billing status and credit balances for your workspace.

View as Markdown

Get billing overview

Returns the billing status and current credit balances for the workspace associated with your API key. Requires the read scope.

GEThttps://api.smoketest.sh/v1/billingscope: read
Shell
curl https://api.smoketest.sh/v1/billing \
  -H "Authorization: Bearer $SMOKETEST_API_KEY"

Sample response

JSON
{
  "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
}
FieldTypeDescription
workspaceIdUUIDWorkspace this billing record belongs to
planKeystringPlan identifier: "trial", "pro", or the key of a custom plan
statusstring"trial", "active", "past_due", "canceled", "paused", or "read_only"
cancelAtPeriodEndbooleanWhether the subscription is set to cancel at the end of the current period
currentPeriodStartISO 8601 | nullStart of the current billing period
currentPeriodEndISO 8601 | nullEnd of the current billing period
trialEndsAtISO 8601When the trial expires or expired
subscriptionInterval"monthly" | "annual" | nullBilling cadence
planobject | nullThe 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.trialintegerCredits remaining from the trial allowance
balances.subscriptionintegerCredits remaining from this month's plan allowance
balances.boostintegerCredits remaining from boost packs
balances.bonusintegerCredits remaining from start-guide bonuses
balances.manualintegerCredits remaining that Smoketest added to the workspace
balances.totalintegerTotal usable credits across all sources
usage.includedSubscriptionCreditsintegerCredits the plan grants each month
grantsarrayEvery unexpired credit grant with a remaining balance. source is "trial", "plan", "pack", "bonus", or "manual". Grants that expire soonest are spent first
nextCreditResetAtISO 8601 | nullWhen the plan's monthly credits are next replaced
entitlementsobjectWorkspace limits. null means unlimited

On this page