Documentation Index
Fetch the complete documentation index at: https://docs.lasersell.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The LaserSell API supports adding a partner fee to any buy or sell transaction. This lets integrators collect a fee routed to a specified wallet as part of the swap instruction.
Partner fees are optional and configured per request. They are not related to LaserSell’s own protocol fee.
Fee Modes
You can specify the fee in one of two ways. These modes are mutually exclusive; do not set both on the same request.
Basis Points Mode
Set partner_fee_bps to charge a percentage of the swap value.
| Field | Type | Description |
|---|
partner_fee_recipient | string | Recipient wallet address (base58 pubkey). |
partner_fee_bps | number | Fee in basis points. Max 50 (0.5%). |
Example: A 25 bps (0.25%) fee on a 1 SOL swap routes 0.0025 SOL to the recipient.
Flat Lamports Mode
Set partner_fee_lamports to charge a fixed amount in lamports.
| Field | Type | Description |
|---|
partner_fee_recipient | string | Recipient wallet address (base58 pubkey). |
partner_fee_lamports | number | Fee in lamports. Max 50,000,000 (0.05 SOL). |
Limits
| Mode | Maximum Value | Equivalent |
|---|
| bps | 50 bps | 0.5% |
| lamports | 50,000,000 lamports | 0.05 SOL |
Requests exceeding these limits will be rejected with a 400 error.
Code Examples
Sell with BPS Fee
const request: BuildSellTxRequest = {
mint: "TOKEN_MINT",
user_pubkey: "WALLET",
amount_tokens: 1_000_000,
slippage_bps: 2_000,
output: "SOL",
partner_fee_recipient: "FEE_WALLET_PUBKEY",
partner_fee_bps: 25, // 0.25%
};
const response = await client.buildSellTx(request);
Buy with Flat Lamports Fee
const request: BuildBuyTxRequest = {
mint: "TOKEN_MINT",
user_pubkey: "WALLET",
amount: 0.1, // 0.1 SOL
slippage_bps: 2_000,
partner_fee_recipient: "FEE_WALLET_PUBKEY",
partner_fee_lamports: 5_000_000, // 0.005 SOL
};
const response = await client.buildBuyTx(request);
Enterprise: Custom Monetization
For Enterprise partners processing significant volume, we offer custom monetization arrangements that go beyond the standard partner fee system. These are structured on a per-partner basis and can include:
- Custom revenue sharing routed on-chain as part of every transaction your users execute through LaserSell.
- Custom split configurations tailored to your business model and volume.
All enterprise monetization is enforced atomically on-chain, so payouts are transparent, verifiable, and require no manual reconciliation.
To discuss a custom arrangement, contact sales@lasersell.io.
Important Notes
- Partner fees are available on the Advanced and Enterprise tiers. See Rate Limits and Tiers.
- The
partner_fee_recipient wallet must be a valid base58 Solana public key.
- The recipient does not need to have an existing account; the fee instruction will create one if necessary.
- Setting both
partner_fee_bps and partner_fee_lamports on the same request will result in a 400 error.
- Partner fees are deducted from the swap output and routed atomically within the same transaction.