@forge-pay/react

ForgePay Demo

Payment orchestration for the Forge ecosystem. Fiat via Stripe Connect, crypto via native Solana, token swaps via Jupiter.

Documentation

Payment Rails

Stripe Connect
Card payments via Stripe Elements
Full Stripe Connect integration with PaymentIntents, automatic platform fee splits, and webhook-driven confirmation.
Solana
Native SOL + SPL tokens, Jupiter swaps
Server-built transactions, wallet signing, on-chain verification. Jupiter swap injection for cross-token payments.

Architecture

Payment Intent Flow
Create intent → Payment method → Confirmation → Ledger entry. Idempotent, single-use intents.
Double-Entry Ledger
Every money movement = debit + credit. Append-only entries. Sum of debits always equals credits.
HMAC Webhooks
Outgoing webhooks signed with HMAC-SHA256. BullMQ retry with exponential backoff. 5 attempts max.
API keys never exposed to the browser — proxy route handles auth server-side

Checkout State

useCheckout() state
status:idle
intentId:null
isLoading:false
stripeClientSecret:null
serializedTx:null
error:null