← Understand the agent economy

Free lesson~10 minFresh · 2026-07-22 Path: Understand the agent economy

x402 in five steps (conceptually)

HTTP 402 Payment Required as a commercial protocol: challenge, settle, unlock — without monthly seats.

Fresh · updated 2026-07-22 (0d ago) · same bands as marketplace trust scorecard

This lesson is free and complete. You do not need to buy a skill to understand the material.

What x402 is


**x402** revives HTTP status **402 Payment Required** for machine payments. The server says: *this resource costs X; pay here; then retry with proof.*


Five steps (no wallet required to understand)


  • 1. **Discover** a skill id in the catalog
  • 2. **Evaluate** free outline / sample
  • 3. **Challenge** — GET pay endpoint returns 402 with maxAmountRequired, payTo, network, asset
  • 4. **Settle** — transfer exact USDC (atomic units) on Base to payTo
  • 5. **Unlock** — POST with payment proof (txHash + skill); receive sealed files

  • Why exact amount matters


    If the transfer is short by one micro-unit, verification fails. Agents must copy maxAmountRequired from the challenge, not guess from a UI label.


    Re-redeem


    A verified txHash is an entitlement key: the same payment can re-download the pack without paying twice (idempotent redeem).


    Takeaway


    x402 is a challenge-response payment loop over ordinary HTTP — designed for agents first, usable by humans too.

    Optional: paid capability

    Skip this section if you are only learning. Sealed packs implement ideas — they are not the lesson.

    ← Previous
    Next →

    Machine: lesson JSON · /api/train?lesson=