Give a Telegram crypto bot a Solana USDC wallet
GuildPayBot is an existing Telegram crypto bot that needs user balances, premium command payments, contributor payouts, and a treasury wallet without managing Solana private keys.
What GuildPayBot integrates
Many Telegram crypto bots already have commands, users, and paid communities. The missing piece is a programmable wallet layer that can receive stablecoins, check balances, and send payouts.
With Viaclave, GuildPayBot can create one wallet per user, one treasury wallet for the bot, and one payout wallet for operators or contributors.
Why a Telegram bot needs its own wallet layer
Most Telegram crypto bots start as information tools. They post alerts, run commands, manage groups, or summarize markets. Eventually the operator wants to charge for premium commands, accept deposits, pay contributors, or split revenue with signal providers.
Without a wallet layer, every paid feature turns into operational work. Users send screenshots. Admins manually verify transactions. Contributors wait for batch payouts. A managed Solana wallet gives the bot a programmable financial backend while keeping private keys out of the Telegram process.
ROI for bot operators
A Telegram bot does not need thousands of paying users to justify payments. If a niche trading group has 50 users paying 10 USDC per month, that is 500 USDC of monthly revenue. If the bot pays 100 USDC to contributors and 50 USDC to data sources, the operator still has room to cover hosting and support.
The bigger gain is operational leverage. Automated deposits and payouts reduce the manual admin work that usually kills small paid communities. The bot can sell premium commands all day without waiting for a founder to verify each transaction.
Common Telegram bot payment features
- Charge USDC for premium commands.
- Accept deposits to unlock private groups.
- Pay contributors for moderation or research.
- Withdraw revenue to an external Solana treasury address.
- Show a user's stablecoin balance inside Telegram.
Minimal database tables
The bot database should track product access, not private keys. Viaclave stores and signs with the wallet. Your bot stores the mapping between Telegram users and Viaclave wallet IDs.
type BotWalletRecord = {
telegramUserId: string;
viaclaveWalletId: string;
role: "user" | "treasury" | "contributor";
accessTier: "free" | "pro" | "admin";
createdAt: string;
};Create a wallet during onboarding
async function onboardTelegramUser(telegramUserId: string) {
const response = await fetch("https://api.viaclave.com/v1/wallets", {
method: "POST",
headers: {
"Authorization": "Bearer vc_test_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
label: "guildpaybot-" + telegramUserId,
}),
});
const wallet = await response.json();
// Save wallet.wallet_id with the Telegram user in your database.
return wallet;
}Get a user's deposit address
Use this for /deposit, /premium, or /wallet commands. Show accepted stablecoins and remind users to send on Solana.
async function getDepositAddress(walletId: string) {
const response = await fetch(
"https://api.viaclave.com/v1/wallets/" + walletId + "/deposit-address",
{
headers: {
"Authorization": "Bearer vc_test_YOUR_KEY",
},
},
);
return response.json();
}Show wallet balances in chat
Balances make the bot feel real. A user should be able to type /balance and immediately see whether their deposit landed or whether they have enough funds for a premium command.
async function getTelegramBalance(walletId: string) {
const response = await fetch(
"https://api.viaclave.com/v1/wallets/" + walletId + "/balances",
{
headers: {
"Authorization": "Bearer vc_test_YOUR_KEY",
},
},
);
return response.json();
}Pay a contributor from the bot treasury
A Telegram community often has researchers, moderators, signal writers, or support helpers. Pay them from a treasury wallet with an idempotency key tied to the work item.
async function payContributor(contributorHandle: string, workItemId: string) {
const response = await fetch("https://api.viaclave.com/v1/payments/send", {
method: "POST",
headers: {
"Authorization": "Bearer vc_test_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
from_wallet_id: "wal_guildpay_treasury",
to_handle: contributorHandle,
amount: 1500000,
token: "USDC",
memo: "GuildPayBot contributor payout " + workItemId,
idempotency_key: "contributor-" + workItemId,
}),
});
return response.json();
}Commands to ship first
- /wallet to create or show the user's wallet.
- /deposit to show the Solana deposit address.
- /balance to show supported stablecoin balances.
- /premium to explain price and payment instructions.
- /payout for admin-only contributor payouts.
Production checklist
- Store Telegram user ID to wallet ID mappings in your bot database.
- Use test keys and devnet balances before enabling live wallets.
- Set daily and per-transaction limits on treasury wallets.
- Keep private Telegram group access separate from payment verification.
- Use idempotency keys for any payout command that can be retried.
Build this workflow in test mode
Create a test API key, connect the MCP server, or call the REST API directly. Viaclave's test mode lets you try wallet creation and test stablecoin payments without real funds.