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

# Checkouts

> Create payment checkouts for humans and AI agents.

# Checkouts

Create checkout sessions via CLI. Each checkout generates a `checkoutUrl` (humans) and `x402Url` (AI agents).

## Create

```bash theme={null}
agenta pay checkout -a 50
agenta pay checkout -a 99.99 -c EUR -d "Annual subscription"
agenta pay checkout -a 25 --email buyer@example.com
```

### Flags

| Flag                       | Description                                  |
| -------------------------- | -------------------------------------------- |
| `-a, --amount <n>`         | Payment amount (required)                    |
| `-c, --currency <code>`    | Currency (EUR, USD). Defaults to org setting |
| `-d, --description <text>` | Shown on checkout page                       |
| `--email <email>`          | Pre-populate buyer email                     |

### Response

```json theme={null}
{
  "sessionId": "abc123",
  "status": "open",
  "amount": 50,
  "currency": "EURC",
  "checkoutUrl": "https://app.agentaos.ai/checkout/abc123",
  "x402Url": "https://app.agentaos.ai/gateway/v1/x402/abc123",
  "expiresAt": "2026-03-26T12:00:00Z"
}
```

* **`checkoutUrl`**: Share with human customers
* **`x402Url`**: Use for AI agent-to-agent payments

## Get

```bash theme={null}
agenta pay get <sessionId>
```

Poll this to check if payment completed (`status === "completed"`).

## List

```bash theme={null}
agenta pay list
agenta pay list --status completed --limit 5
```

| Flag           | Description                                         |
| -------------- | --------------------------------------------------- |
| `--status <s>` | Filter: `open`, `completed`, `expired`, `cancelled` |
| `--limit <n>`  | Results per page (default 10)                       |

## What's next?

* **Get notified on payment:** Set up [webhooks](/payments/webhooks) to receive real-time payment confirmations.
* **Machine to machine:** Share the `x402Url` with AI agents instead of the checkout URL. See [x402 payments](/sub/x402).
* **SDK integration:** Build checkout into your backend with the [Payment SDK](/sdk/pay-overview).
