30 · Payment rails matrix (all ops)
How every tender type reaches money truth — cash, card, gift, loyalty, and crypto (DOGE / LTC / BTC). GigaWallet-class crypto is native multi-asset; fiat spine is always Core Invoicing.
One money spine
flowchart LR
subgraph TENDERS
CASH[Cash]
CARD[Card / terminal]
GIFT[Gift card]
LOY[Loyalty]
CRY[Crypto DOGE/LTC/BTC]
end
CART[POS cart tenders]
FIN[finalize]
CORE[Core Invoicing
Invoices + Payments]
CASH --> CART
CARD --> CART
GIFT --> CART
LOY --> CART
CRY --> W[CryptoInvoice + watcher]
W --> CART
CART --> FIN --> CORE
Crypto settles the cart payment first; finalize writes Core Invoice (fiat cents + multi-tender breakdown).
Fiat & store tenders
| Rail | POS path | Core Invoice | Notes |
|---|---|---|---|
| Cash | tender/cash | Yes on finalize | Till / shift variance |
| Card | tender/card + terminals | Yes | Refunds: Stripe when pi_/secret; else manual |
| Gift card | tender/giftcard | Yes | Balance in GiftCards; refund can re-credit |
| Loyalty | tender/loyalty | Yes | Points reverse on refund rails |
| Multi-tender | Multiple payments on cart | Yes | payment_details.payments + Payments rows |
| Store credit issue | Refund method | Yes | SC- codes as GiftCards |
Crypto parity matrix (DOGE / LTC / BTC)
| Capability | DOGE | LTC | BTC |
|---|---|---|---|
POS tender/crypto | ✅ | ✅ | ✅ |
buildCryptoInvoice | ✅ | ✅ | ✅ (added) |
Adapter package crypto/{asset}/ | ✅ | ✅ (restored) | ✅ |
| FX quote / price watcher | ✅ | ✅ | ✅ |
| Address RPC / HD | ✅ HD+RPC | ✅ HD+RPC | ✅ RPC (+ HD account type) |
| Pay URI / QR scheme | dogecoin: | litecoin: | bitcoin: |
| Payment watcher | dogeWatcher | ltcWatcher | btcWatcher |
| Per-tenant CryptoConfig RPC | ✅ | ✅ | ✅ |
| Optional GigaWallet sidecar | ✅ client | — | — |
Easy vs Advanced crypto (product modes)
| Mode | Who | How POS works |
|---|---|---|
hosted (Easy) |
Most businesses | POST tender/crypto → Coinbase / CoinGate / Coinremitter hosted pay or address |
native (Advanced) |
Crypto-native / own node | Same endpoint → DOGE/LTC/BTC address + QR via buildCryptoInvoice |
auto |
Default | Hosted if any easy provider enabled; else native; else off |
off |
— | Crypto tender returns 403 |
Configure via POST /api/crypto-config body
{ cryptoMode, hostedProvider, external: { coinbase, coingate, … } }
or GET /api/pos/crypto-mode. Cash/card/gift/loyalty unchanged.
vs GigaWallet
GigaWallet
is a DOGE payment backend (accounts, invoices, QR, webhooks).
GPE implements the same operational loop in-process for DOGE+LTC+BTC,
plus POS, Core Invoicing, and tenant config.
Optional payments/providers/gigawallet.js remains for pure-DOGE Giga hosting if desired.
Business operations coverage
| Need | Supported |
|---|---|
| Sell with cash/card/gift/loyalty/crypto | ✅ POS tenders → finalize → Core |
| Mixed tenders on one sale | ✅ |
| Void / refund with rails | ✅ inventory, gift, loyalty, card attempt, store credit |
| Email receipt / refund / SC code | ✅ tenant email ops (DocHub 29) |
| Accountant CSV export | ✅ /api/core-invoicing/export |
| Crypto under/over pay policy | ✅ invoice rules on create |
| Ticket billable → invoice | ✅ Core + optional crypto on ticket |
| Non-custodial crypto (biz holds keys) | ✅ RPC/HD per tenant config |
Enablement
# Recommended production CRYPTO_WATCHERS_ENABLED=1 CRYPTO_WATCHER_ORG_IDS=15,6 # optional; else discover CryptoConfig CRYPTO_INVOICE_EXPIRY=1 # optional TTL sweeper CRYPTO_WEBHOOK_DISPATCHER=1 # optional outbound webhooks # Node RPC (env fallbacks if CryptoConfig incomplete) DOGE_RPC_URL / DOGE_RPC_USER / DOGE_RPC_PASS LTC_CORE_RPC_URL / LTC_RPC_USER / LTC_RPC_PASS / LTC_WALLET_NAME BTC_RPC_URL / BTC_RPC_USER / BTC_RPC_PASS / BTC_WALLET_NAME
Key files
lib/invoices/buildCryptoInvoice.js— POS/ticket create (all three)payments/providers/crypto/{doge,ltc,btc}/— adaptersservices/cryptoWatchers.service.js— multi-tenant startservices/{doge,ltc,btc}Watcher.js— chain pollroutes/pos.routes.js— tender cash/card/crypto/gift/loyaltyservices/coreInvoicing.service.js— fiat money spine- DocHub 20 crypto · 28 Core · 29 email