Fetch a paid sandbox URL
sandbox_payFetches one of the sandbox's paid endpoints (HTTP 402, x402) through the spendctl sidecar, which applies the sandbox agent's budget, allowlist and approval policy, pays with the throwaway wallet if allowed, and returns the response. Use it for every paid call in the sandbox: with dryRun to see the decision without paying, with approvalId to complete a payment that was held and then approved. The endpoints are https://weather.sandbox.spendctl.dev/weather?city= ($0.01) and https://search.sandbox.spendctl.dev/search?q= ($0.02), as listed by sandbox_create and documented at https://spendctl.dev/docs/sandbox/; any other host is refused. Returns a one-line summary (HTTP status, amount paid, decision, receipt id) followed by the response body, or the refusal with its reason, or an approval id when the payment is waiting for a human. Only sandbox hosts exist and no real funds are involved; the request is always a GET and responses are clipped at 20,000 characters. Example: url https://weather.sandbox.spendctl.dev/weather?city=Kyoto
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL of a sandbox endpoint, e.g. https://weather.sandbox.spendctl.dev/weather?city=Kyoto | |
| dryRun | No | true: only report what spendctl would decide; never pay | |
| approvalId | No | The approval id from an earlier sandbox_pay result, after approve accepted it, to complete that held payment | |
| sandbox_id | Yes | The sandbox_id returned by sandbox_create (32 hex characters) | |
| idempotencyKey | No | Reuse the same key when retrying a call so the sandbox is never charged twice, e.g. "kyoto-1" |