> ## Documentation Index
> Fetch the complete documentation index at: https://docs.60db.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Funds

> Start a checkout to buy credit top-ups (Creator and Pro) or add Dialer balance

Creates a Dodo checkout session. After the payment succeeds, the credits are added to the workspace. Open the returned `checkout_url` in a browser to pay.

For credit top-ups, the credits are fixed at checkout using the plan rate. See [Plans, Credits & Top-ups](https://docs.60db.ai/get-started/plans-credits-and-top-ups.md).

> [!NOTE]
>
> Only the **workspace owner** can call this endpoint. It is protected by the `billing:manage` permission.

## Request

### Headers

**Authorization** `string` *required*

Bearer token (JWT or API key)

**Content-Type** `string` *required*

application/json

### Body

**amount** `number` *required*

Amount in USD. For credit top-ups, must be between `10` and `1000`.

**purpose** `string`

`credits` (default), `wallet` (alias for `credits`), or `dialer`. `credits` is available only on Creator and Pro. `dialer` adds to the Dialer balance, is not plan-gated, and skips the $10–$1,000 range.

**coupon\_code** `string`

Optional coupon. It lowers the price you pay. It does not change the credits.

## Response

**200 OK:**

**data.checkout\_url** `string`

Dodo checkout URL to complete payment

**data.credits** `integer | null`

Credits this top-up buys at the plan rate. `null` for `dialer`.

**data.rate\_credits\_per\_usd** `number | null`

Plan rate used for the quote. `null` for `dialer`.

**data.amount** `number`

Amount entered

**data.charge\_amount** `number`

Amount charged at checkout, after any coupon discount

**data.credit\_amount** `number`

Amount credited to the wallet

**data.currency** `string`

Always `USD`

```bash cURL theme={null}
curl -X POST https://api.60db.ai/billing/add-funds \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"amount": 25, "purpose": "credits"}'
```

```json Response (Creator, $25) theme={null}
{
  "success": true,
  "message": "Checkout created for wallet top-up",
  "data": {
    "checkout_url": "https://checkout.example.com/session/...",
    "amount": 25,
    "charge_amount": 25,
    "credit_amount": 25,
    "credits": 454545,
    "rate_credits_per_usd": 18181.818,
    "currency": "USD",
    "coupon": null
  }
}
```

## Errors

| Status | error\_code | Meaning |
| - | - | - |
| 400 | `TOPUP_AMOUNT_OUT_OF_RANGE` | Amount is below $10 or above $1,000 for `credits`. `details` has `min_usd` and `max_usd`. |
| 400 | — | `amount` is not a positive number, or `purpose` is not `credits`, `wallet` or `dialer` |
| 403 | `TOPUP_NOT_AVAILABLE_ON_PLAN` | `credits` requested on a plan other than Creator or Pro. `details` has `plan_slug` and `eligible_plans`. |
| 403 | — | Caller is not the workspace billing owner |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.