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

# Payments

> Pay per call with stablecoins over x402 or MPP.

By default you pay with prepaid [credits](/concepts/pricing). You can also pay per call with stablecoins over two rails:

* **x402** pays in USDC on Base, at `x402.orthogonal.com`.
* **MPP** (Machine Payments Protocol) pays in USDC.e on [Tempo](https://tempo.xyz), at `mpp.orthogonal.com`.

Both work the same way: your request gets a `402 Payment Required`, your client signs a payment and retries, and the payment is settled before the call runs.

## x402

Endpoints live at `https://x402.orthogonal.com/{api}/{path}`.

### CLI

Pay from the terminal with Coinbase's [Agentic Wallet CLI](https://docs.cdp.coinbase.com/agentic-wallet/cli/welcome) (`awal`). You need:

* Node.js, to run `awal` with `npx`.
* A wallet funded with USDC on Base. `npx awal fund` opens the funding flow.
* An email to sign in with `awal auth login`.

```bash theme={null}
# Sign in, then check the wallet
npx awal@latest auth login you@example.com
npx awal@latest status

# Pay for and call the endpoint (USDC on Base, handled automatically)
npx awal@latest x402 pay 'https://x402.orthogonal.com/olostep/v1/scrapes' \
  -X POST \
  -d '{"url_to_scrape": "https://example.com"}'
```

### Code

Set `PRIVATE_KEY` to an EVM wallet holding USDC. The client handles the 402 for you.

<CodeGroup>
  ```javascript Node.js theme={null}
  import { wrapFetchWithPayment } from "x402-fetch";
  import { privateKeyToAccount } from "viem/accounts";

  const account = privateKeyToAccount(process.env.PRIVATE_KEY);
  const fetchWithPayment = wrapFetchWithPayment(fetch, account);

  const res = await fetchWithPayment("https://x402.orthogonal.com/olostep/v1/scrapes", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ url_to_scrape: "https://example.com" }),
  });
  console.log(await res.json());
  ```

  ```python Python theme={null}
  import os, requests
  from eth_account import Account
  from x402.clients.requests import x402_http_adapter

  account = Account.from_key(os.environ["PRIVATE_KEY"])
  session = requests.Session()
  session.mount("https://", x402_http_adapter(account))

  res = session.post(
      "https://x402.orthogonal.com/olostep/v1/scrapes",
      json={"url_to_scrape": "https://example.com"},
  )
  print(res.json())
  ```
</CodeGroup>

Install with `npm install x402-fetch viem` or `pip install x402 eth-account requests`.

## MPP

Endpoints live at `https://mpp.orthogonal.com/{api}/{path}`.

### CLI

Pay from the terminal with `mppx`:

```bash theme={null}
# Create and autofund a Tempo account (stored in your keychain)
npx mppx account create

# Pay for and call the endpoint
npx mppx -X POST -J '{"url_to_scrape": "https://example.com"}' \
  'https://mpp.orthogonal.com/olostep/v1/scrapes'
```

### Code

```typescript theme={null}
import { privateKeyToAccount } from "viem/accounts";
import { Mppx, tempo } from "mppx/client";

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount(process.env.PRIVATE_KEY) })],
});

// fetch now settles 402 payments on Tempo
const res = await fetch("https://mpp.orthogonal.com/olostep/v1/scrapes", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ url_to_scrape: "https://example.com" }),
});
console.log(await res.json());
```

Install with `npm install mppx viem`.

## Which tools support this?

Every payable tool in the [catalog](https://orthogonal.com/discover) works with both rails. Use the `integrate` tool (MCP or `/v1/integrate`) to get a ready-to-paste snippet for any endpoint.
