https://orchestration.flashnet.xyz
Before you start
Create an account in the Orchestra dashboard. Flashnet reviews new accounts before enabling API access. After approval, create a server key and keep it outside client-side code.The minimal flow
1
Create a webhook endpoint
Register a webhook endpoint and store the returned secret.Verify inbound webhooks using
X-Flashnet-Signature and the raw request body. See Webhooks.2
Request a quote
Show prices with the public
GET /v1/orchestration/estimate while the user is browsing; call /quote only when they commit. Each /quote persists a quote and allocates a deposit address.Quotes expire 2 minutes after creation. Late deposits are always repriced at live market rates at detection time and execute against the quote’s slippageBps.Quote requests that you intend to submit must include Authorization and X-Idempotency-Key.Example (exact-in, default mode): route USDC on Base to USDT on Solana.3
Send the deposit
Send the source asset to
depositAddress.The deposit instruction depends on the route:- Spark source (
sourceChain = spark):depositAddressis a Spark address. - Bitcoin source (
sourceChain = bitcoin):depositAddressis a Bitcoin L1 address. - Lightning source (
sourceChain = lightning):depositAddressis a BOLT11 invoice. - Any other source chain (Solana, Base, other EVM chains, Tron, and the rest of
GET /v1/orchestration/routes):depositAddressis a deposit address on the source chain that receives the source asset.
amountIn of the source asset.4
Submit the deposit
Submitting creates an order. Processing is async.Submit shape depends on the quote See API Reference for the full request shapes and optional fields.
submit requires:Authorization: Bearer fn_...X-Idempotency-Key
sourceChain. Examples:5
Track the order
Preferred: use webhooks.Fallback: poll status after an order exists. For submissionless flows, use Treat every webhook delivery as at least once.
GET /v1/orchestration/order?quoteId=... until the deposit creates an order.Picking a route
- General payments and swaps: start with General Swaps, then choose a pair from Supported Routes.
- Bitcoin swaps: use Stablecoin to BTC or BTC to Stablecoin.
- Reusable deposit addresses: use reusable addresses when you do not want to call
/quoteand/submitper deposit.
Beyond the basics
For advanced flows, see the dedicated guides:
- Order Lifecycle: State machine, deposit flexibility, repricing, field mapping
- ZeroConf: Instant Bitcoin L1 credit
- BTC to Stablecoin: Exact-out payment intents
- API: Quotes and Orders: Affiliate fees (
appFees/affiliateId) - API: Approval Flows: Repricing and refund endpoints
Recommended data model
Persist these identifiers:quoteIdorderId- the source transaction identifier you submitted (
txHash,bitcoinTxid+bitcoinVout, Spark transfer id, or Lightning receive request id)
order.statusorder.error(for refund and failure diagnostics)order.paymentIntentorder.zeroconfOfferorder.refund
Next steps
- Choose Your Integration: Compare quote/submit, accumulation, and liquidation patterns
- Supported Routes: Discover live source and destination pairs
- General Swaps: Route stablecoins and native assets without a BTC endpoint
- Order Lifecycle: State machine and field mapping
- Stablecoin to BTC: Buy Bitcoin with USDC
- BTC to Stablecoin: Sell Bitcoin for USDC
- Webhooks: Receive order status updates
- API Reference: Complete endpoint documentation