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

# pay.sh

> Use Syntalic from any agent that has the pay CLI attached.

[pay.sh](https://pay.sh) is a registry, CLI, and MCP server for paid APIs. Syntalic is listed in the pay.sh registry, so an agent wired to pay.sh can discover and call our endpoints with no extra config. The pay CLI answers the `402` challenge and signs the payment from a local wallet.

pay signs payments on Solana. With Syntalic it pays over [x402](https://syntalic.com/docs/payments/x402.md) in USDC on Solana, so fund your pay wallet with USDC on Solana.

> [!NOTE]
>
> pay.sh's registry listing can lag the live API. It currently lists a subset of the Shopper, Marketing and Analyst endpoints, not the measures, social or ontology routes, and still includes the inflation endpoint, which is currently unavailable. The [live OpenAPI specification](https://api.syntalic.com/openapi.json) lists every route and price.

## 1. Install the pay CLI

On macOS:

```bash theme={null}
brew install pay
```

Elsewhere:

```bash theme={null}
npm install -g @solana/pay
```

Check the install with `pay --version`.

## 2. Set up a wallet

```bash theme={null}
pay setup
pay whoami
```

`pay setup` creates your wallet and protects it with Touch ID on macOS, Windows Hello on Windows, GNOME Keyring on Linux, or 1Password. Fund it with USDC on Solana before calling Syntalic; see [pay.sh's docs](https://pay.sh/docs/get-started/agent-quickstart) for funding options.

> [!WARNING]
>
> `pay --sandbox` runs with a test wallet. It is useful for trying pay's discovery tools, but it can't pay Syntalic: our API accepts only real USDC.

## 3. Launch an agent with Pay MCP attached

```bash theme={null}
pay claude
# or
pay codex
```

This injects the Pay MCP server and payment-safety instructions into the agent session. The agent can now discover paid providers, inspect their endpoints, and make wallet-approved calls.

## 4. Have the agent discover and call Syntalic

Inside the agent session, the typical tool flow is:

```txt theme={null}
search_skills -> get_skill_endpoints -> curl
```

The agent searches the registry for "syntalic" or your use case, fetches the exact endpoint URL from `get_skill_endpoints`, and curls it. pay asks you to approve the payment in your wallet, then signs it and retries the call.

> [!TIP]
>
> Always use the endpoint URL returned by `get_skill_endpoints` rather than constructing one. Check the registry against Syntalic's [live OpenAPI specification](https://api.syntalic.com/openapi.json) for current route availability and prices.

## Manual MCP config

If you'd rather not launch your agent through `pay claude`, add Pay as an MCP server yourself. For Claude Code:

```bash theme={null}
claude mcp add pay -- pay mcp
```

For Cursor (`~/.cursor/mcp.json`), Windsurf (`~/.codeium/windsurf/mcp_config.json`) or another client, add this to its MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "pay": {
      "command": "pay",
      "args": ["mcp"]
    }
  }
}
```

## What happens behind the scenes

1. The agent calls `search_skills` (a Pay MCP tool) and finds Syntalic in the registry.
2. It calls `get_skill_endpoints` to get the exact URL for the call it wants, for example `/v1/shopper/best-price`.
3. It issues a `curl` against that URL.
4. The Syntalic API returns `402 Payment Required` with the price and payment options.
5. pay asks you to approve the payment, then signs an x402 payment in USDC on Solana with your local wallet.
6. The retried request returns the paid response.

You don't manage signing keys directly; pay does. See [x402](https://syntalic.com/docs/payments/x402.md) for the underlying protocol.

## Next steps

> [card] [pay.sh agent quickstart](https://pay.sh/docs/get-started/agent-quickstart)
>
> The official pay.sh walkthrough for launching Claude or Codex with Pay MCP.

> [card] [Pricing](https://syntalic.com/docs/reference/pricing.md)
>
> What each endpoint costs.


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