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

# Agents

> Let AI agents take payments and run billing for a business, within the access the business approves.

Give an AI agent real work on your payments. An agent on Ionic creates
checkout sessions, invoices, and payment links, looks up and creates customers,
keeps products up to date, and reads payment history. The business decides what each agent
can do, can stop it at any time, and sees every call it makes.

> [card] [Give your agent a payment tool](https://docs.ionicfi.com/agents/quickstart.md)
>
> Create an agent, let it open a checkout session, and pay it with a test
> card.

> [card] [Connect an MCP client](https://docs.ionicfi.com/guides/connect-ai-assistants.md)
>
> Sign in from Claude, ChatGPT, Codex, or another compatible client and
> choose what its agent can do.

## What agents do on Ionic

> [card] [Get paid](https://docs.ionicfi.com/agents/quickstart.md)
>
> Create checkout sessions, invoices, and payment links. Customers complete
> their own payments.

> [card] [Run the back office](https://docs.ionicfi.com/api-reference/agent-permissions.md)
>
> Look up and create customers, manage products and prices, and read
> transactions.

> [card] [Buy for the business](https://docs.ionicfi.com/guides/spend-platform-integration.md)
>
> A platform's agent completes purchases with a business card the business
> approves for it, within approval limits.

An agent works through the operations listed in
[agent permissions](https://docs.ionicfi.com/api-reference/agent-permissions.md). Direct charges,
refunds, payouts, and account settings stay with the business in the dashboard
and the API.

## How an agent works

```mermaid theme={null}
flowchart TD
    A["Agent identity<br/>agt_… and @handle"] --> B["Business approves access<br/>permissions, per mode"]
    B --> C["Agent calls Ionic<br/>with its own key or over MCP"]
    C --> D{"Ionic checks the agent,<br/>its access, and the permission"}
    D -->|allowed| E["Request runs"]
    D -->|refused| F["Refused with a reason"]
    E --> G["Agent activity"]
    F --> G
```

**1. An identity**

Every agent has an ID (`agt_…`) and a handle under the business's prefix,
such as `@juniper-billing`. Create it on the **Agents** page, let an MCP
connection create it, or create it from a platform's server with the
[Agents API](https://docs.ionicfi.com/api-reference/agents.md).

**2. Access the business approves**

Access is granted per mode, test or live, with specific permissions. The
business grants it when it creates the agent or connects an MCP client.
A platform's agent gets access when an owner of the business approves an
agent grant request.

**3. A check on every request**

The agent calls Ionic with its own key or over MCP. Ionic checks the
agent's status, its access in that mode, and the permission on every
request.

**4. A record of every call**

**Agent activity** shows each call an agent made, each change to the
agent or its access, and each call Ionic refused, with the reason.

Learn how agent keys, access, and permissions fit together in
[How agents work](https://docs.ionicfi.com/agents/concepts.md).

## Choose a setup

| Your agent | Start with |
| - | - |
| An agent you build for your own business | [Connect your AI agent](https://docs.ionicfi.com/guides/agents.md) |
| An AI assistant in an MCP client | [Connect an AI agent over MCP](https://docs.ionicfi.com/guides/connect-ai-assistants.md) |
| Your platform's agent, working for the businesses you serve | [Manage your platform's agents](https://docs.ionicfi.com/connect/agents.md), then [connect it to a business](https://docs.ionicfi.com/guides/connect-agents.md) |

## Stay in control

* **Choose permissions.** Grant only what the task needs, and remove a
  permission to block it on the agent's next request.
* **Pause or retire an agent.** Suspending an agent stops every key for it on
  its next request; resuming restores them. Deactivation is permanent.
* **Revoke a platform's agent.** A business can revoke a platform agent's
  access at any time. The platform has to ask again to get it back.

See [Manage access](https://docs.ionicfi.com/guides/agents.md#manage-access) for each control in the
dashboard.

## What's next

> [card] [Agent quickstart](https://docs.ionicfi.com/agents/quickstart.md)
>
> Take a test payment through an agent from start to finish.

> [card] [Agent permissions](https://docs.ionicfi.com/api-reference/agent-permissions.md)
>
> Each permission and the API operations it allows.

> [card] [Agents API](https://docs.ionicfi.com/api-reference/agents.md)
>
> Create and manage your platform's agents from your server.


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