Skip to main content
In this guide, you’ll learn how to check and claim fees from your partner configuration. Partner fees are accumulated from token launches that include your partner configuration. You can claim partner fees using either the Bags Dev Dashboard or the TypeScript SDK.
Transaction Fees: Partners pay transaction fees for all source claim steps, and the SOL you’re claiming is only received in the final vault-withdraw transaction. Keep enough SOL up front so every claim transaction can succeed and you collect the funds on that last step.

Method 1: Using the Dev Dashboard

The easiest way to check and claim partner fees is through the Bags Developer Dashboard.

Step 1: Access the Dashboard

  1. Go to https://dev.bags.fm and log in with your account.

Step 2: View Claim Stats

  1. Navigate to the Partner Key table in the dashboard.
  2. View your unclaimed fees in the table. The table displays:
    • Your partner config key
    • Claimed fees
    • Unclaimed fees
Partner Key Table with Stats

Step 3: Claim Fees

  1. If you have unclaimed fees, click the “Claim” button next to your partner key in the table.
  2. Confirm the transaction in your connected wallet.
  3. Your fees will be claimed and transferred to your wallet.
Make sure your wallet has sufficient SOL balance to pay for the transaction fees.

Method 2: Using the SDK

You can also check and claim partner fees programmatically using the Bags TypeScript SDK.

Prerequisites

Before starting, make sure you have:

1. Set Up Environment Variables

This guide requires your wallet’s private key. Add it to your base .env file:
You can export your private key from wallets like Bags, Phantom, or Backpack.

2. The Partner Fee Claiming Script

Here is a comprehensive script to check partner fee stats and claim fees. You can save this as claim-partner-fees.ts. This script uses the Bags SDK’s partner service to check claimable fees and generate claim transactions. The SDK returns claim transactions where the last transaction must be executed last because it withdraws funds from the user vault. All preceding transactions fund that vault and could be processed in parallel before the final one, but this guide executes them sequentially for simplicity.

Endpoints Used Under the Hood

This SDK flow calls these API endpoints: sdk.partner.getPartnerConfig() is an on-chain account read (PDA fetch), not a Bags HTTP API endpoint.

3. Understanding Partner Fees

Partner fees are accumulated when token launches include your partner configuration. Here’s how it works:

Partner Fee Accumulation

  • Token Launches: When tokens are launched with your partner config, fees from trading are automatically accumulated in your partner configuration
  • Fee Share: The percentage you receive is determined by the partner configuration’s BPS (basis points) setting
  • Automatic Tracking: The SDK tracks all accumulated fees across all token launches that include your partner config

Claiming Process

  1. Check Stats: Use getPartnerConfigClaimStats() to see how much you can claim
  2. Get Transactions: Use getPartnerConfigClaimTransactions() to generate claim transactions
  3. Sign & Send: Sign and broadcast the transactions to claim your fees

Fee Types

  • Claimed Fees: Fees you’ve already claimed and received
  • Unclaimed Fees: Fees that are available to claim but haven’t been claimed yet

4. Running the Script

To check and claim partner fees, edit the partnerWallet variable in claim-partner-fees.ts with your partner wallet address. Then, run the script from your terminal:
The script will:
  1. Check if your partner config exists
  2. Display your partner configuration details
  3. Show your claimable fee stats
  4. Generate and send claim transactions if fees are available
  5. Display updated stats after claiming

Alternative: Using the Bags CLI

This section requires the Bags CLI. See Install and Set Up the Bags CLI to get started.
Claim partner fees from the terminal without writing scripts:
Add --skip-confirm to bypass the confirmation prompt:
To check your partner stats before claiming:

5. Checking Stats Only

If you just want to check your partner fee stats without claiming, you can use this simplified version:

6. Troubleshooting

Common issues include:
  • Partner Config Not Found: Ensure you’ve created a partner key first using the Create Partner Key guide
  • No Unclaimed Fees: If unclaimed fees are 0, there are no fees available to claim at this time
  • Insufficient SOL: Your wallet needs SOL for transaction fees
  • Invalid Wallet Address: Ensure the partner wallet address is a valid Solana public key
  • Transaction Failures: Check that your wallet has sufficient SOL for transaction fees
For more details, see the API Reference.