build_x402_paywall_challenge
Generate a standards-compliant HTTP 402 (x402 v2) payment challenge JSON payload, base64 PAYMENT-REQUIRED header, and 1-click PayGate checkout_url for monetizing any REST or AI-agent API endpoint in USDT/USDC. Purely read-only deterministic payload builder with zero network calls or side effects. Returns JSON with x402Version (2), amount_usd, checkout_url, payment_required_header_b64, and CAIP-2 accepts array.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resource_url": "<resource_url>",
"price_usd": "<price_usd>",
"recipient_wallet": "<recipient_wallet>"
},
"name": "build_x402_paywall_challenge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price_usd | Yes | Required per-call or pass price in USD (e.g. `0.05` or `9.0`). | |
| description | No | Human- and agent-readable description of what the paid endpoint delivers upon settlement. | Paid API endpoint (non-custodial USDT/USDC settlement) |
| resource_url | Yes | Protected HTTPS endpoint URL being monetized (e.g. `https://api.example.com/v1/pro-signal`). | |
| recipient_wallet | Yes | Merchant's EVM wallet address (`0x...`) to receive on-chain USDC/USDT payments across Base, Polygon, Arbitrum, and BSC. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accepts | Yes | ||
| amount_usd | Yes | ||
| x402Version | Yes | ||
| checkout_url | Yes | ||
| payment_required_header_b64 | No |