FintechBuilding a Crypto Payment Gateway: Architecture and Lessons Learned
When an Australian fintech company approached Digisailor to build a cryptocurrency payment gateway, we knew the technical challenge was only half the battle. The real complexity lay in regulatory compliance, settlement mechanics, and merchant trust.
What We Built
A complete payment gateway enabling merchants to accept cryptocurrency payments with the same simplicity as traditional card payments.
Core Payment Flow
- Merchant creates a payment session via API (amount, currency, callback URL)
- Gateway generates a unique wallet address and QR code for the session
- Customer scans QR with their crypto wallet and sends payment
- Blockchain confirmation is monitored (1 confirmation for small amounts, 3 for large)
- Payment status webhook notifies the merchant's system
- Settlement — crypto is either held or auto-converted to fiat and deposited
Technical Architecture
Blockchain Layer: - HD wallet generation for payment isolation (each payment gets a unique address) - Multi-chain support: Bitcoin, Ethereum, USDT (ERC-20 and TRC-20), USDC - Block explorer integration for confirmation tracking - Hot/cold wallet split for security (95% in cold storage)
Application Layer: - Merchant dashboard with real-time transaction monitoring - API with SDKs for JavaScript, Python, and PHP - Checkout widget for no-code integration - Webhook system for payment status notifications
Settlement Layer: - Real-time price feeds from 5 exchanges (median pricing) - Auto-conversion to AUD/USD at confirmed price - Daily settlement batches to merchant bank accounts - Reconciliation engine matching blockchain transactions to merchant orders
Compliance Layer: - KYC/AML checks for merchant onboarding - Transaction monitoring for suspicious patterns - Automated reporting for regulatory requirements - Audit logs for every operation
Challenges We Faced
1. Price Volatility During Confirmation
Bitcoin confirmation takes 10-60 minutes. In that time, BTC price can move 2-5%. Who absorbs the difference?
Solution: We lock the exchange rate at the moment of payment detection (0-confirmation) and absorb the volatility risk in the settlement spread. For merchants, the price they see is the price they get.
2. Transaction Fee Unpredictability
Ethereum gas fees can range from $0.50 to $50 depending on network congestion.
Solution: Dynamic fee estimation using mempool analysis. We warn merchants when fees exceed a threshold relative to the payment amount ("Warning: network fee is 15% of this transaction").
3. Refund Mechanics
In traditional payments, refunds are straightforward. In crypto, the customer may not have the same wallet, or the token price may have changed significantly.
Solution: Refunds are processed in the original cryptocurrency at the original quantity (not value). If the merchant settled in fiat, the gateway handles the conversion.
What We'd Do Differently
- Start with stablecoins only — Bitcoin and Ethereum add complexity that most merchants don't need
- Build the compliance layer first — regulatory requirements should shape the architecture, not be bolted on
- Invest more in merchant onboarding UX — the technical integration is simple, but merchant confidence requires hand-holding
Digisailor's fintech practice has delivered payment platforms, crypto gateways, and banking migration projects across Australia, Philippines, and the Middle East.
Frequently Asked Questions
Related Solutions
Digitize inspections, reduce defects, and make quality audit-ready.
Track every batch, lot, and serial — forward and backward — with audit-ready evidence.
Track assets and enforce location-based rules using BLE, UWB, GPS, and LoRaWAN.