How ganymedenil/cryptopay works
CryptoPay is a self-hosted, non-custodial crypto payment gateway. A merchant creates an invoice through the Go API; the customer selects an asset and pays from their own wallet, while chain scanners observe transfers and invoice state changes lead to signed webhook notifications. The web app provides customer checkout and a substantial admin console for merchants, invoices, chains, wallets, transfers, security, and operations. The README documents the principal workflow and capabilities; several backend and UI subsystem links below reflect those documented relationships because their implementation files were not sampled.
Main entry points: service.go Invoice lifecycle · serve.go HTTP gateway · checkout-page.tsx Customer checkout · admin Admin console
Components 19
Web experience
- Customer checkout
web/src/components/checkout/checkout-page.tsx - Typed API client
web/src/lib/api/client.ts - Admin console
web/src/components/admin - Localization
web/src/lib/i18n
Payment processing
- HTTP gateway
backend/cmd/gateway/serve.go - Invoice lifecycle
backend/internal/invoice/service.go - Receiving wallets
backend/internal/hdwallet/hdwallet.go - Exchange rates
backend/internal/rates/rates.go
Chain monitoring
- Block scanner
backend/internal/scanner/scanner.go - Chain adapters
backend/internal/chain - Assets and networks
backend/internal/catalog/catalog.go - Blockchain RPC
Operations and persistence
- Webhook delivery
backend/internal/webhook/dispatcher.go - Email delivery
backend/internal/mailer/dispatcher.go - Persistence layer
backend/internal/store - PostgreSQL
Other components
- Merchant backend
- Customer
- Admin user
Connections 23
- Merchant backend → HTTP gateway: creates invoice
README.md - HTTP gateway → Invoice lifecycle: handles invoice
- HTTP gateway → Merchant backend: returns checkout URL
README.md - Merchant backend → Customer: redirects checkout
README.md - Customer → Customer checkout: opens invoice
README.md - Customer checkout → Typed API client: requests invoice
- Typed API client → HTTP gateway: sends API requests
- Customer → Blockchain RPC: pays from wallet
README.md - Block scanner → Chain adapters: scans transfers
- Chain adapters → Blockchain RPC: reads chain
README.md - Invoice lifecycle → Persistence layer: persists state
README.md - Persistence layer → PostgreSQL: reads and writes
- Block scanner → Invoice lifecycle: updates payments
- Invoice lifecycle → Webhook delivery: records events
README.md - Webhook delivery → Merchant backend: delivers signed events
README.md - HTTP gateway → Email delivery: sends email alerts
- Admin user → Admin console: manages gateway
README.md - Admin console → Typed API client: calls admin API
- Admin console → Localization: renders translations
web/src/lib/i18n/translate.ts - Customer checkout → Localization: renders translations
- Invoice lifecycle → Receiving wallets: assigns receiving address
README.md - Invoice lifecycle → Assets and networks: selects supported asset
- Invoice lifecycle → Exchange rates: obtains quote