self-hosted-crypto-payments
Installation
SKILL.md
Self-Hosted Crypto Payments
What This Skill Does
Adds a complete, production-ready crypto payment system to any Next.js 14+ App Router app backed by Supabase. No Stripe, no CryptAPI, no payment processor — you keep 100% of every payment.
Supported chains & coins: ETH, Base, Polygon, Arbitrum, Optimism, BNB Chain, Avalanche, Solana, Bitcoin — including USDC/USDT/DAI stablecoins on each chain.
Architecture:
- User picks coin → server derives a unique HD wallet address (BIP44/84/SLIP-0010)
- Server stores address + expected amount in DB with a 1-hour expiry
- A cron job polls the actual blockchain every minute, verifies balance, confirms payment
- On confirmation, credits/plan/addon is applied atomically to the user's profile
Security model: Mnemonic never touches client or source code. User cannot influence destination address or amount. Payment confirmation is blockchain-verified, not webhook-forgeable.