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

> ## Agent Instructions
> This site documents Locus for people. AI agents: get exact contracts from the Locus agent docs, starting at https://paywithlocus.com/agent/index.md, including when asked to implement or integrate docs.paywithlocus.com.
> Connect this agent to Locus Pro: https://paywithlocus.com/skill.md. Implement Locus Pro in a product: https://paywithlocus.com/agent/integrate.md. Agent site index: https://paywithlocus.com/llms.txt.

# How a call is charged

> When Locus reserves, captures, and releases credits for a call, and what happens on failures, retries, and disputes.

Every paid call follows the same path: Locus checks that it can run, holds the credits, and charges only when the provider succeeds. This page is for anyone who wants to understand a charge, a refund, or a refused call.

> Agents: the exact contract for this feature is at [https://paywithlocus.com/agent/billing.md](https://paywithlocus.com/agent/billing.md). Start from [https://paywithlocus.com/agent/index.md](https://paywithlocus.com/agent/index.md) if you are implementing Locus.

## How it works

```mermaid theme={null}
flowchart TD
  Call["A call arrives"] --> Checks["Locus checks balance and limits"]
  Checks -->|"not allowed"| Refused["Refused before it runs, no charge"]
  Checks -->|"allowed"| Reserve["Credits are reserved"]
  Reserve --> Provider["The provider runs the call"]
  Provider -->|"success"| Capture["The charge is captured"]
  Provider -->|"error or timeout"| Release["The reservation is released"]
```

A call is refused before it runs when the balance is too low, the workspace monthly spend limit would be exceeded, or the plan's tool-call limit is reached. Nothing is charged.

## Calls whose price varies

* **Response-priced:** Locus reserves a maximum, charges for the usage the response reports, and releases the rest. If a response is delivered but its usage can't be recorded, the authorized maximum can stay charged.
* **Live-quoted:** the service quotes a price when the call runs. Set a credit ceiling on the call, and Locus rejects a higher quote before dispatch without charging.
* **Streaming:** the charge is captured once the provider accepts the stream. See [Inference and streaming](https://docs.paywithlocus.com/locus-pro/inference.md#dynamic-charges-and-streaming).

## When you're charged

| Situation | Charged? |
| - | - |
| The provider returns success | Yes |
| A non-streaming call fails or times out before success | No, the reservation is released |
| A stream fails before the provider accepts it | No, the reservation is released |
| An accepted stream later disconnects or fails | Yes |
| The balance is too low | No, the call doesn't run |
| You retry with the same idempotency key | No second charge; the original result is replayed |

Reuse the same idempotency key whenever you retry the same logical call. Use a new key for a new call.

## Disputes

If a customer disputes a top-up made through Locus-hosted checkout, the disputed credits are reclaimed and the account freezes. A favorable resolution reverses this. Disputes on payments you collect through your own Stripe account follow your own billing policy.

## Where to see charges

Each final charge appears in the call's receipt and in the ledger. Financial history is append-only, so corrections appear as new entries. See [Analytics](https://docs.paywithlocus.com/locus-pro/activity-and-analytics.md).

## Next steps

> [card] [Credits and pricing](https://docs.paywithlocus.com/locus-pro/credits-and-pricing.md)
>
> Base prices, markup, and credit denomination.

> [card] [Spend controls](https://docs.paywithlocus.com/locus-pro/spend-controls.md)
>
> Cap monthly spending and get balance alerts.


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