Repository navigation
ChiyaPay is a USDC/SOL checkout for a Nepali tea stall on Solana devnet, with two payment doors.
🚪 Two doors, one price
- Human door — a Solana Pay QR on a web page. Pick USDC (0.1) or SOL (0.001), pay from a phone wallet (Solflare on Devnet), and the page flips to "Order confirmed ☕".
- Agent door —
POST /api/orderreturns HTTP 402 with a machine-readable invoice; an agent (npm run agent) pays USDC or SOL on-chain, retries with the tx signature, and the server confirms it — no human, no wallet UI.
🔒 Server-side on-chain verification
The server never trusts the client. Every payment is re-read from the chain and checked: correct recipient, full amount (USDC token-delta or SOL lamport-delta), recency (~10 min), replay protection, and the order's unique reference.
▶️ Run it (under 5 min)
npm install → cp .env.example .env → npm run setup (paste the printed MERCHANT_PUBKEY) → npm run dev (human door) and npm run agent (agent door). See the README for the QR tap-to-open tip and faucet steps.
Devnet only — no mainnet, no real funds. Built for the Blockchain 101 Workshop mini-hack (Kathmandu).