> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axon402.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# governed_fetch

> High-level x402 HTTP client — the primary MCP tool

The preferred tool for making x402-capable HTTP requests. Handles the full pipeline: mandate check, payment signing, retry, and receipt.

## Input

### Required

| Field | Type | Description |
| :- | :- | :- |
| `url` | string | Target URL |
| `intent` | string | Business reason for the request |
| `task_id` | string | Stable task identifier — binds the spend to a unit of work for forensics + mandate enforcement |

### Optional

| Field | Type | Description |
| :- | :- | :- |
| `method` | string | `GET`, `POST`, `PUT`, `DELETE` (default `GET`) |
| `headers` | object | Custom headers |
| `body` | any JSON value | Request body |
| `timeout_ms` | number | Request timeout |
| `idempotency_key` | string | Deduplication key |
| `agent_id` | string | Agent identifier |
| `employee_id` | string | Employee identifier |
| `justification` | string | Human-readable reason |
| `expected_output_type` | string | `table`, `pdf`, `json`, `citations`, `other` |
| `cost_expectation_min_usdc` | number | Expected min cost |
| `cost_expectation_max_usdc` | number | Expected max cost |
| `evidence_hashes` | array | Supporting evidence |
| `approval_token` | string | Approval token returned by `check_approval_status`, `wait_for_approval_resolution`, or `consume_approval_token` |
| `wallet_id` | string | Specific wallet to use |

## Output

Returned only on successful completion. Approval, policy, and provider failures are surfaced as structured MCP errors, not as this success payload.

| Field | Description |
| :- | :- |
| `decision` | Decision ID, outcome, reason code/text, risk score |
| `receipt_id` | Present when payment settles |
| `transaction_id` | Present when a payment transaction exists |
| `payment` | Required/settled status, amount, asset, network, tx\_hash |
| `budget` | Current budget snapshot |

### Settlement Status Values

| Status | Meaning |
| :- | :- |
| `no_payment` | Upstream did not return 402 |
| `authorized` | Payment signed and submitted |
| `pending_receipt` | Awaiting settlement proof |
| `failed` | Payment or settlement failed |

## Important Behavior

> [!WARNING]
>
> Call `read_spending_policy` first in a new session to understand the active mandate.

* `task_id` is required at the MCP schema layer; omitting it fails at SDK validation (`Invalid arguments for tool governed_fetch`) before the mandate gate is evaluated
* If the upstream response is not `402`, AXON returns the provider response without payment
* On `402`, AXON evaluates deterministic + risk stages, then either settles or escalates/denies
* `APPROVAL_REQUIRED` is a structured error. Read `approval_request_id` from the error details, then use `check_approval_status` or `wait_for_approval_resolution`
* When retrying with `approval_token`, keep the same URL, method, and body. Approval matching is bound to that original request context


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.