https://orchestration.flashnet.xyz
The minimal flow
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.Request a quote
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): buy BTC on Spark with USDC on Base.Send the deposit
Send the source asset to
depositAddress.The deposit instruction depends on the route:- Base/Solana source (
sourceChain = base|solana):depositAddressis a chain address that receives the source asset. - 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. - Chain source (
sourceChain = ethereum|arbitrum|optimism|polygon|tron):depositAddressis a deposit address on the source chain.
amountIn.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:Picking a route
- Swaps: start with 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
- 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