Skip to main content

Required Software

All examples require Node.js 18.17.0 or higher and npm 9.0.0 or higher.Check your versions:
node --version  # Should be v18.17.0 or higher
npm --version   # Should be 9.0.0 or higher
Install or update Node.js:
  • macOS/Linux: Use nvm
    nvm install 18
    nvm use 18
    
  • Windows: Download from nodejs.org
Required to clone the repository:
git --version
Install Git from git-scm.com if needed.
Recommended editors:
  • VS Code with TypeScript extensions
  • WebStorm or other JetBrains IDEs
  • Cursor for AI-assisted development

Crossmint API Key

Some examples (particularly those using Crossmint smart wallets) require a Crossmint API key.
1

Sign up for Crossmint

Visit the Crossmint Console and create an account.
2

Get your API key

In the console, navigate to API Keys and create a new key for development.
Keep your API key secret. Never commit it to version control or share it publicly.
3

Configure environment

Add your API key to the .env file in the demo you’re running:
.env
CROSSMINT_API_KEY=your_api_key_here
The basic demos (ping, weather) don’t require a Crossmint API key. Start with those if you want to explore without signing up.

Blockchain Prerequisites

Testnet USDC Tokens

All demos use testnet USDC on either Base Sepolia or Solana Devnet. You’ll need testnet tokens to:
  • Make payments as a client/agent
  • Receive payments as a service provider
  • Test settlement verification
1

Get Base Sepolia USDC

Use the Circle testnet faucet:
  1. Visit faucet.circle.com
  2. Select Base Sepolia network
  3. Enter your wallet address
  4. Request testnet USDC (you’ll receive ~10 USDC)
You can request tokens once per day per address.
2

Get Solana Devnet USDC (if needed)

For Solana demos, use the Circle faucet:
  1. Visit faucet.circle.com
  2. Select Solana Devnet network
  3. Enter your Solana wallet address
  4. Request testnet USDC
3

Verify your balance

For Base Sepolia, check your balance on Basescan Sepolia.For Solana, use Solana Explorer (Devnet).

Wallet Setup

For EVM-based demos, you need a wallet on Base Sepolia:Option 1: MetaMask
  1. Install MetaMask
  2. Add Base Sepolia network:
    • Network Name: Base Sepolia
    • RPC URL: https://sepolia.base.org
    • Chain ID: 84532
    • Currency Symbol: ETH
    • Block Explorer: https://sepolia.basescan.org
  3. Get testnet ETH from Base Sepolia faucet for gas
Option 2: Private Key Generate a new wallet for testing:
# Using cast (from Foundry)
cast wallet new

# Or using Node.js
node -e "console.log(require('ethers').Wallet.createRandom().privateKey)"
Only use test wallets with testnet tokens. Never use your main wallet’s private key.

Understanding Key Terms

Before diving into the demos, familiarize yourself with these concepts:
x402 is an HTTP payment protocol using the 402 Payment Required status code.
  • Server returns 402 with payment requirements when a resource needs payment
  • Client generates a payment authorization header (X-PAYMENT)
  • Server verifies the payment and grants access
Learn more in x402 Protocol Concepts
A2A is a protocol for AI agents to communicate and transact autonomously.
  • Agents discover each other’s capabilities and pricing
  • Payments are made programmatically without human intervention
  • Enables agent-to-agent marketplaces and service networks
Learn more in A2A Payments
An EOA is a traditional blockchain wallet controlled by a private key.
  • User has full control via private key
  • Requires gas tokens (ETH, SOL) for transactions
  • Compatible with all standard wallets (MetaMask, Phantom, etc.)
Most basic demos use EOA wallets for simplicity.
Smart wallets (also called smart contract wallets) are programmable wallets.
  • Can execute complex logic (spending limits, multi-sig, etc.)
  • Crossmint smart wallets support gasless transactions
  • Enable features like email-based recovery and session keys
Learn more in Smart Wallets Concepts
MCP is a standard for integrating tools with AI models.
  • Allows AI agents to discover and use external tools
  • Payment-gated MCP tools enable autonomous agent economies
  • Used in advanced demos like events-concierge
Learn more at modelcontextprotocol.org
USDC (USD Coin) is a stablecoin pegged 1:1 to the US Dollar.
  • All demos use USDC for payments (not ETH or SOL)
  • Testnet USDC has no real value and is free from faucets
  • Production systems use mainnet USDC for real payments
Token addresses:
  • Base Sepolia: 0x036CbD53842c5426634e7929541eC2318f3dCF7e
  • Solana Devnet: 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU

Development Tools (Optional)

These tools can enhance your development experience:

Foundry

EVM development toolkit with cast for wallet operations

Solana CLI

Command-line tools for Solana development

Thunder Client

VS Code extension for testing HTTP endpoints

Postman

API testing tool with support for custom headers

Verification Checklist

Before starting the demos, ensure you have:
1

Software installed

  • Node.js 18.17.0+
  • npm 9.0.0+
  • Git
2

Accounts created

  • Crossmint account (optional for basic demos)
  • Wallet on Base Sepolia or Solana Devnet
3

Tokens acquired

  • Testnet USDC from Circle faucet
  • Testnet ETH or SOL for gas (if using EOA wallets)
4

Ready to code

  • Repository cloned: git clone https://github.com/crossmint/crossmint-agentic-finance.git
  • Environment variables configured

Next Steps

Quick Start

Run your first paywall server in 5 minutes

x402 Protocol

Learn how the payment protocol works

HTTP Paywalls

Build payment-protected API endpoints

Agent-to-Agent

Create autonomous payment agents
Need help? Join the Crossmint Discord or check the GitHub discussions.

Build docs developers (and LLMs) love