smartchat

Get billing overview

Returns the current plan, the subscription state, the credit balance and whether a payment is open. Read-only. Changing the plan or paying is only possible in the app.

GET /v1/billing

Permissionbilling:read (all permissions)
RiskRead
Idempotency-KeyNot needed (how it works)
Safe to repeatSafe: the call only reads.
Rate limit classread (120 requests per minute per key)
ConfirmationNone
MCP toolNot available in MCP
Since version2026-10-25

#What it does

  • Only reads data. It changes nothing and sends nothing.

#Examples

curl "https://api.smartchat.marketing/v1/billing" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY"
import os
import requests

response = requests.get(
    "https://api.smartchat.marketing/v1/billing",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.smartchat.marketing/v1/billing", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response (200):

{
  "object": "billing",
  "plan": {
    "id": "starter_299",
    "name": "Starter",
    "price_eur": 299,
    "credits_per_period": 3000
  },
  "subscription": {
    "status": "active",
    "current_period_end": "2026-11-25T09:41:07Z",
    "cancel_at": null,
    "term_months": 1
  },
  "credits": {
    "balance": 2810
  },
  "payment": {
    "failed": false,
    "grace_until": null
  }
}

#Response

Status 200. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.

NameTypeDescription
objectstringAlways "billing". always billing
planobjectThe current plan.
plan.idstringCode of the plan, for example starter_299. Exception to the prefixed IDs: a plan is a fixed list entry, not an object of the account.
plan.namestringDisplay name of the plan. up to 80 characters
plan.price_eurnumber or nullList price per month in euros. Null if not known. 0 to 1000000
plan.credits_per_periodinteger or nullCredits the plan adds each billing period. Null if not known. 0 to 1000000000
subscriptionobjectThe subscription state.
subscription.statusstringStatus of the subscription: active, trialing (free trial), canceled, past_due (payment open) or none. one of: active, trialing, canceled, past_due, none
subscription.current_period_endstring or nullEnd of the current billing period. up to 40 characters; format date-time
subscription.cancel_atstring or nullWhen a canceled subscription ends. Null if it is not canceled. up to 40 characters; format date-time
subscription.term_monthsinteger or nullContract term in months (1, 3 or 12). Null if not known. one of: 1, 3, 12, null
creditsobjectThe credit balance.
credits.balancenumberCredits left. Credits do not expire. -1000000000 to 1000000000
paymentobjectState of the last payment.
payment.failedbooleanTrue if the last payment failed and is still open.
payment.grace_untilstring or nullUntil when the payment can still be made good before the plan changes to Free. up to 40 characters; format date-time

#Errors

CodeStatusWhen
api_key_expired401This API key has expired.
api_key_invalid401This API key is not valid.
api_key_revoked401This API key was revoked.
authentication_required401No API key was sent. Send 'Authorization: Bearer <key>'.
insufficient_scope403This key lacks a required permission.
ip_not_allowed403This IP address is not allowed for this key.
rate_limited429Too many requests. Wait and try again.
internal_error500Something went wrong on our side.

All errors use one format.