Installation
This guide will walk you through installing x402 Pocket Nodes in your n8n instance.
Prerequisites
Section titled “Prerequisites”Before installing x402 Pocket Nodes, make sure you have:
- n8n: Self-hosted or cloud instance
- Access: Admin access to install community nodes
Option 1: Install via n8n UI (Recommended)
Section titled “Option 1: Install via n8n UI (Recommended)”This is the easiest way to install x402 Pocket Nodes.
Step 1: Open Community Nodes Settings
Section titled “Step 1: Open Community Nodes Settings”- Open your n8n instance
- Click on Settings in the sidebar
- Navigate to Community Nodes
Step 2: Install the Package
Section titled “Step 2: Install the Package”- Click Install a community node
- Enter the package name:
@blockchain-hq/n8n-nodes-x402-pocket
- Click Install
- Wait for the installation to complete
Step 3: Restart n8n
Section titled “Step 3: Restart n8n”Restart your n8n instance to load the new nodes:
# If using systemdsudo systemctl restart n8n
# If using Dockerdocker restart n8n
# If using pm2pm2 restart n8nStep 4: Verify Installation
Section titled “Step 4: Verify Installation”- Create a new workflow
- Click the + button to add a node
- Search for “x402”
- You should see three nodes:
- x402 Wallet Manager
- x402 Client
- x402 Mock Server
Option 2: Manual Installation
Section titled “Option 2: Manual Installation”For self-hosted n8n instances, you can install manually.
Install via npm
Section titled “Install via npm”cd ~/.n8n/nodesnpm install @blockchain-hq/n8n-nodes-x402-pocketInstall via pnpm
Section titled “Install via pnpm”cd ~/.n8n/nodespnpm add @blockchain-hq/n8n-nodes-x402-pocketRestart n8n
Section titled “Restart n8n”After installation, restart your n8n instance:
# Restart your n8n processpm2 restart n8n# orsystemctl restart n8n# or restart your Docker containerThe Three Nodes
Section titled “The Three Nodes”After installation, you’ll have access to these nodes:
x402 Wallet Manager
Section titled “x402 Wallet Manager”Generate and manage Solana wallets for payments.
Use for:
- Initial wallet setup
- Checking balances
- Providing wallet to Client nodes
x402 Client
Section titled “x402 Client”Make HTTP requests to x402-enabled APIs with automatic payment.
Use for:
- Calling paid APIs
- Automatic payment handling
- Integration with existing workflows
x402 Mock Server
Section titled “x402 Mock Server”Test x402 integration without real transactions.
Use for:
- Development and testing
- Learning the protocol
- Validating workflows before production
Troubleshooting
Section titled “Troubleshooting”Nodes Not Appearing
Section titled “Nodes Not Appearing”If the nodes don’t appear after installation:
-
Check installation status:
- Go to Settings → Community Nodes
- Verify the package is listed as installed
-
Restart n8n completely:
Terminal window # Stop n8npm2 stop n8n# Start n8npm2 start n8n -
Check n8n logs:
Terminal window # View logspm2 logs n8n# orjournalctl -u n8n -f
Installation Failed
Section titled “Installation Failed”If installation fails:
- Check n8n version: Requires n8n v1.0.0 or higher
- Check permissions: Ensure n8n has write access to
~/.n8n/nodes - Check network: Ensure your server can access npm registry
- Try manual installation: Use the manual method above
Permission Denied
Section titled “Permission Denied”If you get permission errors:
# Fix permissionssudo chown -R $USER:$USER ~/.n8n/nodesVerifying Installation
Section titled “Verifying Installation”Create a test workflow to verify everything works:
- Create new workflow
- Add Manual Trigger node
- Add x402 Wallet Manager node
- Set Network to “Devnet”
- Set Action to “Get Wallet Info”
- Execute the workflow
If you see wallet information in the output, the installation was successful!
Next Steps
Section titled “Next Steps”Now that you have x402 Pocket Nodes installed:
- Quick Start - Create your first workflow
- Wallet Setup - Fund your wallet
- Basic Payment Example - Make your first payment