How khayaai/forgepaye works
FORGE is a multi-rail financial platform layered over a Hyperswitch payment router. Its core flow accepts payment activity through the unified router, normalizes it into the canonical ForgePayEvent ledger, and connects payment rails; the platform console exposes treasury, custody, wallet, and bureau capabilities. The README documents several service-level connections, but most service implementations were not sampled, so those links are documented relationships rather than inspected call paths.
Main entry points: platform Platform console · unified-router Unified router · agent-credit-bureau Agent credit bureau · client.ts Payment client SDKs
Components 18
Platform experience
- Platform console
forgepay/apps/platform - Forge API routes
forgepay/apps/platform/app/api/forge/[section]/route.ts
Payments and ledger
- Payment client SDKs
forgepay/packages/sdk-js/src/client.ts - Unified router
forgepay/services/unified-router - ForgePayEvent ledger
forgepay/services/unified-router - Card and bank router
crates/router/src/routes/app.rs - Stablecoin gateway
forgepay/services/stablecoin-gateway - Crypto gateway
forgepay/services/crypto-gateway - Stablecoin accounts
forgepay/services/accounts-service
Treasury and compliance
- Treasury rules
forgepay/services/enterprise-treasury/src/rules-engine.ts - Liquidity forecasts
forgepay/services/liquidity-forecaster/src/forecasting/engine.py - Compliance monitoring
forgepay/services/compliance-monitor/src/monitoring/engine.py
Agent finance
- Agent credit bureau
forgepay/services/agent-credit-bureau - Agent risk decisions
forgepay/services/agent-decision-framework - Agent negotiation
forgepay/services/agent-negotiation
Custody and identity
- Institutional custody
forgepay/services/forge-custody - DID wallets
forgepay/services/forge-wallet
Other components
- Merchant or agent
Connections 19
- Merchant or agent → Payment client SDKs: initiates payment
- Payment client SDKs → Unified router: submits payment
- Unified router → ForgePayEvent ledger: normalizes events
- Unified router → Card and bank router: routes card and bank
- Unified router → Stablecoin gateway: routes stablecoins
- Unified router → Crypto gateway: routes crypto
- Merchant or agent → Platform console: uses console
- Platform console → Forge API routes: calls API
- Platform console → Institutional custody: manages custody
- Platform console → DID wallets: manages wallets
- Platform console → Treasury rules: manages treasury
- Platform console → Agent credit bureau: accesses bureau
- Stablecoin accounts → Stablecoin gateway: supports stablecoin accounts
- ForgePayEvent ledger → Compliance monitoring: screens activity
- Compliance monitoring → Card and bank router: fetches payment history
forgepay/services/compliance-monitor/src/monitoring/engine.py - ForgePayEvent ledger → Liquidity forecasts: informs cash forecasts
- Liquidity forecasts → Treasury rules: informs treasury actions
- Agent credit bureau → Agent risk decisions: uses risk decisions
- Agent credit bureau → Agent negotiation: supports agent credit