Installation
- Node.js / TypeScript
- React
- Python
The
@flarehq/sdk package is the primary SDK and the most feature-complete client. It targets Node.js 18+ and has full TypeScript typings.Node.js / TypeScript SDK
The Node.js SDK is the recommended choice for server-side logic: creating checkout sessions, managing escrows, verifying webhooks, and deploying AI agents. Initialize a single shared client in your project and import it wherever you need it.src/lib/flarehq.ts
Store your secret key only in server-side environment variables — never expose
fhq_sec_... keys to the browser. Use your Publishable Key (fhq_pub_...) for any client-side initialization.Create a checkout session
Once the client is initialized, creating a hosted checkout session is a single async call:src/app/api/checkout/route.ts
React SDK
The React SDK builds on top of@flarehq/sdk to give you ready-made components for embedding payment flows directly in your UI. It handles loading states, error feedback, and wallet connection out of the box — so you can ship a checkout experience without building one from scratch.
src/components/CheckoutButton.tsx
The React SDK requires
@flarehq/sdk as a peer dependency. If you are already using the Node.js SDK in the same project, no additional installation is needed.Python SDK
Useflarehq-python for Python backends, data pipelines, and autonomous agents that need to create payment sessions, release escrows, or listen for on-chain events.
src/payments/checkout.py
SDK Capability Overview
Not every SDK surfaces every feature. Use this table to confirm the right library for your use case:The React SDK is intentionally scoped to UI rendering. Server-side operations — escrow, streaming, webhooks, and x402 — must be handled from your backend using the Node.js or Python SDK.
Keeping Your SDKs Up to Date
FlareHQ ships updates to all three SDKs as new Arc testnet features become available. Run the following commands to pull the latest versions:Next Steps
Webhooks
Receive real-time HTTP notifications for payment, escrow, and stream events.
Errors & Troubleshooting
Understand HTTP status codes and resolve common integration issues.
Hosted Checkout
Build a complete USDC checkout flow with the pre-built payment page.
Quickstart
Go from zero to your first on-chain payment in under five minutes.

