> For the complete documentation index, see [llms.txt](https://docs-processing.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-processing.crypto-chief.com/getting-started/billing-model.md). Agents can also search and read this documentation through its [MCP server](https://docs-processing.crypto-chief.com/~gitbook/mcp).

# Billing Model

## Billing Model

Crypto Chief Processing uses a **postpaid credit model**. You can start calling the API immediately without topping up your balance: each call is metered against your API Credit balance, and the balance is allowed to go negative up to a **$10 soft debt cap** before non-critical endpoints start returning errors. Top up at any time to clear the debt and restore full access.

Both sides of this are available over the API, free of charge: [Credits Balance](https://docs-processing.crypto-chief.com/credits/credits-balance.md) reads your standing without spending a call, and [Top Up Credits](https://docs-processing.crypto-chief.com/credits/credits-topup.md) creates a payment page.

### Quick reference

| Behavior                           | Default                                                                                            |
| ---------------------------------- | -------------------------------------------------------------------------------------------------- |
| Mode for new and existing projects | Postpaid                                                                                           |
| Soft debt cap                      | **$10 USD** (credits)                                                                              |
| At the cap                         | non-critical endpoints return `DEBT_LIMIT_EXCEEDED` until top-up                                   |
| Below the cap                      | calls succeed, debt accumulates silently                                                           |
| Always require positive balance    | sweep, transaction execute, payouts that use service-paid gas or auto-conversion (see table below) |

### How debt accumulates

Every billed API call deducts credits from your project balance:

* If `balance ≥ call cost` → normal deduction.
* If `balance < call cost` but you're within the debt cap → deduction succeeds, balance goes negative.
* If deduction would cross the debt cap → call returns HTTP `402 DEBT_LIMIT_EXCEEDED`.

Top up from the dashboard, or over the API with [Top Up Credits](https://docs-processing.crypto-chief.com/credits/credits-topup.md). Incoming credits clear the debt first and only then contribute to positive balance.

### Endpoints that always require positive balance

These endpoints are blocked when your balance can't cover the call cost, regardless of how much debt headroom you have left. The platform either fronts on‑chain gas or releases crypto outside your project on these calls, so we never let them proceed on debt.

| Endpoint                        | Why hard‑gated                                                                                                                                                            |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `POST /v1/sweeps/force`         | Platform pays gas to move funds from transit → master wallet.                                                                                                             |
| `POST /v1/transaction/execute`  | Manual outgoing transaction — could transfer crypto out before debt is settled.                                                                                           |
| `POST /v1/payout/execute`       | Hard‑gated when project `fee_mode ∈ {service, mix}` **or** request has `auto_convert: true` (swap). Soft (debt allowed) when `fee_mode=client` **and** no `auto_convert`. |
| `POST /v1/payout/batch/execute` | Same rule as single payout — batch is hard‑gated if any item triggers swap or the project's `fee_mode` uses service‑paid gas.                                             |

When blocked, the response is HTTP `402 Payment Required`:

```json
{
  "ok": false,
  "error": "INSUFFICIENT_CREDITS",
  "msg": "Insufficient credits",
  "balance_before": 250,
  "balance_after": 250,
  "idempotency_key": "..."
}
```

{% hint style="info" %}
**`fee_mode` is a per‑project setting**, not per‑request. Set it in your project's fee settings. With `fee_mode=client` the merchant wallet pays the network fees of the transfer, so the call itself can run on debt.

This is about the *call*, not about everything it may cost. On TRON with `gas_source=rented` the platform still supplies the energy in every fee mode, and bills it to your credits afterwards — a charge that is accepted on debt rather than blocked.
{% endhint %}

### Endpoints that always succeed

These are billed but never blocked — the work has already happened by the time billing fires, and refusing would mean the platform silently absorbs the loss:

* **Webhook deliveries** (`/v1/webhook/*`) — the HTTP push to your endpoint runs first; billing follows.
* **Gas reimbursement** after a successful on-chain payout or withdrawal. For sweeps funded by a service wallet, the charge covers confirmed network fees, including gas consumed by a reverted EVM transaction. [Sweep charges](https://docs-processing.crypto-chief.com/sweeps/overview.md#what-a-sweep-costs)
* **TRON energy** supplied under `gas_source=rented` — the energy was in place before the transfer was signed, so the cost is already incurred by the time it is billed.

These calls accept overdraft regardless of your debt cap.

### TRON: paying for energy instead of burning TRX

A TRC-20 transfer consumes **energy**. An account that holds none pays for it by burning TRX at the network's spot rate, and that is the most expensive way there is to move a token on TRON — it is why moving funds off a TRON deposit wallet has meant sending it TRX first, watching most of it burn, and collecting the remainder later.

The platform can supply that energy for the moment of the transfer instead, so the wallet burns nothing. It is a setting, `gas_source`, held per project and overridable per wallet — see [Auto-Sweep Settings](https://docs-processing.crypto-chief.com/sweeps/auto-sweep-settings.md):

| `gas_source` | What happens                                                        |
| ------------ | ------------------------------------------------------------------- |
| `native`     | The wallet burns its own TRX.                                       |
| `rented`     | **The default.** The platform supplies the energy for the transfer. |

A project or wallet that has never set `gas_source` is read as `rented`. To have the wallet burn its own TRX, set `native` explicitly — leaving it unset is not the same thing.

**How you pay for it.** The platform always supplies the energy first — it has to be in place before the transfer is signed. The cost then comes back to you **billed to your API credits**, exactly like any other gas the platform fronts, and that is true in **every** `fee_mode`.

{% hint style="warning" %}
**Where the rental shows up, and where it does not.** On a **sweep** it is included in `total_fee_usd` on the sweep record and in the `sweep.confirmed` webhook, so the number you see is the whole cost.

On a **payout or withdrawal** it is not. `total_fee_est_fiat` and `total_fee_paid_fiat` cover the on-chain gas only, so on TRON with `gas_source=rented` you will see a credits charge that no fee field accounts for. It is one cost billed once, not a double charge — reconcile the rental from your credits ledger rather than expecting it in the payout's fee.
{% endhint %}

| `fee_mode`                 | How the energy is settled       |
| -------------------------- | ------------------------------- |
| `service`, `mix`, `client` | **Billed to your API credits.** |

Nothing is taken out of your wallets to pay for it, and no extra on-chain transaction is made on your behalf to collect it.

The charge is applied **after** the transfer is on chain, when the real cost is known, and it is accepted on debt — see [Endpoints that always succeed](#endpoints-that-always-succeed). So a balance that was sufficient when you made the call can still go negative afterwards.

`gas_source` and `fee_mode` remain independent settings answering different questions: `gas_source` decides *what is bought* for the transfer, `fee_mode` decides *who covers the network fees* of the transfer itself.

{% hint style="info" %}
This applies to **TRON only**. Energy is delegatable between accounts; nothing equivalent exists on EVM, Solana, TON or the UTXO chains, so the setting is carried and ignored there. You can keep one value for the whole project rather than one per chain.

It also is not limited to sweeps — the same rule applies wherever the platform sends a TRC-20 transfer on your behalf, including payouts and executed transactions.
{% endhint %}

A small amount of TRX may still be sent to cover **bandwidth**, which is a separate resource from energy and is not covered by this setting. It is a fraction of what an energy burn would have cost.

### Error codes

<table><thead><tr><th width="218">Code</th><th>HTTP</th><th>When</th><th>What to do</th></tr></thead><tbody><tr><td><code>INSUFFICIENT_CREDITS</code></td><td>402</td><td>Hard‑gated endpoint with balance below call cost</td><td>Top up</td></tr><tr><td><code>DEBT_LIMIT_EXCEEDED</code></td><td>402</td><td>Postpaid debt cap reached on a regular endpoint</td><td>Top up to clear debt</td></tr></tbody></table>

### Scope

* Postpaid applies to the **Processing API** (this docs site).
* **RPC Gateway**, **Unified API**, **EventStream** and **AML Intelligence** use the same shared API Credit balance but on a separate billing path — they remain prepaid. A negative balance from Processing usage does not affect RPC quotas in isolation; the underlying balance is shared, but only Processing accepts new charges on debt.

### Notes

* The postpaid flag and the debt cap are set per project. Default is postpaid, cap = $10. Need a higher (or custom) cap for high‑volume accounts? Contact support.
* Top‑up reduces debt first, then adds positive balance.
* Calls are still recorded and billed for analytics and history, regardless of whether they succeed on positive balance or on debt.
