# Account billing snapshot (plan, cycle, balance, caps, status)

Returns the account billing snapshot (plan, cycle, balance, caps, status).

```http
GET https://api.pozy.ai/v1/billing
```

- Area: Workspace / Usage
- Auth: Authorization: Bearer pz_live_...

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/billing" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/billing", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/billing",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `billingSystem`, string: One of `metronome`, `stripe`, `shopify`
- `plan`, object
  - `name`, string
  - `isUsageBased`, boolean
  - `isPaid`, boolean
- `shopifyShopDomain`, string: Can be null
- `period`, object
  - `start`, string (date-time): Can be null
  - `end`, string (date-time): Can be null
  - `anchorDay`, integer
- `balance`, object: Can be null
  - `accruedThisPeriodCents`, integer
  - `creditsRemainingCents`, integer
- `caps`, object
  - `xSpendUsedCents`, integer
  - `xSpendLimitCents`, integer: Can be null
- `status`, object
  - `hasAccess`, boolean
  - `suspended`, boolean
  - `suspendedAt`, string (date-time): Can be null
  - `suspensionReason`, string: Can be null
  - `openInvoiceUrl`, string: Can be null
  - `declineReason`, string: Can be null
  - `autoUpgradeEnabled`, boolean
- `legacy`, object
  - `limits`, object
    - `uploads`, integer
    - `profiles`, integer

```json
{
  "billingSystem": "metronome",
  "plan": {
    "name": "Acme",
    "isUsageBased": true,
    "isPaid": true
  },
  "shopifyShopDomain": "string",
  "period": {
    "start": "2026-10-02T09:00:00.000Z",
    "end": "2026-10-02T09:00:00.000Z",
    "anchorDay": 1
  },
  "balance": {
    "accruedThisPeriodCents": 1,
    "creditsRemainingCents": 1
  },
  "caps": {
    "xSpendUsedCents": 1,
    "xSpendLimitCents": 1
  },
  "status": {
    "hasAccess": true,
    "suspended": true,
    "suspendedAt": "2026-10-02T09:00:00.000Z",
    "suspensionReason": "string",
    "openInvoiceUrl": "https://pozy.ai/media/example-1.jpg",
    "declineReason": "string",
    "autoUpgradeEnabled": true
  },
  "legacy": {
    "limits": {
      "uploads": 1,
      "profiles": 1
    }
  }
}
```
