---
name: api.21.cash
description: api.21.cash provides two endpoints for interacting with 21.cash payment links on the Base network (eip155:8453), both requiring USDC v2 payments. One endpoint fetches the content behind a paylink after submitting an exact 10000 USDC atomic unit payment, while the other returns payment link metadata (recipient address, amount, chain) before or after payment.
host: api.21.cash
---

# api.21.cash

api.21.cash is a payment-link resolution service built on the x402 paywall protocol, operating exclusively on Base with USDC v2. It serves agents that need to inspect or unlock 21.cash payment links — either by reading link metadata before committing funds, or by submitting the required fixed payment to retrieve gated content. It does not support variable amounts, other tokens, or other chains.

## When to use this host

Use api.21.cash when an agent needs to inspect or unlock a 21.cash payment link on Base using USDC v2. Use fetch-paylink-details first if the agent needs to confirm destination and amount before paying. Use fetch-21cash-paylink when the agent is ready to submit the fixed 10000 USDC atomic unit payment and retrieve gated content. Do not use this host for variable-amount payments, non-USDC tokens, or chains other than Base — those scenarios are not supported. This host is also not suitable for broadcasting arbitrary on-chain transactions; it only handles the specific x402 paywall flow for 21.cash links.

## Capabilities

### PayLink Metadata Retrieval

Returns the details of a 21.cash payment link — including router address, required USDC amount, and chain — without executing an on-chain transaction beyond the x402 payment gate.

- **`fetch-paylink-details`** — Returns payment link details for a specific 21.cash paylink, including the recipient router address, USDC amount, and chain information on Base (eip155:8453).

### PayLink Content Unlock

Submits an exact 10000 USDC v2 payment on Base to satisfy the x402 paywall and retrieves the content or resource behind a 21.cash payment link.

- **`fetch-21cash-paylink`** — Fetches a 21.cash payment link resource on Base (eip155:8453), requiring an exact payment of 10000 USDC (v2) units to unlock the linked content.

## Workflows

### Inspect Then Unlock PayLink

*Use when an agent needs to verify payment link details (recipient, amount, chain) before committing to the payment and unlocking the gated content.*

1. **`fetch-paylink-details`** — Retrieve payment link metadata — router address, required USDC amount, and chain — to confirm the payment target before proceeding.
2. **`fetch-21cash-paylink`** — Submit the exact 10000 USDC v2 payment on Base to unlock and retrieve the content behind the payment link.

## Skill reference

### `fetch-21cash-paylink`

**21.cash PayLink** — Fetches a 21.cash payment link resource on Base (eip155:8453), requiring an exact payment of 10000 USDC (v2) units to unlock the linked content.

*Use when:* Use when an agent needs to retrieve the content behind a 21.cash payment link and is prepared to submit an exact USDC payment of 10000 atomic units on the Base network to satisfy the x402 paywall.

*Not for:* Do not use for variable-amount payments or non-USDC tokens; this endpoint requires an exact fixed amount of USDC v2 on Base only.

**Inputs:**

- `asset` (string, required) — ERC-20 contract address of the payment token on the target network. Must be the USDC v2 contract on Base.
- `payTo` (string, required) — Recipient wallet address that receives the payment.
- `amount` (string, required) — Exact payment amount in atomic units (no decimals). Must be exactly 10000 for this endpoint.
- `scheme` (string, required) — Payment scheme; must be 'exact' indicating a fixed amount is required.
- `network` (string, required) — CAIP-2 network identifier specifying the chain for payment.
- `maxTimeoutSeconds` (integer, required) — Maximum seconds the payment proof must be submitted within after the paywall challenge is issued.

**Returns:** Returns success=true, a confirmation message, and a content object with the link name, description, routerAddress, amount (10000), chainId (8453), and chainName ('Base'), plus an empty receipt object.

**Example:** `GET https://api.21.cash/api/links/0x7784486915fE4679d285cf253e08313532dDC0B0`

---

### `fetch-paylink-details`

**21.cash USDC PayLink** — Returns payment link details for a specific 21.cash paylink, including the recipient router address, USDC amount, and chain information on Base (eip155:8453).

*Use when:* Use when an agent needs to retrieve the details of a 21.cash payment link — including the destination address, required USDC amount, and chain — before initiating or confirming a payment.

*Not for:* Do not use for initiating or broadcasting the actual on-chain payment transaction; this endpoint only returns payment link metadata after the x402 payment is made.

**Inputs:**

- `paylink_address` (string, required) — The Ethereum-style address identifying the 21.cash paylink resource, embedded in the URL path.

**Returns:** Returns success=true, a confirmation message, and a content object with the paylink name, description, routerAddress, amount (100000 USDC atomic units), chainId 8453, and chainName Base, plus an empty receipt object.

**Example:** `GET https://api.21.cash/api/links/0x8c913b70Db8FAcDAdc37BC2530559DBE879b95b5`

---
