🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront

by @mirni

x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront. Comprehensive x402 paywall + MCP server + product catalog guide. Deploy in 15 minutes. I...

βš™οΈ Configuration

  • Node.js >= 22
  • A Base wallet address (for receiving USDC payments)
  • A GitHub personal access token (for content delivery from a private repo)
  • Step 1: Clone and configure

    git clone 
    cd your-storefront
    cp .env.example .env
    

    Edit .env:

    DASHBOARD_SECRET=your-strong-random-secret-here
    AGENT_WALLET_ADDRESS=0xYourBaseWalletAddress
    GITHUB_TOKEN=ghp_your_github_pat
    GITHUB_REPO=your-org/your-content-repo
    NETWORK=base-sepolia          # or base-mainnet for production
    

    Step 2: Install and run

    npm install
    node src/index.js
    

    Your storefront is live at http://localhost:3000.

    Step 3: Add your first product

    curl -X POST http://localhost:3000/products \
      -H "Authorization: Bearer your-strong-random-secret-here" \
      -H "Content-Type: application/json" \
      -d '{
        "path": "/products/my-first-guide",
        "price_usd": 9.99,
        "description": "My first digital product",
        "github_slug": "my-first-guide"
      }'
    

    Step 4: Test the x402 flow

    # Get payment requirements
    curl http://localhost:3000/products/my-first-guide
    

    Returns 402 with payment requirements JSON

    Check the machine-readable catalog

    curl http://localhost:3000/products.json | jq .total

    Check agent discovery

    curl http://localhost:3000/llms.txt


    View on ClawHub
    TERMINAL
    clawhub install greenhelix-x402-merchant-starter-kit

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’