- Next.js 16 (App Router)
- TypeScript
- Tailwind CSS + shadcn/ui
- SWR for data fetching
- @stellar/stellar-sdk + Freighter
- Web Components (for embeddable widget)
Merchant-facing marketing page with features, how-it-works, and CTA.
Customer-facing payment page. Fetches session from API, displays:
- Amount and asset (merchant's preferred currency)
- Multi-asset selector — shows equivalent amounts in each accepted asset using real-time DEX prices
- QR code (web+stellar:pay? URI)
- Freighter wallet connect + pay button
- Payment status (polls every 3s while pending)
- Confirmation screen on success
- Wallet login (SEP-10 authentication)
- Stats overview (sessions, payments, revenue)
- Recent payments list
- Fiat settlement overview (connected anchor, withdrawal history)
- API key management
- Webhook URL configuration
- Anchor connection for fiat settlement
Radio group for asset selection. When acceptAssets is configured, shows all accepted assets with real-time DEX prices. Displays equivalent amounts so customers can choose which asset to pay with.
Renders QR code from Stellar payment URI. Shows copyable receiving address. Adapts URI based on selected asset.
Freighter wallet connect button. Shows connected address and "Pay" button. Signs the appropriate payment transaction based on selected asset.
Displays session state: waiting (spinner), confirmed (green check), expired (red X), cancelled.
Composes all checkout components. Main checkout page content.
The embeddable widget is a framework-agnostic Web Component that can be dropped into any page with a <script> tag.
<script src="https://js.orbitstream.dev/v1/widget.js"></script>
<orbitstream-checkout session-id="cs_abc123" theme="light"></orbitstream-checkout>
The widget:
- Is self-contained (loads its own CSS, no external dependencies)
- Works with React, Vue, Svelte, Angular, or plain HTML
- Communicates with the OrbitStream API directly
- Supports custom themes via CSS custom properties
- Emits events:
payment-confirmed,payment-expired,error
| Prop | Type | Description |
|---|---|---|
| session-id | string | Checkout session ID |
| theme | 'light' | 'dark' | Color theme (default: 'light') |
| on-payment-confirmed | function | Callback with txHash |
| on-error | function | Callback with error details |
A React component wrapper (@orbitstream/sdk/react) provides type-safe props and event handling.
SWR hook that fetches session status. Polls every 3s while pending. Returns session, isLoading, isPaid, isExpired.
Freighter wallet hook. Returns address, connect, disconnect, signTransaction, isConnected.
Fetches real-time DEX prices for a list of Stellar assets. Returns conversion rates relative to a base currency. Used by AssetSelector to display equivalent amounts.
Backend API client. fetchSession, registerMerchant, merchantLogin, connectAnchor.
Stellar SDK setup. Horizon server instance, network passphrase, path payment helpers for DEX routing.
buildStellarPayURI() — constructs web+stellar:pay? URI for QR codes. Supports asset-specific URIs.
DEX price fetching and conversion. Queries Horizon order books for real-time rates. Caches prices for 30s to reduce API calls.