> ## 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.

# Track your customers

> Tag each call with the customer it was made for, and see spend per customer by name.

If your product serves its own customers through Locus Pro, tag each charge with the customer it was made for. You can then see what each customer costs you, by name, in **Customers**.

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

## How it works

Each tool call carries a small tag naming your product and the customer. Locus records the tag with the charge. A customer directory you keep from your server adds names and links, so the dashboard shows "Acme Health" instead of an ID.

```mermaid theme={null}
flowchart TD
  Call["Tool call tagged with your product and customer ID"] --> Charge["Charge recorded with the tag"]
  Dir["Your customer directory: names and links"] --> Page["Customers page"]
  Charge --> Page
  Page --> Focus["Analytics focused on one customer"]
```

## Tag your calls

Send the `X-Locus-Attribution` header on each tool call, or the `attribution` option in the [SDK](https://docs.paywithlocus.com/locus-pro/sdk.md):

```http theme={null}
X-Locus-Attribution: {"source":"support-app","customerId":"acct_8421"}
```

The customer ID only needs to be unique within its `source`, so two products can number their customers independently.

## See spend per customer

**1. Open Customers**

**Customers** lists every customer with spend in the period, with their
charges over time and top providers.

**2. Find a customer**

Search by name, website, or ID.

**3. Drill in**

Select a customer to open Analytics focused on them.

## Show names instead of IDs

Keep a customer directory from your server with a key that has `tenant:write`. Each entry pairs a `source` and customer ID with a name and, optionally, a website and a link to the customer in your own admin tool. You can send up to 50 customers per request.

If you remove a customer's name, their charges keep the customer ID and the dashboard shows the ID again. The [API reference](https://docs.paywithlocus.com/api-reference/introduction.md) covers the directory endpoints.

## Next steps

> [card] [Analytics](https://docs.paywithlocus.com/locus-pro/activity-and-analytics.md)
>
> Investigate spend by person, agent, and provider.

> [card] [Customer balances](https://docs.paywithlocus.com/locus-pro/customer-balances.md)
>
> Let customers pay for their own usage.


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