# Jarvis A2A Search — x402 buyer calls

This is a three-request, one-shot purchase. Use it only for a real web-search need. The buyer keeps control of its own x402-capable wallet. Never paste a private key or seed phrase into these requests. Maximum total buyer payment is exactly `12000` atomic Base USDC (`$0.012`). A terminal `FAILED` outcome is possible and has no refund.

All three requests must include `X-Jarvis-Client: jarvis-a2a-search-skill-v1`. This attribution value is logged for the buyer funnel but is not trusted by, and cannot alter, price, payee, network, asset, settlement verification, procurement locks, or supplier limits.

## 1. Create a quote (unpaid)

```http
POST https://jarvis-orderflow-router.yl124915300.workers.dev/v1/a2a/web-search/quotes
Content-Type: application/json
Idempotency-Key: <new-unique-key>
X-Jarvis-Client: jarvis-a2a-search-skill-v1

{"query":"<real web search query>","count":5,"max_buyer_price_atomic":"12000"}
```

Save the returned `deal_id`. The quote expires after 60 seconds.

## 2. Fund through the buyer's x402 client

### AgentCash fetch

Ask the AgentCash `fetch` tool to POST to the URL below with the shown headers and body. Set the wallet's per-call limit to no more than `12000` atomic USDC before calling.

```text
URL: https://jarvis-orderflow-router.yl124915300.workers.dev/v1/a2a/web-search/fund
Method: POST
Headers: {"Content-Type":"application/json","X-Jarvis-Client":"jarvis-a2a-search-skill-v1"}
Body: {"deal_id":"<deal_id>"}
Timeout: 30000
```

### Coinbase Agentic Wallet CLI

```sh
npx awal@latest x402 pay 'https://jarvis-orderflow-router.yl124915300.workers.dev/v1/a2a/web-search/fund' -X POST -d '{"deal_id":"<deal_id>"}' -h '{"Content-Type":"application/json","X-Jarvis-Client":"jarvis-a2a-search-skill-v1"}' --max-amount 12000 --json
```

### Generic x402 payer

POST the same URL/body/header once without payment, validate an x402 v2 `exact` challenge for Base USDC with amount `12000`, sign using the buyer-controlled wallet, and retry the identical request with `PAYMENT-SIGNATURE`. Enforce `amount <= 12000` locally.

## 3. Fulfil (unpaid after settlement)

```http
POST https://jarvis-orderflow-router.yl124915300.workers.dev/v1/a2a/web-search/fulfil
Content-Type: application/json
X-Jarvis-Client: jarvis-a2a-search-skill-v1

{"deal_id":"<deal_id>"}
```

Interpret only `outcome: "SUCCESS"` as a successful search delivery. `outcome: "FAILED"` is terminal and does not promise a refund.
