Pay x402 Resource With Agent
agent_x402_payPays for and fetches an x402-protected HTTPS resource using a wallet's ERC-7710 delegation, enabling AI assistants to access paid APIs and content.
Instructions
Pay and fetch an x402-protected HTTPS resource. The default agent profile spends through the main wallet's ERC-7710 delegation; explicitly pass agent-eoa: only for raw agent-wallet payment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS x402-protected resource URL. | |
| body | No | Optional string or JSON body. Only allowed with POST. | |
| chain | No | EVM network for x402 payment. Defaults to Base. | |
| method | No | HTTP method. Defaults to GET; body implies POST. | |
| headers | No | Optional string headers. Authorization, Cookie, Host, and payment headers are blocked. | |
| walletId | No | Agent wallet ID. Alternative to profileId; resolves to the delegated agent:<walletId> profile. | |
| profileId | No | Agent wallet profile ID. Defaults to agent:<walletId> delegated x402. Use agent-eoa:<walletId> only when the user explicitly wants raw local agent-wallet payment. | |
| timeoutMs | No | Request timeout in milliseconds. Defaults to 30000. | |
| maxPayment | No | Maximum payment in decimal token units, e.g. 0.10 USDC. Required unless maxPaymentUnits is provided. | |
| tokenDecimals | No | Decimals for maxPayment. Defaults to 6 for USDC. | |
| maxPaymentUnits | No | Maximum payment in raw token units. Required unless maxPayment is provided. | |
| maxResponseBytes | No | Maximum response body bytes returned by MCP. Defaults to 1000000. |