Create onramp order
Quote and order in one call for a Lightning payment into any destination.
curl --request POST \
--url https://orchestration.flashnet.xyz/v1/orchestration/onramp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"destinationChain": "spark",
"destinationAsset": "USDB",
"recipientAddress": "RECIPIENT_ADDRESS"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
destinationChain: 'spark',
destinationAsset: 'USDB',
recipientAddress: 'RECIPIENT_ADDRESS'
})
};
fetch('https://orchestration.flashnet.xyz/v1/orchestration/onramp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://orchestration.flashnet.xyz/v1/orchestration/onramp"
payload = {
"destinationChain": "spark",
"destinationAsset": "USDB",
"recipientAddress": "RECIPIENT_ADDRESS"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"amountMode": "exact_in",
"estimatedOut": "99000000",
"feeAmount": "500000",
"roundingFeeAmount": "0",
"totalFeeAmount": "500000",
"feeBps": 50,
"feeAsset": "USDC",
"route": [
"BTC",
"USDB",
"USDC"
],
"quoteId": "q_7e450ab4-935b-4f8d-a6c4-4987a3cd2831",
"depositAddress": "lnbc1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq9qrsgq357wnc5r2ueh7ck6q93dj32dlqnls087fxdwk8qakdyafkq3yap9us6v52vjjsrvywa6rt52cm9r9zqt8r2t7mlcwspyetp5h2tztugp9lfyql",
"amountIn": "100000",
"expiresAt": "2026-09-12T12:02:00.000Z",
"orderId": "ord_b91bbf90-42dc-4fe3-9b15-1d2c7e19cce6",
"paymentLinks": {
"cashApp": "https://cash.app/launch/lightning/lnbc1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq9qrsgq357wnc5r2ueh7ck6q93dj32dlqnls087fxdwk8qakdyafkq3yap9us6v52vjjsrvywa6rt52cm9r9zqt8r2t7mlcwspyetp5h2tztugp9lfyql"
},
"effectiveSlippageBps": 1000
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Partner API key in the form Authorization: Bearer fn_....
Headers
1Body
Unsupported top-level and refund fields are ignored and returned in ignoredFields.
arbitrum, arc, avalanche, base, bitcoin, bsc, ethereum, hedera, hypercore, hyperevm, lightning, litecoin, monad, monero, optimism, plasma, polygon, robinhood, sei, solana, spark, tempo, ton, tron, xrp, zcash A canonical public asset symbol or a registry asset routing key. TON is a legacy input alias for ton:GRAM only; responses use GRAM.
AAPL, AI, AMD, AMZN, BNB, BONER, BTC, CASHCAT, COIN, COST, DAI, DELTA, DJT, ETH, GLD, GME, GOOGL, GRAM, HIMS, HSUSD, HYPE, IF, LTC, META, MON, MSFT, MSTR, MU, NVDA, PIPEDOG, PLTR, POL, PONS, PYUSD, PathUSD, QQQ, RDDT, SHX, SKHY, SLV, SNDK, SOL, SPCX, SPY, STONKBROKER, TENDIES, TRX, TSLA, TSM, UP, USDB, USDC, USDC.e, USDG, USDT, USDe, USD₮0, USO, WBNB, WBTC, WEN, XMR, XPL, XRP, ZEC, cbBTC, tBTC Destination recipient; use the owner address for Solana tokens; sanctioned addresses are rejected.
1Amount in smallest units; exact_out uses the destination asset and whole cents for stablecoins; mutually exclusive with amountFiatUsd.
^[0-9]+$USD amount paid through Cash App or Strike, converted to sats at request time; read current bounds from /v1/orchestration/limits.
^(?:0|[1-9][0-9]*)(?:\.[0-9]{1,2})?$exact_out pins the destination amount and requires whole cents for stablecoins.
exact_in, exact_out Requested delivery mode; fixed applies only to eligible exact_in onramps and is echoed when applied.
variable, fixed Slippage tolerance in basis points, subject to the route minimum.
0 <= x <= 1000Lightning address or amountless BOLT11 refund invoice; unsupported values appear in ignoredFields, and pre-swap failures without a target report refund_address_missing.
1Lightning refund chain, inferred when omitted; unsupported values appear in ignoredFields.
arbitrum, arc, avalanche, base, bitcoin, bsc, ethereum, hedera, hypercore, hyperevm, lightning, litecoin, monad, monero, optimism, plasma, polygon, robinhood, sei, solana, spark, tempo, ton, tron, xrp, zcash Inline app fees, requiring a server key or dashboard session.
1 - 16 elementsShow child attributes
Show child attributes
Registered affiliate ID for accrued fees, also accepted from client keys.
Registered affiliate IDs or fee overrides; mutually exclusive with appFees, with overrides requiring a server key or dashboard session.
1 - 16 elementsRegistered affiliate ID or { affiliateId, feeBps } override.
1Response
Quote and order created
Exact immutable reviewed token identities frozen by the native quote. Omitted for legacy or invalid snapshots; caller metadata cannot set these pins.
1 - 32 elementsShow child attributes
Show child attributes
Unsigned deposit transfer, returned only with includeCalldata=true on supported EVM sources. No approval is needed. This funds the deposit; it does not execute the swap.
Show child attributes
Show child attributes
Memo or tag required with the deposit when present.
The invoice is amountless. amountIn and estimatedOut price the indicative amount and are rescaled to the amount actually paid.
true exact_in, exact_out fixed Action required when the locked price can no longer be honored.
strict_requote, approval_required Minimum locked destination amount in smallest units.
Quoted network cost in smallest units of networkCostAsset.
Asset used to pay the quoted network cost.
Whether the quoted network cost must be paid.
Itemized network costs and quote-time assumptions.
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Client-key read token for this quote and its order, including private ZeroConf outcomes.
Show child attributes
Show child attributes
Slippage tolerance applied to the order, in basis points.
Names of ignored request fields, including unsupported refundAddress or refundChain values.
Was this page helpful?
curl --request POST \
--url https://orchestration.flashnet.xyz/v1/orchestration/onramp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"destinationChain": "spark",
"destinationAsset": "USDB",
"recipientAddress": "RECIPIENT_ADDRESS"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
destinationChain: 'spark',
destinationAsset: 'USDB',
recipientAddress: 'RECIPIENT_ADDRESS'
})
};
fetch('https://orchestration.flashnet.xyz/v1/orchestration/onramp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://orchestration.flashnet.xyz/v1/orchestration/onramp"
payload = {
"destinationChain": "spark",
"destinationAsset": "USDB",
"recipientAddress": "RECIPIENT_ADDRESS"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"amountMode": "exact_in",
"estimatedOut": "99000000",
"feeAmount": "500000",
"roundingFeeAmount": "0",
"totalFeeAmount": "500000",
"feeBps": 50,
"feeAsset": "USDC",
"route": [
"BTC",
"USDB",
"USDC"
],
"quoteId": "q_7e450ab4-935b-4f8d-a6c4-4987a3cd2831",
"depositAddress": "lnbc1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq9qrsgq357wnc5r2ueh7ck6q93dj32dlqnls087fxdwk8qakdyafkq3yap9us6v52vjjsrvywa6rt52cm9r9zqt8r2t7mlcwspyetp5h2tztugp9lfyql",
"amountIn": "100000",
"expiresAt": "2026-09-12T12:02:00.000Z",
"orderId": "ord_b91bbf90-42dc-4fe3-9b15-1d2c7e19cce6",
"paymentLinks": {
"cashApp": "https://cash.app/launch/lightning/lnbc1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq9qrsgq357wnc5r2ueh7ck6q93dj32dlqnls087fxdwk8qakdyafkq3yap9us6v52vjjsrvywa6rt52cm9r9zqt8r2t7mlcwspyetp5h2tztugp9lfyql"
},
"effectiveSlippageBps": 1000
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}