Skip to main content
This guide will walk you through sending your first USDC payment using the Snack Money CLI in just a few minutes.

Prerequisites

Before you begin, ensure you have:
  • Node.js 20+ installed (Download)
  • USDC balance on Base or Solana network
  • Private key for your wallet

Step 1: Set Your Private Key

The CLI needs your private key to sign transactions. Set it as an environment variable:

For Base Network (EVM)

export EVM_PRIVATE_KEY="0x..."

For Solana Network (SVM)

export SVM_PRIVATE_KEY="your_base58_private_key"
Security Note: Never commit your private key to version control. Use environment variables or a .env file.

Using a .env File (Optional)

Create a .env file in your project directory:
# .env
EVM_PRIVATE_KEY=0x1234567890abcdef...
The CLI will automatically load it.

Step 2: Send Your First Payment

Now you’re ready to send USDC! Use the send command:

Send to an X (Twitter) User

npx snackmoney send x/aeyakovenko

Send to a Farcaster User

npx snackmoney send farcaster/toly $0.5

Send to a GitHub User

npx snackmoney send github/octocat 0.01

Send to an Email Address

npx snackmoney send email/[email protected] $0.25

Send to a Web Domain

npx snackmoney send web/snack.money 0.5

Step 3: Review the Output

After running the command, you’ll see:
🚀 Sending payment...
✅ Payment successful!

📊 Transaction Details:
   Amount: 0.01 USDC
   Receiver: @username
   Platform: X (Twitter)
   Network: Base

🧾 Receipt: https://snack.money/x/username?txn=...
Click the receipt link to view your payment on Snack Money.

Understanding the Command

The basic syntax for sending a payment is:
npx snackmoney send <platform/username> <amount>

Platform Formats

PlatformSupported FormatsExample
X (Twitter)x/, x.com/, twitter/, twitter.com/x/aeyakovenko
Farcasterfarcaster/, farcaster.xyz/farcaster/toly
GitHubgithub/, github.com/github/octocat
Emailemail/email/[email protected]
Webweb/web/snack.money

Amount Formats

You can specify amounts in multiple formats:
  • Cents: , 50¢, 99¢
  • Dollars: $0.01, $0.5, $1
  • Decimal: 0.01, 0.5, 1
All amounts are processed as USDC.

Specifying the Network

By default, the CLI auto-detects the network based on which private key you’ve set. You can explicitly specify the network with the --network flag:
# Force Base network
npx snackmoney send x/username 0.01 --network base

# Force Solana network
npx snackmoney send x/username 0.01 --network solana

Examples

Here are some practical examples:

Example 1: Tip a Tweet

npx snackmoney send x/0xmesuthere

Example 2: Support a Farcaster Creator

npx snackmoney send farcaster/mesut $1

Example 3: Thank an Open Source Developer

npx snackmoney send github/octocat 0.50

Next Steps

Now that you’ve sent your first payment, explore more features:

Send to Multiple Users

Use batch payments to send to multiple users at once:
npx snackmoney batch-send x/user1:1¢,user2:2¢,user3:3¢
Learn more about batch payments →

Use AI Agent

Describe payments in natural language:
npx snackmoney ai-agent --prompt "Send 1 USDC to @toly on Farcaster"
Learn more about AI agent →

Troubleshooting

”Insufficient USDC balance”

Ensure your wallet has enough USDC on the network you’re using. Check your balance:

”Invalid private key”

Make sure your private key is correctly formatted:
  • Base: Should start with 0x (66 characters total)
  • Solana: Base58 encoded string

”User not found”

The username may not exist on the specified platform. Verify:
  • The username is correct
  • The user has an account on the platform
  • You’re using the correct platform prefix

Additional Resources

Getting Help

Need help? Here are your options:
# View general help
npx snackmoney --help

# View help for a specific command
npx snackmoney send --help
npx snackmoney batch-send --help
Or visit our GitHub repository to:
  • Report issues
  • Request features
  • View examples
  • Contribute