/docs

Build agents that pay for what they consume.

AgentMart is a discovery + settlement layer for autonomous AI agents. Agents search a catalog, sign a payment authorization, and call any merchant's API in USDC on Base — without a human in the loop.

quick start

Pay any merchant in 3 lines of curl

The simplest possible integration. The example below uses our server-signed demo path — agents on production should use the EIP-3009 signed flow further down.

# 1. Find a merchant
curl 'https://agentmart.work/api/catalog/search?q=forex+data&category=finance'

# 2. Pay them (1.5% platform fee deducted automatically)
curl -X POST https://agentmart.work/api/pay \
  -H 'Content-Type: application/json' \
  -d '{
    "agent_wallet": "0xYOUR_AGENT_WALLET",
    "merchant_id":  "PASTE_FROM_STEP_1",
    "amount_usdc":  0.0042,
    "protocol":     "x402"
  }'

# Response (when settled on Base):
# {
#   "status": "settled",
#   "network": "base",
#   "merchant_endpoint": "https://api.example.com/quote",
#   "auth_token": "bearer_…",
#   "merchant_tx_url": "https://basescan.org/tx/0x..."
# }
discovery

GET /api/catalog/search

Semantic + filtered search across all verified merchants. Results are re-ranked by similarity × 0.7 + trust_score × 0.3.

q
Natural-language query — embedded via OpenAI text-embedding-3-small (falls back to mock embeddings if unset)
category
data_apis | compute | finance | legal | weather_geo | ai | other
protocol
x402 | mpp | l402
max_price
Number — only return merchants below this per-call price
min_trust
0–100 — minimum trust score
sort
relevance | price | trust | newest
limit
Default 24, max 100
curl 'https://agentmart.work/api/catalog/search?q=real-time+crypto+prices&category=finance&protocol=x402&sort=trust'
settlement · simple

POST /api/pay

Server-signed path. The agent provides its wallet address; AgentMart's server- held test agent signs the EIP-3009 authorization. Quick to integrate but custodial-shaped — for early demos and pilots only.

POST /api/pay
Content-Type: application/json

{
  "agent_wallet": "0xA0b86991C6218B36c1d19D4a2e9Eb0cE3606eB48",
  "merchant_id":  "3a106f2b-28f9-4aa0-899e-39e56ff99214",
  "amount_usdc":  0.0042,
  "protocol":     "x402"
}
The platform fee (1.5%) is deducted server-side from the agent's transfer. Merchants receive 98.5% of the payment. Both amounts settle as separate on-chain transactions via USDC's transferWithAuthorization.
settlement · production

POST /api/pay-signed

Non-custodial flow. The agent's wallet signs two EIP-712 typed-data messages (one for the merchant payment, one for the platform fee). AgentMart's relayer wallet verifies the signatures and submits the on-chain transactions, paying gas. The agent never reveals its private key to AgentMart.

EIP-712 domain

{
  name:             "USD Coin"   // "USDC" on Base Sepolia
  version:          "2"
  chainId:          8453         // 84532 for Base Sepolia
  verifyingContract: <USDC address>   // 0x833589f… on mainnet
}

Message schema (EIP-3009)

TransferWithAuthorization {
  from:        address    // agent's wallet
  to:          address    // merchant or platform wallet
  value:       uint256    // 6-decimal USDC base units
  validAfter:  uint256    // 0 = immediately valid
  validBefore: uint256    // unix seconds; we use now + 600s
  nonce:       bytes32    // random; replay-protected by contract
}

Request body

POST /api/pay-signed
{
  "merchant_id": "3a106f2b-28f9-4aa0-899e-39e56ff99214",
  "protocol":    "x402",
  "authorizations": [
    { "from": "0x...", "to": "<merchant wallet>",  "value": "4137", … "signature": "0x..." },
    { "from": "0x...", "to": "<platform wallet>", "value": "63",   … "signature": "0x..." }
  ]
}
settlement details

On-chain protocol

Every settlement results in two USDC transfers on Base via EIP-3009 transferWithAuthorization:

  • Agent → merchant wallet: 98.5% of the price
  • Agent → platform wallet: 1.5% fee

Gas is paid by AgentMart's platform wallet (the relayer). Authorizations expire 10 minutes after issue. Replay protection is enforced by the USDC contract via the per-message nonce.

All transactions verify publicly on BaseScan. The merchant_tx_hash in the response is the canonical proof of payment.
protocols supported

x402 · mpp · l402

x402
The HTTP 402 Payment Required protocol (Coinbase). Most native to web-based agentic flows.
mpp
Machine Payment Protocol. Generic JSON envelope; useful when agents prefer a non-HTTP transport.
l402
Lightning-style Layer 402. Originally Bitcoin-Lightning; we use the same auth-token semantics on USDC.

Merchants declare which protocols they accept; agents filter the catalog by protocol. AgentMart settles all three identically on-chain — the protocol string is metadata, not a chain-level switch.

for merchants

Listing your API

Register at /dashboard/register. Provide a description, your endpoint URL, the price per call, and your Base payout wallet. Once verified, you appear in the public catalog and any agent that calls /api/pay with your merchant ID will route USDC to you.

No SDK to install. No webhook to handle. The settlement happens on-chain; you just keep your existing API running.

public api

Other endpoints

GET /api/merchants/[id]
Full merchant profile + 30-day volume metrics
GET /api/transactions/feed
Last 50 anonymized transactions (powers the live ticker on the home page)
GET /api/platform-wallet
Public address of the AgentMart fee-recipient wallet
trust model

What we don't do

  • We don't hold funds. Settlement is non-custodial — USDC moves directly between wallets via EIP-3009 with platform wallet only acting as a gas relayer.
  • We don't validate merchant API quality. Merchants are reviewed for legitimacy, not endpoint reliability. Trust scores reflect uptime + payment success, not API quality.
  • We don't refund disputes. Settlements are on-chain and final. Dispute handling is between the agent's operator and the merchant.
  • We don't accept non-USDC tokens. Settlement is USDC-only. Other tokens can be added in v2.
status

Where we are

Live on Base mainnet as of May 2026. Catalog seeded with 60+ merchants including 50 real free public APIs. Real on-chain settlements verifiable on basescan.org.

Active areas of work: agent SDK, more merchant onboarding, mainnet hardening. If you're building an agent or running an API you want listed, email hello@agentmart.work.

frequently asked

FAQ

Do I need to install an SDK?
No. Everything is plain HTTP + JSON. An agent that can fetch can use AgentMart.
Can I pay in tokens other than USDC?
Not in v1. USDC on Base only. Multi-token support is on the roadmap once volume justifies it.
What about agent identity / spam?
Today, anyone can call /api/pay. The economics enforce honesty — bogus payment intents fail because the agent has to actually own and sign with their wallet. Long-term we'll add reputation + rate limits.
What's the platform fee?
1.5% flat on every settled transaction. Deducted in USDC on-chain as part of the same atomic flow. No subscription, no minimum.