Example of a paywalled image gallery. This uses pop402 as the facilitator to ensure that the wallet owns whatever content they are trying to view.
www-pop402-gallery is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on facilitator, x402. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like facilitator, voidly-pay, x402-sandbox.
A collection of example applications demonstrating pop402 challenge-response authentication with Solana USDC payments.
pop402 is a payment protocol that brings HTTP 402 (Payment Required) to life. It enables seamless micropayments for digital content and services on the web, leveraging blockchain payments with challenge-response authentication.
The protocol uses a facilitator service to coordinate authentication and license management:
This repository showcases three different licensing models supported by pop402:
@pop402/x402-express middleware# Clone the repository
git clone <repo-url>
cd www-pop402-example
# Install dependencies
npm install
# Copy environment example
cp env.example .env
Edit .env and set your merchant wallet address:
FACILITATOR_URL=https://facilitator.pop402.com
NETWORK=solana
MERCHANT_WALLET=YourSolanaWalletAddress
PORT=3000
Note: Set
MERCHANT_WALLETto your Solana wallet address where you want to receive USDC payments.
npm start
Navigate to http://localhost:3000 and connect your Phantom wallet to start testing!
┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Browser │◄────►│ Express Server │◄────►│ Facilitator │
│ (Phantom) │ │ (x402-express) │ │ (pop402.com) │
└─────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
│ │ │
Wallet Protected Routes Auth & Licenses
Transactions Payment Verify Usage Tracking
Backend (server/index.js)
@pop402/x402-express middlewareFrontend (public/)
core.js - Wallet connection, authentication, shared stateimages.js - Image gallery (permanent licenses)chat.js - Chat room (time-based licenses)feed.js - Social feed (usage-based licenses)Facilitator Integration
POST https://facilitator.pop402.com/licensePOST https://facilitator.pop402.com/challenge| Variable | Default | Description |
|---|---|---|
FACILITATOR_URL |
https://facilitator.pop402.com |
pop402 facilitator endpoint |
NETWORK |
solana |
Blockchain network (currently only Solana supported) |
MERCHANT_WALLET |
(required) | Your Solana wallet address for receiving payments |
PORT |
3000 |
Server port |
Contributions are welcome! This repository serves as example implementations of the pop402 protocol. Feel free to:
MIT
Production-ready x402 facilitator server.
Off-chain credit ledger + hire marketplace for AI agents. Ed25519-signed envelopes, atomic settlement, hire-and-release escrow. https://voidly.ai/pay
One-command local development environment for HTTP 402 Payment Required protocol with blockchain payments (EIP-3009 USDC)
Rust SDK for the x402 payment protocol.
Accept payments from AI agents. Open-source. Your data, your domain, your rules. Free forever.
A production-ready payment settlement service for the x402 protocol. Built with Elysia and Node.js, it verifies cryptographic payment signatures and settles transactions on-chain for EVM, SVM (Solana), and Starknet networks.
Golang implementation of an x402 payment facilitator
x402 payment facilitator — verifies and settles EIP-3009 USDC micropayments on Base, Arbitrum, and Ethereum.
go-x402-facilitator is a facilitator for X402 payment implemented in the Go language.