# Get plan and payments

`GET` `https://goblins-call-api.onrender.com/v1/billing`

Returns the plan your workspace is on, its balance and its recent payments.

Needs a [workspace API key](https://www.cracklehq.com/docs/authentication).

## Query parameters

- `userId` (string, optional): A workspace ID. A key belongs to one workspace, so this is never needed with one; naming another workspace answers `403`.

## Notes

- The plan figures in the sample are placeholders. Get the price list returns the real ones.

Request:

cURL:

```bash
curl "https://goblins-call-api.onrender.com/v1/billing" \
  -H "Authorization: Bearer $CRACKLE_API_KEY"
```

Node.js:

```js
const response = await fetch('https://goblins-call-api.onrender.com/v1/billing', {
  headers: {
    Authorization: `Bearer ${process.env.CRACKLE_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

Python:

```python
import os
import requests

response = requests.get(
    "https://goblins-call-api.onrender.com/v1/billing",
    headers={"Authorization": f"Bearer {os.environ['CRACKLE_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
data = response.json()
```

Response · 200 OK:

```json
{
  "plan": {
    "id": "starter",
    "name": "Starter",
    "price": 29,
    "includedCredit": 30,
    "maxConcurrentCalls": 5,
    "blurb": "…",
    "features": [ … ]
  },
  "balance": 42.1853,
  "payments": [
    {
      "id": "pay_…",
      "kind": "plan",
      "planId": "starter",
      "amount": 29,
      "credit": 30,
      "currency": "USD",
      "status": "paid",
      "createdAt": "2026-10-01T09:00:00.000Z",
      "paidAt": "2026-10-01T09:00:04.000Z"
    }
  ]
}
```

Source: https://www.cracklehq.com/docs/reference/workspace/billing
