An autonomous AI entity built for the new memecoin era. Fart Agent is designed to create a powerful deflationary cycle that benefits the entire ecosystem.
Link your AI agent to its token. Revenue automatically triggers buyback & burn cycles, aligning agent success with token value.
Automatically direct revenue to coin buybacks & burns performed by agents or humans.
Create your agent's token on pump.fun
Set the percentage of revenue for buybacks
Use @pump-fun/agent-payments-sdk to accept payments
Revenue triggers automatic token buyback and burn when โฅ $10
A complete toolkit for building payment flows for Pump Tokenized Agents on Solana.
Build accept-payment transactions with automatic compute budget, SOL wrapping/unwrapping, and token account handling.
Verify payments server-side with validateInvoicePayment. HTTP API primary, RPC fallback. Never trust client alone.
Seamless Solana wallet adapter integration with useWallet() and useConnection() hooks. Supports Phantom, Solflare, and more.
Accept USDC (6 decimals) and wrapped SOL (9 decimals). Automatic precision handling and native SOL wrapping built-in.
On-chain Invoice ID PDA prevents duplicate payments. Each unique invoice combination can only be paid once.
Set validity windows with startTime and endTime. Expired invoices are automatically rejected by the on-chain program.
Install the SDK, configure your environment, and start building payment transactions.
npm install @pump-fun/agent-payments-sdk@number">3.number">0.number">0 @solana/web3.js@^number">1.number">98.number">0
# Solana RPC โ server-side SOLANA_RPC_URL=https:class=class="code-string">"code-comment">//rpc.solanatracker.io/public # Solana RPC โ client-side (used by wallet adapter) NEXT_PUBLIC_SOLANA_RPC_URL=https:class=class="code-string">"code-comment">//rpc.solanatracker.io/public # Token mint address class="code-keyword">of your tokenized agent on pump.fun AGENT_TOKEN_MINT_ADDRESS=<your-agent-mint-address> # Payment currency mint # USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v # SOL: So11111111111111111111111111111111111111112 CURRENCY_MINT=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
class="code-keyword">import { PumpAgent } class="code-keyword">from class="code-string">"@pump-fun/agent-payments-sdk"; class="code-keyword">import { Connection, PublicKey } class="code-keyword">from class="code-string">"@solana/web3.js"; class="code-keyword">const agentMint = class="code-keyword">new PublicKey(process.env.AGENT_TOKEN_MINT_ADDRESS!); class="code-keyword">const connection = class="code-keyword">new Connection(process.env.SOLANA_RPC_URL!); class=class="code-string">"code-comment">// With connection โ enables RPC-based verification fallback class="code-keyword">const agent = class="code-keyword">new PumpAgent(agentMint, class="code-string">"mainnet", connection);
From invoice generation to service delivery โ a complete server-to-client payment lifecycle.
Agent decides price โ generates unique memo โ sets time window (start/end timestamps)
buildAcceptPaymentInstructions() โ returns TransactionInstruction[] with compute budget
Build full Transaction (blockhash + feePayer + instructions) โ serialize as base64
Transaction.from(Buffer.from(txBase64, 'base64')) โ wallet prompts user to approve
sendRawTransaction(signedTx.serialize()) โ confirmTransaction(signature)
validateInvoicePayment() โ returns true/false โ ALWAYS verify server-side
If verified โ agent delivers the service. Else โ ask user to retry payment
Copy-paste these TypeScript examples to integrate payments into your agent.
class="code-keyword">import { PumpAgent } class="code-keyword">from class="code-string">"@pump-fun/agent-payments-sdk"; class="code-keyword">import { Connection, PublicKey } class="code-keyword">from class="code-string">"@solana/web3.js"; class="code-keyword">const agentMint = class="code-keyword">new PublicKey(process.env.AGENT_TOKEN_MINT_ADDRESS!); class="code-keyword">const connection = class="code-keyword">new Connection(process.env.SOLANA_RPC_URL!); class=class="code-string">"code-comment">// With connection โ enables RPC-based verification fallback class="code-keyword">const agent = class="code-keyword">new PumpAgent(agentMint, class="code-string">"mainnet", connection);
Connect your wallet and interact with the SDK โ generate invoices, build transactions, verify payments, and run scenario tests.
Configure your invoice params. The SDK requires amount, memo, startTime, and endTime.
Validate your integration with these real-world scenario tests.
Quick reference for resolving integration issues.
| Error | Cause | Fix |
|---|---|---|
| validateInvoicePayment returns false | Transaction may still be confirming, or params don't match | Wait a few seconds and retry. Verify amount, memo, startTime, endTime, and user match exactly. |
| Invoice already paid | The Invoice ID PDA is already initialized | Generate a new invoice with a different memo. |
| Insufficient balance | User's token account doesn't have enough tokens | Tell the user to fund their wallet before paying. |
| Currency not supported | The currencyMint is not in the protocol's GlobalConfig | Use a supported currency (USDC, wSOL). |