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
| Permission | billing:read (all permissions) |
| Risk | Read |
| Idempotency-Key | Not needed (how it works) |
| Safe to repeat | Safe: the call only reads. |
| Rate limit class | read (120 requests per minute per key) |
| Confirmation | None |
| MCP tool | Not available in MCP |
| Since version | 2026-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-*.
| Name | Type | Description |
|---|---|---|
object | string | Always "billing". always billing |
plan | object | The current plan. |
plan.id | string | Code 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.name | string | Display name of the plan. up to 80 characters |
plan.price_eur | number or null | List price per month in euros. Null if not known. 0 to 1000000 |
plan.credits_per_period | integer or null | Credits the plan adds each billing period. Null if not known. 0 to 1000000000 |
subscription | object | The subscription state. |
subscription.status | string | Status 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_end | string or null | End of the current billing period. up to 40 characters; format date-time |
subscription.cancel_at | string or null | When a canceled subscription ends. Null if it is not canceled. up to 40 characters; format date-time |
subscription.term_months | integer or null | Contract term in months (1, 3 or 12). Null if not known. one of: 1, 3, 12, null |
credits | object | The credit balance. |
credits.balance | number | Credits left. Credits do not expire. -1000000000 to 1000000000 |
payment | object | State of the last payment. |
payment.failed | boolean | True if the last payment failed and is still open. |
payment.grace_until | string or null | Until when the payment can still be made good before the plan changes to Free. up to 40 characters; format date-time |
#Errors
| Code | Status | When |
|---|---|---|
api_key_expired | 401 | This API key has expired. |
api_key_invalid | 401 | This API key is not valid. |
api_key_revoked | 401 | This API key was revoked. |
authentication_required | 401 | No API key was sent. Send 'Authorization: Bearer <key>'. |
insufficient_scope | 403 | This key lacks a required permission. |
ip_not_allowed | 403 | This IP address is not allowed for this key. |
rate_limited | 429 | Too many requests. Wait and try again. |
internal_error | 500 | Something went wrong on our side. |
All errors use one format.