pay_x402
Pay the quoted price for an HTTP resource using the x402 protocol, with spend policy and audit enforcement.
Instructions
Fetch a paid HTTP resource, paying for it over the x402 protocol ("402 Payment Required"). Use this for pay-per-request APIs that quote a price in the 402 response; the spend policy decides whether the quoted price is allowed, blocked, or requires human approval.
The payment is a signed one-time authorization for EXACTLY the quoted amount — never more — and it only happens if the quote passes policy.
Args: url: the resource to fetch (https) max_amount: the most you expect this to cost, in whole token units (e.g. 0.01 for 1 cent of USDC). If the server demands more, the request is refused before policy even runs. reason: what the purchase is for (recorded in the audit log)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| reason | No | ||
| max_amount | Yes |