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. Expired quotes are repriced at live market rates if a deposit arrives after expiry.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 Accumulation Addresses or Liquidation 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.repriceorder.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