← Back to home

CanaryMiniApp

A Next.js application demonstrating x402 payment protocol with Privy for pay-per-use AI code reviews

Problem Statement

Pay-Per-Use Pricing: Only pay when you need a review (1 USDC per review)Instant AI Reviews: Powered by Claude Sonnet 4.5 for expert-level code analysisx402 Protocol: Automatic, gasless USDC payments via HTTPPrivy Authentication: Seamless wallet and email login with embedded walletsNo Subscriptions: True consumption-based pricing model

Solution

The x402 payment protocol enables instant, automatic payments for APIs over HTTP:Client Request: User submits code for review402 Response: Server returns HTTP 402 with payment termsPayment Authorization: User signs USDC transfer via Privy embedded wallet (gasless)Payment Submission: Facilitator verifies signature and submits transaction onchainContent Delivery: Server receives payment proof and returns AI reviewTech stack: Frontend: Next.js 15 (App Router), React 18, TypeScript, Tailwind CSS Authentication: Privy (embedded wallets, email/wallet login) Payments: x402 protocol with USDC on Base AI: Anthropic Claude API (Sonnet 4.5) Payment Facilitator: Pay AI Network

Hackathon

ETHGlobal Buenos Aires

2025

Contributors