Skip to content
shipx402.comWalk the loop →

Learn

Learn x402 from beginner to advanced

One path from first concepts to agent-safe production. Guides are ordered beginner → intermediate → advanced. Tools sit at the end of each stage.

Full learning path

Follow the order within each tier. Skip ahead only if you already know the earlier material.

Updated Aug 2026
Core idea · v2 lab

The payment loop

x402 makes HTTP 402 Payment Required useful: machine-readable price, pay, retry with proof, unlock. Five steps.

Try lab in app
  1. 1

    You ask for a paid resource

    Your app (or an AI agent) does a normal HTTP request — same as loading any API.

    Why: No special payment channel. Money rides on the same web request/response loop the internet already uses.

  2. 2

    Server answers 402 Payment Required

    Instead of 200 OK or 401 Login, you get 402: 'Pay this amount, on this network, to this address, for this resource.'

    Why: HTTP already reserved 402 for payments. x402 finally defines the machine-readable details so software can pay without humans filling forms.

  3. 3

    Client builds a payment

    Your wallet signs a payment that matches the requirements — amount, destination, resource.

    Why: Only the key holder can authorize spend. Signing proves intent without handing the server your private key.

  4. 4

    Retry the same request with proof

    You call the same URL again, this time attaching the payment proof in a header.

    Why: One protocol for humans, bots, and agents: request → price → pay → unlock. No account signup required.

  5. 5

    Server verifies / settles, then delivers

    The server checks the proof (itself or via a facilitator), settles on-chain if needed, and returns 200 + the goods.

    Why: Sellers get paid per call. Buyers only pay when they need the resource. Micropayments become practical on fast, cheap chains like Solana.

Solana wallets in plain English

A wallet is a key pair. Public = share to receive. Private = never share. Ship x402 creates keys only in your browser.

Devnet vs mainnet

  • Learn / Devnet: free practice SOL, break things safely.
  • Real / Mainnet: real value. Small amounts in-browser; hardware for savings.

Tools when you are ready