GET
/
v1
/
organizations
/
{organizationId}
/
billing
TypeScript client
import { TxAgentKitClient } from '@tx-agent-kit/sdk'

const client = new TxAgentKitClient({
  token: process.env.TX_AGENT_KIT_TOKEN
})

const response = await client.billing.getBillingSettings({
  organizationId: process.env.TX_AGENT_KIT_ORGANIZATION_ID ?? "organizationId",
})
{
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "billingEmail": "<string>",
  "stripeCustomerId": "<string>",
  "stripeSubscriptionId": "<string>",
  "stripePaymentMethodId": "<string>",
  "stripeMeteredSubscriptionItemId": "<string>",
  "creditsBalanceDecimillicents": 123,
  "reservedCreditsDecimillicents": 123,
  "autoRechargeEnabled": true,
  "autoRechargeThresholdDecimillicents": 123,
  "autoRechargeAmountDecimillicents": 123,
  "usageCapDecimillicents": 123,
  "isSubscribed": true,
  "subscriptionStartedAt": "<string>",
  "subscriptionEndsAt": "<string>",
  "subscriptionCurrentPeriodEnd": "<string>",
  "suspendedAt": "<string>",
  "paymentGracePeriodEndsAt": "<string>"
}

Path Parameters

organizationId
string
required

Response

Success

organizationId
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
billingEmail
string | null
required
stripeCustomerId
string | null
required
stripeSubscriptionId
string | null
required
stripePaymentMethodId
string | null
required
stripeMeteredSubscriptionItemId
string | null
required
creditsBalanceDecimillicents
number
required
reservedCreditsDecimillicents
number
required
autoRechargeEnabled
boolean
required
autoRechargeThresholdDecimillicents
number | null
required
autoRechargeAmountDecimillicents
number | null
required
usageCapDecimillicents
number | null
required
isSubscribed
boolean
required
subscriptionStatus
enum<string>
required
Available options:
active,
inactive,
trialing,
past_due,
canceled,
paused,
unpaid
subscriptionPlan
enum<string> | null
required
Available options:
try_me,
pro,
agency
subscriptionStartedAt
string | null
required
subscriptionEndsAt
string | null
required
subscriptionCurrentPeriodEnd
string | null
required
suspendedAt
string | null
required
paymentGracePeriodEndsAt
string | null
required