Skip to main content

Affiliates

Affiliate profiles let you register a partner-scoped app-fee recipient with a payout destination on any supported chain under a stable affiliateId, then reference that id in quote requests.

PUT /v1/affiliates/:affiliateId

Create or update an affiliate profile. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
Request:
{
  "recipientAddressSolana": "So1YourSolanaUsdcAddress",
  "feeBps": 50,
  "payoutChain": "solana",
  "payoutAsset": "USDC",
  "payoutAddress": "So1YourPayoutAddress"
}
The payoutChain, payoutAsset, and payoutAddress fields configure the self-service claim destination. All three must be provided together. Supported destinations match the pipeline payout routes. Legacy fields are supported for backward compatibility:
  • settlementChain + recipientAddress
Response:
{
  "affiliate": {
    "affiliateId": "flashpartner",
    "settlementChain": "base",
    "settlementAsset": "USDC",
    "recipientAddress": "0xYourBaseUsdcAddress",
    "recipientAddressBase": "0xYourBaseUsdcAddress",
    "recipientAddressSolana": "So1YourSolanaUsdcAddress",
    "feeBps": 50,
    "enabled": true,
    "createdAt": "2026-02-12T18:00:00.000Z",
    "updatedAt": "2026-02-12T18:00:00.000Z"
  }
}

GET /v1/affiliates

List affiliate profiles for your partner. Headers:
Authorization: Bearer fn_...
Query params:
  • includeDisabled (true|false, default false)
  • limit (default 200, max 1000)
  • offset (default 0)

DELETE /v1/affiliates/:affiliateId

Disable an affiliate profile. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
Response:
{ "ok": true }

POST /v1/affiliates/:affiliateId/claim

Create a claim for the full available affiliate fee balance. The available balance reflects the affiliate’s 80% share after Flashnet’s 20% platform cut. Minimum claim is $1 USDC. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
No request body. The claim amount is the full available balance. Response:
{
  "claimId": "acl_...",
  "affiliateId": "flashpartner",
  "amount": "5000000",
  "status": "processing",
  "createdAt": "2026-02-27T12:00:00.000Z"
}
Claims require a payout destination configured on the affiliate profile (payoutChain, payoutAsset, payoutAddress).

GET /v1/affiliates/:affiliateId/claims

List claims for an affiliate. Headers:
Authorization: Bearer fn_...
Query params:
  • limit (default 50, max 200)
  • offset (default 0)

Partner Webhooks

Webhooks deliver order status changes for your partner account.

POST /v1/webhooks

Register an endpoint. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
{ "url": "https://example.com/flashnet/webhooks" }
Response:
{
  "webhookId": "wh_...",
  "secret": "hex string"
}
secret is only returned at creation time. Store it.

DELETE /v1/webhooks/:id

Disable an endpoint. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
Response:
{ "ok": true }
See Webhooks for signature verification, payload shape, and retry behavior.

Accumulation Addresses

Accumulation addresses are reusable deposit addresses on Solana and any supported chain. Each deposit automatically creates an order that delivers BTC or USDB on Spark.

POST /v1/accumulation-addresses

Create an accumulation address. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
{
  "label": "optional",
  "sourceChain": "solana",
  "sourceAsset": "USDC",
  "destinationAsset": "BTC",
  "recipientSparkAddress": "spark1...",
  "feeBps": 5,
  "slippageBps": 50
}
Response:
{
  "accumulationAddressId": "acu_...",
  "sourceChain": "solana",
  "sourceAsset": "USDC",
  "destinationAsset": "BTC",
  "recipientSparkAddress": "spark1...",
  "feeBps": 5,
  "slippageBps": 50,
  "enabled": true,
  "depositAddress": "So1...",
  "createdAt": "2026-02-04T01:00:00.000Z",
  "subscriptions": []
}

POST /v1/accumulation-addresses/sync

Re-sync all enabled accumulation addresses into the configured deposit detection webhooks. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>

GET /v1/accumulation-addresses

List accumulation addresses.

GET /v1/accumulation-addresses/:id

Get a single accumulation address, including subscription status.

DELETE /v1/accumulation-addresses/:id

Disable an accumulation address. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>

Liquidation Addresses

Liquidation addresses are reusable Bitcoin L1 deposit addresses. Each deposit automatically creates an order that delivers to any supported chain and asset.

POST /v1/liquidation-addresses

Create a liquidation address. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>
{
  "label": "optional",
  "destinationChain": "ethereum",
  "destinationAsset": "USDC",
  "destinationAddress": "0x...",
  "zeroconfEnabled": false,
  "slippageBps": 50,
  "feeBps": 5
}
Response:
{
  "liquidationAddressId": "liq_...",
  "sparkAddress": "spark1...",
  "l1DepositAddress": "bc1...",
  "destination": { "chain": "ethereum", "asset": "USDC", "address": "0x..." },
  "zeroconfEnabled": false,
  "feeBps": 5,
  "slippageBps": 50,
  "enabled": true,
  "createdAt": "2026-02-04T01:00:00.000Z"
}

GET /v1/liquidation-addresses

List enabled liquidation addresses.

GET /v1/liquidation-addresses/:id

Get a single liquidation address (enabled or disabled).

DELETE /v1/liquidation-addresses/:id

Disable a liquidation address. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>

POST /v1/liquidation-addresses/sync-blockdaemon

Synchronize enabled liquidation addresses into Blockdaemon Streaming watchlists. Headers:
Authorization: Bearer fn_...
X-Idempotency-Key: <unique key>