Skip to main content
This guide demonstrates how to integrate Snack Moneyโ€™s A2A (Agent-to-Agent) protocol with X402 extension for cryptocurrency payments.

Installation

Clone the example repository:

Configuration

Create a .env file with your configuration:

For Base Network

For Solana Network

Available Scripts

Discover Agent Capabilities

View Snack Moneyโ€™s A2A capabilities:
This displays:
  • Agent information and skills
  • Available payment methods
  • Input schemas and requirements
  • X402 extension support

Send Payment via Base

Send Payment via Solana

Implementation Examples

Base Network Payment

Solana Network Payment

Batch Payments

A2A also supports batch payments to multiple recipients:

Response Handling

Success Response

Error Response

Testing

Start with small amounts (0.01 USDC = 1ยข) to test the integration:

Supported Platforms

The A2A protocol supports payments to these platforms:
  • twitter - Twitter/X usernames
  • farcaster - Farcaster usernames
  • github - GitHub usernames
  • email - Email addresses
  • web - Web domains
  • instagram - Instagram usernames

Example Output

Complete Example Repository

The full working examples are available at: github.com/snack-money/snack-money/tree/main/snack-money-examples/a2a

Next Steps