Skip to main content
POST
/
v1
/
agent
/
x402-fetch
curl -X POST '/v1/agent/x402-fetch' \
  -H 'Authorization: Bearer yac_connector_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "wallet_id": "aw_01abc123",
    "url": "https://api.example.com/premium-data",
    "method": "GET"
  }'
{
  "success": true,
  "data": {
    "status": 200,
    "paid": true,
    "payment": {
      "amount_usd": 0.01,
      "asset": "USDC",
      "network": "base",
      "pay_to": "0x9F8b3A2c1E4D7F6B5A4C3D2E1F0A9B8C7D6E5F4"
    },
    "body": {
      "premium_data": "..."
    }
  }
}
Authorization
string
required
Connector API key: Bearer yac_...
wallet_id
string
required
The agentic wallet ID to pay from.
url
string
required
The URL to fetch. If it returns HTTP 402, payment is made automatically.
method
string
HTTP method: GET, POST, PUT, DELETE, PATCH. Defaults to GET.
headers
object
Additional headers to include in the request.
body
any
Request body (for POST/PUT/PATCH requests).
curl -X POST '/v1/agent/x402-fetch' \
  -H 'Authorization: Bearer yac_connector_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "wallet_id": "aw_01abc123",
    "url": "https://api.example.com/premium-data",
    "method": "GET"
  }'
{
  "success": true,
  "data": {
    "status": 200,
    "paid": true,
    "payment": {
      "amount_usd": 0.01,
      "asset": "USDC",
      "network": "base",
      "pay_to": "0x9F8b3A2c1E4D7F6B5A4C3D2E1F0A9B8C7D6E5F4"
    },
    "body": {
      "premium_data": "..."
    }
  }
}