Quick Start Guide
Get your first Neutron integration working in under 5 minutes. Choose the path that fits your stack.
Prerequisites
- Neutron account with API credentials (Sign up)
- Your API Key and API Secret from the dashboard
Path 1 — MCP (AI Agents & Claude) ⚡ Fastest
Add Bitcoin Lightning payments to any MCP-compatible AI tool in 2 minutes.
{
"mcpServers": {
"neutron": {
"command": "npx",
"args": ["-y", "neutron-mcp"],
"env": {
"NEUTRON_API_KEY": "your_api_key",
"NEUTRON_API_SECRET": "your_api_secret"
}
}
}
}Paste into your tool's MCP config, restart, then ask:
"Check my Neutron wallet balances"
That's it. Auth, token refresh, and retries are handled automatically.
| Tool | Config Location |
|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Code | ~/.claude.json or .mcp.json in your project |
| Cursor | .cursor/mcp.json |
| Windsurf | Windsurf MCP settings |
Path 2 — SDK (Node.js / TypeScript)
npm install neutron-sdkimport { Neutron } from "neutron-sdk";
const neutron = new Neutron({
apiKey: process.env.NEUTRON_API_KEY!,
apiSecret: process.env.NEUTRON_API_SECRET!,
});
// Check balances
const wallets = await neutron.account.wallets();
// Create a Lightning invoice
const invoice = await neutron.lightning.createInvoice({ amountSats: 10000 });
console.log(invoice.invoice); // "lnbc100u1p..."Auth is handled automatically — no HMAC code needed.
Path 3 — CLI (Terminal / Shell Scripts)
npm install -g neutron-cli
neutron-cli auth # one-time setup
neutron-cli balance # check wallets
neutron-cli send # send paymentsUse --json for scripting and AI agent environments:
neutron-cli balance --jsonPath 4 — REST API (Direct)
Authentication uses HMAC-SHA256 signature exchange. Full details in the Authentication Guide.
Step 1: Get an access token
API_KEY="your_api_key"
API_SECRET="your_api_secret"
PAYLOAD='{"test":"auth"}'
STRING_TO_SIGN="${API_KEY}&payload=${PAYLOAD}"
SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$API_SECRET" | cut -d' ' -f2)
curl -X POST https://api.neutron.me/api/v2/authentication/token-signature \
-H "Content-Type: application/json" \
-H "X-Api-Key: $API_KEY" \
-H "X-Api-Signature: $SIGNATURE" \
-d "$PAYLOAD"Response includes accessToken and accountId — save both.
Step 2: Make API calls
curl https://api.neutron.me/api/v2/account/YOUR_ACCOUNT_ID/wallet/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Step 3: Create a Lightning invoice
curl -X POST https://api.neutron.me/api/v2/transaction/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"sourceReq": {"ccy": "BTC", "method": "lightning", "reqDetails": {}},
"destReq": {"ccy": "BTC", "method": "neutronpay", "amtRequested": 0.0001, "reqDetails": {}}
}'Step 4: Confirm the transaction
curl -X PUT https://api.neutron.me/api/v2/transaction/TXN_ID/confirm \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Key concepts: Amounts are in BTC (
0.0001= 10,000 sats). Transactions are two-step: Create → Confirm. Set amount on source OR destination, not both.
Next Steps
- Authentication Guide — HMAC signature in Node.js, Python, Go, Java, C#
- Receive Lightning Payments
- Send Lightning Payments
- Webhooks — Real-time payment notifications
Updated 30 days ago
