---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://truto.one/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Turn an add-on on

> Source: https://truto.one/docs/api-reference/admin/billing/create-add-on/

`POST /billing/add-on`

Resource: **Billing**

**Charges the rest of the calendar month now**, by days with today included (on 24 November, 7/30 of the monthly price), with the team's saved card, and turns the add-on on once the payment succeeds. Free when the month is already paid (turned off and on again). It then renews on the 1st of each month until turned off.

## Request body

- **`team_id`** _(string)_
- **`add_on`** _(string)_
  `pro`, `partner`, or `unified:<unified model name>`.

## Response body

- **`key`** _(string)_
  `pro`, `partner`, or `unified:<unified model name>` for one catalog unified API.
- **`type`** _(string)_
  Allowed: `pro`, `partner`, `unified`
- **`name`** _(string)_
- **`price_cents`** _(integer)_
  Monthly price on the team's plan; null when the plan no longer offers it.
- **`on`** _(boolean)_
  Turned on. An add-on that is on renews on the 1st of each month.
- **`paid_through`** _(string)_
  Exclusive — paid up to the start of this month.
- **`allowed_until`** _(string)_
  Exclusive — usable until this date. While on, the end of the paid month plus 7 days (the renewal is charged inside them); once turned off, the end of the paid month.
- **`charge`** _(object)_
  The charge in progress, if any.
  - **`kind`** _(string)_
    Allowed: `turn_on`, `renewal`
  - **`month`** _(string)_
  - **`amount_cents`** _(integer)_
  - **`stripe_invoice_id`** _(string)_
  - **`hosted_invoice_url`** _(string)_
    Stripe's page to pay the invoice.

## Errors

| Status | Description |
| :----- | :---------- |
| `400` | Unknown add-on or unified API, the plan does not offer it, no saved card, or the team is not billed (exempt, no Stripe customer, no active plan) |
| `402` | The payment did not go through. A declined card voids the invoice; a card that needs authentication leaves it open at `hosted_invoice_url`, and the add-on turns on once it is paid there. Also returned while an earlier month's renewal of this add-on is unpaid. |
| `403` | Forbidden if the caller is not an admin of the team |
| `409` | The add-on is being charged by another request; try again |

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/billing/add-on' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "team_id": "your_team_id",
  "add_on": "unified:crm"
}'
```

### JavaScript

```javascript
const body = {
  "team_id": "your_team_id",
  "add_on": "unified:crm"
};

const response = await fetch('https://api.truto.one/billing/add-on', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/billing/add-on"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "team_id": "your_team_id",
    "add_on": "unified:crm"
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())
```
