Introduction
Universal payment orchestration for the Forge ecosystem.
ForgePay is a standalone payment API that handles fiat (Stripe Connect) and crypto (native Solana + Jupiter swaps). It sits at L2 in the Forge stack -- above ForgeConnect (identity), below your application. The SDK packages let you integrate payments into any React application in minutes.
Fiat + Crypto
Stripe Connect & native Solana in one API
Double-Entry Ledger
Append-only, debit = credit, always
Jupiter Swaps
Cross-token payments via atomic swap
Webhook Delivery
HMAC-SHA256 signed, BullMQ retry
Full TypeScript
Strict types, zero any, full inference
Zero Runtime Deps
Server SDK uses only globalThis.fetch
Architecture
Your App (Next.js / Hono / any frontend)
├─ @forge-pay/react ← React hooks + components (publishable key)
│ └─ ForgePay API ← called directly, no proxy needed
└─ @forge-pay/server ← Server SDK (secret key, admin ops)
└─ ForgePay API (Hono)
├─ Stripe Connect
├─ Solana RPC
└─ Jupiter AggregatorKey Concepts
Publishable keys are safe for the browser and can create payments + read merchant config. Secret keys are for server-side admin operations (refunds, ledger, config updates). The merchantId is always derived from the authenticated key -- you never need to pass it explicitly.