White-label Solana token account recovery. Integrate our battle-tested infrastructure into your app and earn fees on every transaction.
Simple REST API. Get your API key and start integrating in minutes. No complex setup required.
Keep 70% of the 15% fee on every transaction. Your users recover SOL, you earn passive income.
Returns unsigned transactions. Private keys never leave your users' devices.
Powered by RefundYourSOL infrastructure. Millions of accounts closed, thousands of SOL recovered.
Total fee is 15% of recovered SOL. This is split between you and the RYS platform.
Example: User recovers 1 SOL โ User gets 0.85 SOL, You earn 0.105 SOL, Platform gets 0.045 SOL
// 1. Check wallets for closeable accounts
const response = await fetch('https://api.refundyoursol.com/api/v1/check', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
},
body: JSON.stringify({
walletAddresses: ['wallet1...', 'wallet2...']
})
});
const data = await response.json();
console.log(data.totals.totalEstimatedReturn); // SOL user will receive
All API endpoints require the X-API-Key header.
Check wallets for empty token accounts and estimate recovery.
// Request
{
"walletAddresses": ["wallet1...", "wallet2..."] // Max 20 wallets
}
// Response
{
"success": true,
"wallets": [{
"address": "wallet1...",
"emptyTokenAccounts": 15,
"accountsWithBalance": 3,
"walletBalance": 0.5,
"potentialRecovery": 0.0306,
"estimatedReturn": 0.026,
"fee": 0.0046,
"canProcess": true
}],
"totals": {
"totalEmptyAccounts": 15,
"totalPotentialRecovery": 0.0306,
"totalEstimatedReturn": 0.026
}
}
Generate unsigned transactions to close token accounts. Client signs and submits.
// Request
{
"walletAddresses": ["wallet1..."],
"refundWallet": "destination...", // Optional: where to send recovered SOL
"burnAccounts": false // Optional: burn tokens before closing
}
// Response
{
"success": true,
"walletTransactions": {
"wallet1...": [{
"transaction": "base64_encoded_unsigned_tx",
"accountsInTx": 10,
"estimatedFee": 0.003
}]
},
"summary": {
"totalAccountsToClose": 10,
"totalPotentialRecovery": 0.0204,
"totalFee": 0.00306,
"userReturn": 0.01734
}
}
Log completed transactions for tracking and stats.
// Request
{
"walletAddress": "wallet1...",
"signature": "tx_signature...",
"accountsClosed": 10,
"solRecovered": 0.0204
}
// Response
{
"success": true,
"message": "Transaction logged successfully",
"stats": {
"accountsClosed": 10,
"solRecovered": 0.0204,
"ownerFeeEarned": 0.00214
}
}
Get your API key statistics and recent transactions.
// Response
{
"success": true,
"stats": {
"totalRequests": 1250,
"totalAccountsClosed": 8500,
"totalSolRecovered": 17.34,
"totalFeesEarned": 1.82,
"feeWallet": "your_fee_wallet...",
"createdAt": "2024-01-15T10:30:00Z",
"lastUsedAt": "2024-12-21T15:45:00Z"
},
"recentTransactions": [...]
}
import { Connection, Keypair, VersionedTransaction } from '@solana/web3.js';
import bs58 from 'bs58';
const API_KEY = 'your_api_key_here';
const API_BASE = 'https://api.refundyoursol.com';
async function recoverSOL(walletAddress, privateKey) {
// 1. Check for closeable accounts
const checkRes = await fetch(`${API_BASE}/api/v1/check`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
body: JSON.stringify({ walletAddresses: [walletAddress] })
});
const checkData = await checkRes.json();
const wallet = checkData.wallets[0];
if (wallet.emptyTokenAccounts === 0) {
console.log('No accounts to close');
return;
}
console.log(`Found ${wallet.emptyTokenAccounts} accounts, estimated return: ${wallet.estimatedReturn} SOL`);
// 2. Get unsigned transactions
const closeRes = await fetch(`${API_BASE}/api/v1/close`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
body: JSON.stringify({ walletAddresses: [walletAddress] })
});
const closeData = await closeRes.json();
const transactions = closeData.walletTransactions[walletAddress];
// 3. Sign and submit each transaction
const connection = new Connection('https://api.mainnet-beta.solana.com');
const keypair = Keypair.fromSecretKey(bs58.decode(privateKey));
for (const txData of transactions) {
// Decode transaction
const txBuffer = Buffer.from(txData.transaction, 'base64');
const tx = VersionedTransaction.deserialize(txBuffer);
// Sign
tx.sign([keypair]);
// Submit
const signature = await connection.sendTransaction(tx);
console.log(`TX sent: ${signature}`);
// Wait for confirmation
await connection.confirmTransaction(signature);
// 4. Log the transaction
await fetch(`${API_BASE}/api/v1/confirm`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
body: JSON.stringify({
walletAddress,
signature,
accountsClosed: txData.accountsInTx,
solRecovered: txData.accountsInTx * 0.00203928
})
});
}
console.log('Recovery complete!');
}
// Usage
recoverSOL('your_wallet_address', 'your_private_key');
No setup fees. No monthly fees. You only pay when you earn.
to get started
Contact us on Telegram to get your API key