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

# Payments overview

> Xenarch pay links: checkout, subscription, invoice and donation links paid in USDC on Base, straight to your wallet, at a hosted checkout page.

A pay link is a payment request that you sign with your wallet. Xenarch hosts it at `https://pay.xenarch.com/l/<link_id>`. The buyer pays in USDC on Base, and the USDC moves from the buyer's wallet to your wallet. There is no Xenarch contract between the two wallets, and Xenarch takes no fee.

## Link kinds

The dashboard and the hosted checkout support four kinds.

| Kind | Use it for |
| - | - |
| `checkout` | A payment page or button. Buyers pay, you fulfill. A checkout link can be paid many times. |
| `subscription` | Recurring payments on a cadence. See [Subscriptions](https://docs.xenarch.com/payments/subscriptions.md). |
| `invoice` | Billing one client for a one-off or itemized amount. In the dashboard an invoice is itemized, numbered automatically, due Net 14, single-use and set to expire after 30 days by default. |
| `donation` | Pay what you want. The supporter picks the amount. A donation link can show a fundraising goal with a progress bar. |

The dashboard also shows ticket, paywall and metered usage tiles marked "soon". They are not available. The hosted checkout shows a not-found page for any kind other than the four above.

## Amounts

The `amount` of a link is a decimal string in USDC, such as `"25.00"` or `"0.99"`. Set it to `"open"` to let the payer choose, and add the optional `min_amount` and `max_amount` bounds. A payment below `min_amount` is recorded as underpaid, and a payment above `max_amount` as overpaid.

All links settle in USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, 6 decimals) on Base mainnet (chain ID 8453). No other token or network is supported.

## How a payment moves

**1. The buyer opens the link**

The checkout page loads the link from the API. The API re-checks your signature over the link's terms on every load, so a link whose stored terms were changed does not render.

**2. The buyer pays by signature**

The checkout checks the default facilitator stack (PayAI, xpay, Mogami, Heurist, Daydreams). When at least one facilitator is healthy, the buyer signs an EIP-3009 `transferWithAuthorization` for USDC to your wallet. A third-party x402 facilitator submits it on Base and pays the gas. The buyer's wallet needs only USDC.

**3. Or the buyer sends a direct transfer**

When no facilitator is healthy, or when the buyer chooses it, the buyer sends a standard USDC transfer from their own wallet and pays the gas, about \$0.001.

**4. Xenarch verifies and records the payment**

Xenarch reads the transaction from Base, finds the USDC `Transfer` to your wallet, compares the amount with the link, and records the payment as `confirmed`, `underpaid` or `overpaid`.

**5. You get notified**

Xenarch queues your [webhook](https://docs.xenarch.com/payments/webhooks.md) in the same database transaction as the payment record, and the checkout sends the buyer back to your return URL.

Xenarch never broadcasts a transaction and never holds funds. A receipt PDF for each confirmed payment is available at `GET /v1/receipts/{tx_hash}/pdf`, and an invoice link has its PDF at `GET /v1/links/{link_id}/invoice.pdf`.

## Ways to take a payment

> [card] [Create a pay link](https://docs.xenarch.com/payments/pay-links.md)
>
> From the dashboard, the CLI, the TypeScript or Python SDK, or the REST API.

> [card] [Checkout and embed](https://docs.xenarch.com/payments/checkout-embed.md)
>
> Share the hosted URL, add the embed script, or use the React component.

> [card] [Subscriptions](https://docs.xenarch.com/payments/subscriptions.md)
>
> Reminder mode or permit mode, plus metered billing.

> [card] [Webhooks](https://docs.xenarch.com/payments/webhooks.md)
>
> Signed events for payments, renewals and charges.

## Agents can pay links too

An AI agent can pay a pay link by its id. The CLI command `xenarch pay-link <id>` and the MCP tool `xenarch_pay_link` request an x402 envelope for the link from the API, sign it, and settle it through a facilitator. See [MCP tools](https://docs.xenarch.com/mcp/tools.md).


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