GET
/
v1
/
billing
/
{organizationId}
/
credits
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.billingGetCreditBalance({
  organizationId: process.env.OCTOSPARK_ORGANIZATION_ID ?? "organizationId",
})
{
  "creditsBalanceDecimillicents": 123,
  "reservedCreditsDecimillicents": 123,
  "availableDecimillicents": 123,
  "isSuspended": true,
  "suspendedAt": "<string>",
  "paymentGracePeriodEndsAt": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

Response

Success

creditsBalanceDecimillicents
number
required
reservedCreditsDecimillicents
number
required
availableDecimillicents
number
required
isSuspended
boolean
required
suspendedAt
string | null
required
paymentGracePeriodEndsAt
string | null
required