Without the Orchestrator, building all of this could take 6-12 months. With it, you can integrate in a few days.
Learn how OFFER-HUB works and how to integrate it into your marketplace in minutes.
OFFER-HUB Orchestrator is a self-hosted payments and escrow backend for service marketplaces. It handles the financial plumbing — escrow, balance management, dispute resolution, and USDC transactions on Stellar — so you can focus on building your marketplace product.
OFFER-HUB solves the hardest problems in marketplace payments:
| Challenge | Orchestrator Solution |
|---|---|
| Holding buyer funds securely | Non-custodial escrow via Trustless Work smart contracts |
| Preventing double-spending | Atomic balance operations + idempotency keys |
| Handling "seller didn't deliver" | Built-in dispute workflow with SPLIT resolution |
| Managing crypto wallets for non-crypto users | Invisible Stellar wallets (Web2 UX) |
| Tracking payment state | State machine with full audit log |
| Real-time notifications | SSE event stream |
Without the Orchestrator, building all of this could take 6-12 months. With it, you can integrate in a few days.
Before you begin, ensure you have the following installed:
| Requirement | Version | Purpose |
|---|---|---|
| Node.js | 18+ | Runtime environment |
| npm or pnpm | Latest | Package management |
| PostgreSQL | 14+ | Database |
| Redis | 6+ | Caching and queues |
| Git | Latest | Version control |
You'll also need:
For production, you'll need a Stellar mainnet account with USDC trustline and a Trustless Work API key.
git clone https://github.com/OFFER-HUB/offer-hub-monorepo.gitcd offer-hub-monoreponpm installCreate a PostgreSQL database:
createdb offerhub_devRun migrations:
npm run db:migratenpm run devThe API will be available at http://localhost:4000.
Run npm run dev:watch for auto-reload during development.
Create a .env file in the project root:
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
REDIS_URL | Yes | Redis connection string |
STELLAR_NETWORK | Yes | testnet or mainnet |
TRUSTLESS_WORK_SECRET | Yes | API key for escrow contracts |
OFFERHUB_MASTER_KEY | Yes | Master key for creating API keys |
PAYMENT_PROVIDER | No | crypto (default) or airtm |
Never commit your .env file to version control. Add it to .gitignore.
See Configuration for the complete list of environment variables.
Let's walk through creating your first escrow transaction.
First, generate an API key using your master key:
Save the returned key value — it's only shown once.
Create a buyer and seller:
Get the buyer's deposit address:
Send testnet USDC to the returned address. The balance will update automatically.
Reserve the buyer's funds in escrow:
The funds are now locked in a smart contract on Stellar.
When the work is complete, release the funds:
The seller's balance is now credited with the payment amount.
Use the same Idempotency-Key if you need to retry a request. The Orchestrator will return the cached response instead of processing a duplicate.
Here's the same flow using the TypeScript SDK:
Now that you've completed your first escrow, explore these guides:
Need help? Join our Discord community or open an issue on GitHub.