# build an agentic commerce platform with x402 payments

> x402 is the right payment layer for agentic commerce because it maps paid access to HTTP 402 and programmatic stablecoin payment headers. ERC-8004 adds public agent discovery, identity, reputation, and validation signals through 8004scan. Base supplies low-cost settlement, Privy covers seller/user wallet onboarding, Goldsky provides marketplace data indexing, and Safe adds operational controls. Uniswap is explicitly excluded because this use case is about agent payments and marketplace state, not token swapping.

## Recommended stack

- **x402** (payments_and_commerce) — readiness 89/100, difficulty medium — Use x402 as the HTTP-native payment layer so buyer agents can receive 402 payment instructions, pay with stablecoins, and retry paid requests.
- **ERC-8004** (agent_identity_and_trust) — readiness 78/100, difficulty medium — Use ERC-8004 and 8004scan for agent discovery, portable agent identities, reputation signals, and validation records around buyer and seller agents.
- **Base** (settlement_or_execution) — readiness 82/100, difficulty low — Use Base as a low-cost EVM settlement environment for x402 stablecoin payments and merchant-facing commerce flows.
- **Privy** (wallet_and_identity) — readiness 82/100, difficulty low — Use embedded wallets and auth for sellers who list goods and for users who need a consumer-grade account experience.
- **Goldsky** (indexing_and_data) — readiness 79/100, difficulty medium — Index listings, payment events, fulfillment state, and merchant analytics so agents and users can query marketplace state.
- **Safe** (supporting_protocol) — readiness 80/100, difficulty low — Use multisig controls for marketplace treasury, facilitator configuration, refunds, and operational approvals.

## Considered and excluded

- uniswap — Useful for token swaps or liquidity, but it is not the primary payment protocol for HTTP-native agent commerce.

## Risks

- x402 solves payment authorization and settlement, not marketplace inventory, fulfillment, escrow, returns, or dispute resolution.
- ERC-8004 is a draft standard and does not replace payment rails; use it for agent identity, discovery, reputation, and validation.
- Agent payments need spending limits, replay protection, refund handling, and clear merchant acceptance rules.
- Facilitator, token, network, and fee support must be verified for the production chain set.
- Indexing lag can make listing availability or payment status appear stale to buyer agents.

## Next steps

- Model marketplace state separately from x402 payment state: listings, sellers, inventory, fulfillment, refunds, and disputes.
- Register commerce agents or agent services through ERC-8004 if public discovery and trust signals are part of the product.
- Choose accepted assets and networks, then verify facilitator support for each one.
- Implement x402 seller middleware for paid listing or checkout endpoints.
- Add buyer-agent spending policies, payment receipt validation, replay-safe order IDs, and refund paths.
- Index listing and payment events for agent-readable marketplace state.

## What the agent receives

```json
{
  "intent": "An agentic commerce platform allowing users to list goods and have agents paying for it using x402",
  "matched_intent": "build-agentic-commerce-with-x402",
  "recommended_stack": [
    {
      "slug": "x402",
      "name": "x402",
      "role": "payments_and_commerce",
      "readiness_score": 89,
      "integration_difficulty": "medium",
      "reason": "Use x402 as the HTTP-native payment layer so buyer agents can receive 402 payment instructions, pay with stablecoins, and retry paid requests."
    },
    {
      "slug": "erc-8004",
      "name": "ERC-8004",
      "role": "agent_identity_and_trust",
      "readiness_score": 78,
      "integration_difficulty": "medium",
      "reason": "Use ERC-8004 and 8004scan for agent discovery, portable agent identities, reputation signals, and validation records around buyer and seller agents."
    },
    {
      "slug": "base",
      "name": "Base",
      "role": "settlement_or_execution",
      "readiness_score": 82,
      "integration_difficulty": "low",
      "reason": "Use Base as a low-cost EVM settlement environment for x402 stablecoin payments and merchant-facing commerce flows."
    },
    {
      "slug": "privy",
      "name": "Privy",
      "role": "wallet_and_identity",
      "readiness_score": 82,
      "integration_difficulty": "low",
      "reason": "Use embedded wallets and auth for sellers who list goods and for users who need a consumer-grade account experience."
    },
    {
      "slug": "goldsky",
      "name": "Goldsky",
      "role": "indexing_and_data",
      "readiness_score": 79,
      "integration_difficulty": "medium",
      "reason": "Index listings, payment events, fulfillment state, and merchant analytics so agents and users can query marketplace state."
    },
    {
      "slug": "safe",
      "name": "Safe",
      "role": "supporting_protocol",
      "readiness_score": 80,
      "integration_difficulty": "low",
      "reason": "Use multisig controls for marketplace treasury, facilitator configuration, refunds, and operational approvals."
    }
  ],
  "excluded_candidates": [
    {
      "slug": "uniswap",
      "reason": "Useful for token swaps or liquidity, but it is not the primary payment protocol for HTTP-native agent commerce."
    }
  ],
  "risks": [
    "x402 solves payment authorization and settlement, not marketplace inventory, fulfillment, escrow, returns, or dispute resolution.",
    "ERC-8004 is a draft standard and does not replace payment rails; use it for agent identity, discovery, reputation, and validation.",
    "Agent payments need spending limits, replay protection, refund handling, and clear merchant acceptance rules.",
    "Facilitator, token, network, and fee support must be verified for the production chain set.",
    "Indexing lag can make listing availability or payment status appear stale to buyer agents."
  ],
  "next_steps": [
    "Model marketplace state separately from x402 payment state: listings, sellers, inventory, fulfillment, refunds, and disputes.",
    "Register commerce agents or agent services through ERC-8004 if public discovery and trust signals are part of the product.",
    "Choose accepted assets and networks, then verify facilitator support for each one.",
    "Implement x402 seller middleware for paid listing or checkout endpoints.",
    "Add buyer-agent spending policies, payment receipt validation, replay-safe order IDs, and refund paths.",
    "Index listing and payment events for agent-readable marketplace state."
  ],
  "generated_with": "composewith.eth",
  "registry_version": "2026.06.10-8752c9d"
}
```

---
Canonical: https://composewith.eth/intents/build-agentic-commerce-with-x402
