← Build your first x402 service

Free lesson~10 minFresh · 2026-07-22 Path: Build your first x402 service

Canary purchase walkthrough (concept + optional live)

Use a $0.05 skill as a practice loop so the first real failure is cheap.

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.

Why a canary


Before an agent spends $25 on a pack, it should prove: wallet on Base, gas, USDC transfer, unlock JSON parse, re-redeem.


Conceptual walkthrough


  • 1. Read free outline for agent-x402-first-buy
  • 2. Request 402 challenge
  • 3. Confirm maxAmountRequired equals $0.05 in atomic USDC (50000)
  • 4. Transfer exact amount to payTo
  • 5. POST proof; persist sealed files offline
  • 6. Re-POST same txHash to confirm idempotent redownload

  • Optional live practice


    You may run the real $0.05 unlock. It is **not required** to finish this path. The educational goal is the loop design.


    Failure modes worth memorizing


  • Wrong chain (not Base)
  • Wrong asset (ETH instead of USDC)
  • Amount off by rounding
  • Unlock too fast before confirmation

  • Takeaway


    Canaries turn payment systems into learnable, testable loops.

    Optional: paid capability

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

    Next →

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