Accept payments for digital content
Protect an article or PDF resource behind an HTTP 402 route and unlock delivery upon verification.
- Define the protected route and unit price in USDC.
- Attach x402 middleware returning HTTP 402 when no valid proof is attached.
- Test unlocking with a compatible wallet in staging.
// Conceptual route pricing configuration for digital content
const pricing = {
price: "0.25",
asset: "USDC",
network: "base-sepolia",
};