Distribute Creator Fees
Claim your creator fees now
Connect a wallet, see the amount, claim in one click. Rent, creator fees and cashback come together.
Free check — nothing happens until you press Claim
Fee-sharing tokens are paid out with the distribute call below — shareholders receive their cut directly.
When a token on Pump.fun has fee sharing configured (rewards split between multiple addresses), /api/claim-distribute is the dedicated permissionless endpoint for distributing those rewards. It reads the on-chain sharing config, resolves the token's quote mint, and distributes accumulated fees to all shareholders in one transaction.
API Endpoints:
GET https://pumpdev.io/api/claim-account— Check claimable fees before distributing (read-only)POST https://pumpdev.io/api/claim-distribute— Build distribution transaction
Tip: Use
GET /api/claim-account?publicKey=xxx&mint=yyyfirst to check if there are fees to distribute. The response includeshasFeeSharing,shareholders, andtotalClaimableso you can preview amounts before building the transaction.
When to Use This
| Your Setup | Endpoint to Use |
|---|---|
| Single creator wallet (no fee sharing) | /api/claim-account |
| Fee sharing enabled (50/50, 70/30, etc.) | /api/claim-distribute (recommended) |
If you set up reward distribution on pump.fun to split creator fees between multiple wallet addresses, this is the clearest endpoint to use. /api/claim-account can also handle fee sharing when you provide mint, but /api/claim-distribute makes the permissionless distribution behavior explicit.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
publicKey | string | Yes | Any wallet public key (pays transaction fees) |
mint | string | Yes | Token mint address |
priorityFee | number | No | Priority fee in SOL (default: 0.0005) |
Note: The
publicKeydoes not need to be a shareholder. Any wallet can trigger the distribution — the instruction is permissionless. The on-chain config determines who receives funds and how much.
Quote-aware behavior:
mintis required because the API needs it to resolve the sharing config, quote mint, and any graduated PumpSwap creator fees. For USDC or other SPL quote mints, payouts go to shareholder token accounts rather than native SOL, and the transaction includes ATA initialization when needed.
Response: Binary serialized unsigned VersionedTransaction
Example
import { VersionedTransaction, Connection, Keypair } from '@solana/web3.js';
import bs58 from 'bs58';
const API_URL = 'https://pumpdev.io';
const RPC_URL = 'https://api.mainnet-beta.solana.com';
const PRIVATE_KEY = 'YourBase58PrivateKey';
async function distributeCreatorFees() {
const keypair = Keypair.fromSecretKey(bs58.decode(PRIVATE_KEY));
const publicKey = keypair.publicKey.toBase58();
console.log('Distributing fees for token...');
// 1. Build distribute transaction
const response = await fetch(`${API_URL}/api/claim-distribute`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
publicKey: publicKey,
mint: 'YourTokenMintAddress'
})
});
if (response.status !== 200) {
const error = await response.json();
console.error('API Error:', error);
return;
}
// 2. Deserialize and sign
const data = await response.arrayBuffer();
const tx = VersionedTransaction.deserialize(new Uint8Array(data));
tx.sign([keypair]);
// 3. Send to Solana
const connection = new Connection(RPC_URL, 'confirmed');
try {
const signature = await connection.sendTransaction(tx, {
skipPreflight: false,
maxRetries: 3
});
console.log('\nFees distributed to all shareholders!');
console.log('Signature:', signature);
const confirmation = await connection.confirmTransaction(signature, 'confirmed');
if (confirmation.value.err) {
console.error('Transaction failed:', confirmation.value.err);
} else {
console.log('Distribution confirmed!');
}
} catch (err) {
console.error('Send error:', err.message);
}
}
distributeCreatorFees();
How Fee Sharing Works Under the Hood
When you configure fee sharing on pump.fun (e.g. 50/50 split between two wallets), here's what happens at the protocol level:
1. Sharing Config Created
Pump.fun creates a sharing config account on-chain stored at a PDA derived from ["sharing-config", token_mint]. This account contains:
- List of shareholder wallet addresses
- Each shareholder's percentage (in basis points, e.g. 5000 = 50%)
- Admin authority for managing the config
2. Bonding Curve Updated
The token's bonding curve creator field is replaced with the sharing config PDA address. This means the original creator wallet is no longer referenced directly.
3. Fees Accumulate in a Different Vault
With fee sharing active, creator fees accumulate in a vault at:
PDA: ["creator-vault", sharing_config_pda]
Instead of the normal vault at:
PDA: ["creator-vault", creator_wallet]
This is why the standard collect_creator_fee instruction fails — it looks for fees in ["creator-vault", your_wallet], which is empty.
4. Distribution
The quote-aware V2 distribution flow:
- Moves any graduated PumpSwap creator fees into the Pump creator vault first
- Reads the sharing config to get all shareholders and their percentages
- Withdraws from the correct vault (
["creator-vault", sharing_config_pda]) - Transfers each shareholder's portion directly to their wallet or quote-token ATA
- All shareholders are paid in a single atomic transaction
┌─────────────────────────┐
│ Creator Vault │
│ (sharing config PDA) │
│ Balance: 10 quote │
└───────────┬─────────────┘
│
distribute_creator_fees_v2
│
┌──────┴──────┐
▼ ▼
Wallet A Wallet B
5 quote 5 quote
Full Example with Balance Tracking
This balance-tracking example assumes a native-SOL quote mint. For USDC or other SPL quote mints, inspect each shareholder's associated token account instead of
getBalance().
import { VersionedTransaction, Connection, Keypair, PublicKey, LAMPORTS_PER_SOL } from '@solana/web3.js';
import bs58 from 'bs58';
const API_URL = 'https://pumpdev.io';
const RPC_URL = 'https://api.mainnet-beta.solana.com';
const PRIVATE_KEY = 'YourBase58PrivateKey';
const TOKEN_MINT = 'YourTokenMintAddress';
// Shareholder wallets to track balances
const SHAREHOLDERS = [
'ShareholderWallet1PublicKey',
'ShareholderWallet2PublicKey',
];
async function distributeAndTrack() {
const keypair = Keypair.fromSecretKey(bs58.decode(PRIVATE_KEY));
const publicKey = keypair.publicKey.toBase58();
const connection = new Connection(RPC_URL, 'confirmed');
console.log('=== DISTRIBUTE CREATOR FEES ===\n');
console.log('Payer:', publicKey);
console.log('Token:', TOKEN_MINT);
// Check shareholder balances before
console.log('\nBalances before:');
const balancesBefore = {};
for (const addr of SHAREHOLDERS) {
const bal = await connection.getBalance(new PublicKey(addr));
balancesBefore[addr] = bal;
console.log(` ${addr}: ${(bal / LAMPORTS_PER_SOL).toFixed(4)} SOL`);
}
// Build and send distribute transaction
const response = await fetch(`${API_URL}/api/claim-distribute`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
publicKey: publicKey,
mint: TOKEN_MINT
})
});
if (response.status !== 200) {
const error = await response.json();
console.error('\nAPI Error:', error);
return;
}
const data = await response.arrayBuffer();
const tx = VersionedTransaction.deserialize(new Uint8Array(data));
tx.sign([keypair]);
console.log('\nSending distribute transaction...');
try {
const signature = await connection.sendTransaction(tx, {
skipPreflight: false,
maxRetries: 3
});
console.log('Signature:', signature);
await connection.confirmTransaction(signature, 'confirmed');
// Check shareholder balances after
console.log('\nBalances after:');
for (const addr of SHAREHOLDERS) {
const bal = await connection.getBalance(new PublicKey(addr));
const diff = (bal - balancesBefore[addr]) / LAMPORTS_PER_SOL;
console.log(` ${addr}: ${(bal / LAMPORTS_PER_SOL).toFixed(4)} SOL (+${diff.toFixed(4)})`);
}
console.log('Signature:', signature);
} catch (err) {
console.error('Send error:', err.message);
}
}
distributeAndTrack();
Automated Distribution
Set up automated fee distribution on a schedule.
import { VersionedTransaction, Connection, Keypair } from '@solana/web3.js';
import bs58 from 'bs58';
const API_URL = 'https://pumpdev.io';
const RPC_URL = 'https://api.mainnet-beta.solana.com';
const PRIVATE_KEY = 'YourBase58PrivateKey';
const TOKEN_MINT = 'YourTokenMintAddress';
const INTERVAL_HOURS = 12;
async function distribute() {
const keypair = Keypair.fromSecretKey(bs58.decode(PRIVATE_KEY));
const publicKey = keypair.publicKey.toBase58();
const connection = new Connection(RPC_URL, 'confirmed');
const timestamp = new Date().toISOString();
console.log(`[${timestamp}] Distributing fees for ${TOKEN_MINT}`);
try {
const response = await fetch(`${API_URL}/api/claim-distribute`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
publicKey: publicKey,
mint: TOKEN_MINT
})
});
if (response.status !== 200) {
const error = await response.json();
console.log(`[${timestamp}] Skipped:`, error.error);
return;
}
const data = await response.arrayBuffer();
const tx = VersionedTransaction.deserialize(new Uint8Array(data));
tx.sign([keypair]);
const signature = await connection.sendTransaction(tx, {
skipPreflight: false,
maxRetries: 3
});
console.log(`[${timestamp}] Distributed! Signature: ${signature}`);
} catch (err) {
console.error(`[${timestamp}] Error:`, err.message);
}
}
distribute();
setInterval(distribute, INTERVAL_HOURS * 60 * 60 * 1000);
console.log(`Fee distributor running every ${INTERVAL_HOURS} hours.`);
Key Differences from Standard Claim
/api/claim-account | /api/claim-distribute | |
|---|---|---|
| Use case | General creator-claim endpoint | Dedicated fee-sharing endpoint |
| Requires mint | Optional, but strongly recommended | Yes |
| Signer | Caller-supplied payer. Direct claims are usually signed by the creator | Any wallet (permissionless) |
| Recipients | Creator on direct claims, or all shareholders when a fee-sharing mint is supplied | All shareholders per config |
| Vault location | Auto-resolved from creator or sharing config | ["creator-vault", sharing_config_pda] |
| On-chain instruction | collect_creator_fee_v2 or fee-sharing distribution flow | distribute_creator_fees_v2 |
Error Handling
| Error | Cause | Fix |
|---|---|---|
publicKey is required | Missing payer wallet | Add publicKey to request body |
Invalid publicKey | Malformed Solana address | Verify the public key format |
mint is required for fee distribution | Missing token mint | Add mint to request body |
Invalid mint address | Malformed mint | Check the mint address |
No fee sharing config found for this mint. Use /api/claim-account instead. | Token doesn't have fee sharing set up | Use /api/claim-account instead, or set up fee sharing on pump.fun first |
No claimable fees available for this mint | No accumulated fees to distribute | Wait for trading activity to generate fees |
Next Steps
- ⚡ Lightning Trade — One-call buy/sell
- ⚡ Lightning Setup — Create a Lightning wallet
- Claim Creator Fees — Standard fee claiming (no sharing)
- Trade API — Client-side buy and sell
- Token Creation — Create new tokens
- SOL Transfers — Transfer SOL between wallets