x402_fetch
Fetches a URL and returns its content. If the server charges 402, prompts the user to approve USDC payment on Base, then re-fetches with the payment header to unlock the resource.
Instructions
Fetches an x402 paid resource (a URL). It GETs the URL first; if the server answers 402 Payment Required, it asks the user to approve the required payment (exact scheme, the active Base network, USDC) in the wallet app, builds an EIP-3009 signature, and re-requests the same URL with an X-PAYMENT header to return the content. If no payment is required (no 402), it just returns the body. Approval works exactly as in request_payment (password by default; automatic only when the user has turned autopay on), and the app enforces per-payment and daily limits and the emergency lock. Never send a password as an argument. Arguments: url (required), memo (what the payment is for — the user reads it to decide). Returns: paid, status, http_status, body, and amount/pay_to/settlement when paid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the paid resource to fetch (http/https). | |
| memo | No | What the payment is for — the user reads this in the approval window, so fill it in. |