Revenue share with integrator fees
Platforms that resell the payment flow can initialize the SDK with their public
integratorId. The same ID applies an owner-configured fee to a multi-output quote.
import {
createSilentSwapClient,
parseUsdc,
type QuoteRequest,
type SilentSwapConfig,
} from '@silentswap/sdk';
declare const walletClient: NonNullable<SilentSwapConfig['walletClient']>;
const client = createSilentSwapClient({
walletClient,
integratorId: 'int_0123456789abcdef01234567',
});
const revenueShare: QuoteRequest = {
privacy: true,
inputAddress: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
sourceAsset: 'USDC',
sourceChainId: 56,
outputs: [
{
address: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
chainId: 8453,
amount: parseUsdc('70'),
},
{
address: '0x90F79bf6EB2c4f870365E785982E1f101E93b906',
chainId: 56,
amount: parseUsdc('30'),
},
],
};
const quote = await client.quote(revenueShare);
console.log(quote.integratorFee, quote.integratorAddress);
// Render every output, asset, fee, and expiry in trusted UI before this line.
const order = await client.placeOrder(quote);
void order;The integrator fee is additive: it does not reduce the requested recipient payouts. SilentSwap's
owner configures the percentage, split, and payout address; an integrator cannot override them
per quote. quote.integratorFee remains 0 until a payout address is
registered.
Integrator fees do not apply to address-funded BTC, LTC, TON, or TRON inputs, or to Simple Bridge. See integrator fees for fee settlement and testing and production access before launch.
Render all outputs, assets, fees, and expiry in trusted UI before calling
placeOrder.