You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merchant-Pull Micropayments for Zero-Connectivity Consumers on Stellar/Soroban
PeraPin enables consumers in informal micro-economies (sari-sari stores, school canteens, PUVs) to pay for goods using a static QR code sticker β even when their smartphone is dead, offline, or left at home.
Feedback collected securely via /feedback into Supabase:
User
Role
Rating
Comment / Feedback
Student 1
Consumer
βββββ
"Nice, smooth sending money. The potential is great!"
Student 2
Consumer
βββββ
"the concept is really nice, the transactions were smooth with no delays. though the UI is minimal and lacks some minor contents, the core functions are met and working."
Merchant 1
Merchant
βββββ
"Must reload fast, but overall good"
Student 3
Consumer
βββββ
"Excellent!! Fast reload."
π‘ The Merchant-Pull Model
Digital payment systems assume consumers have working smartphones, active data, and battery. PeraPin flips this paradigm:
βββββββββββββββββββ Scans QR Sticker ββββββββββββββββββββ
β Consumer QR β ββββββββββββββββββββββββββ> β Merchant Phone β
β (Zero Power/Data)β β (Active Device) β
βββββββββββββββββββ βββββββββββ¬βββββββββ
β β
β Hands phone to consumer for 4-digit PIN β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββ
β SHA-256 (PIN + Public Key) in Browser β
ββββββββββββββββββββ¬ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββ
β Soroban Contract `pay()` on Testnet β
ββββββββββββββββββββββββββββββββββββββββ
Merchant scans consumer sticker using their phone camera (or manual public key).
Merchant inputs transaction amount in XLM.
Merchant hands phone to consumer to enter a 4-digit PIN on a secure dark overlay.
API submits transaction to Soroban smart contract, moving XLM on Stellar Testnet upon verification.
π PIN Security & Key Management
Client-Side Hashing: Raw 4-digit PINs never leave the browser. Hashing uses native window.crypto.subtle.digest("SHA-256") with the user's public key as salt.
On-Chain Brute Force Lockout: 3 consecutive failed PIN entries trigger an automated 15-minute on-chain lockout enforced by the Soroban smart contract.
Custodial Key Encryption: Merchant & Consumer private keys are encrypted using AES-256-GCM before database storage in Supabase. Keys are decrypted in-memory only during payload construction and scrubbed immediately in a finally block.
NEXT_PUBLIC_SUPABASE_URL="https://your-project.supabase.co"NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"NEXT_PUBLIC_SOROBAN_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"NEXT_PUBLIC_SOROBAN_RPC_URL="https://soroban-testnet.stellar.org"NEXT_PUBLIC_SOROBAN_CONTRACT_ID="CBEASRMFLJOTK6PVM6276THY26GVNYUXKDWF3JVPKGYEC63MUSQV5P3D"SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"ENCRYPTION_SECRET="your-32byte-aes-encryption-secret"
Installation & Run
# Install dependencies
npm install
# Run Next.js local server
npm run dev
# Run Prettier code formatting
npm run format
# Run production build check
npm run build
π License
Distributed under the MIT License. See LICENSE for details.
About
A digital payments system for the Philippines designed for zero-connectivity consumers and zero-hardware micro-merchants, built on Stellar/Soroban.