Skip to content

Market overview

Pact Market is a hosted gateway at market.pactnetwork.io that wraps a curated set of endpoints and routes calls through Pact Network. Calls are pre-covered — no pools, classifiers, or settle_batch for the agent to think about.

Market is one curated interface on top of the protocol. Other interfaces (enterprise gateways, direct upstream integrations, white-label wrappers) are possible.

For arbitrary 402-gated endpoints (anything off the curated list), use pact pay curl <url> — a drop-in replacement for pay with on-chain refunds.

  1. Agent sends an HTTP request to https://market.pactnetwork.io/<endpoint>/<upstream-path> with Authorization: Bearer <PACT_MARKET_KEY>. The <endpoint> identifier is provided to allowlisted users at access time.
  2. Market checks the allowlist. Rejected with 401 if your key isn’t valid.
  3. Market debits the principal from your AgentWallet (or stages it for settlement, depending on the upstream payment rail).
  4. Market forwards the request to the upstream service.
  5. Market reads the response, runs the classifier, tags the call with success / client_error / server_error.
  6. Market returns the upstream response to the agent.
  7. The classified call lands in the settler queue. Next batch settles it on-chain.

From the agent’s POV this is one HTTP call. Latency is upstream-latency + Market overhead (target: low single-digit ms).

  • Upstream auth (Market holds the upstream API key).
  • Payment to the upstream over x402 / MPP where supported.
  • Response classification.
  • Delivery of the call record to the settler.
  • Refund pull on server_error.

You bring: a Pact Market API key, a Solana wallet bound to it, an endpoint identifier (issued at onboarding), an HTTP client.

  • Add features that aren’t in the upstream API. Market is a transparent proxy + settlement plumbing.
  • Synthesize responses on failure. A server_error is still an error — the refund is the compensation, not a retry.
  • Pool requests. Each agent call is a separate upstream call.