Setup Guide
Integrate Pulse into your x402 endpoint in under 2 minutes. Works on Base, Stellar, and Solana mainnet — automatically.
Your API Key
Connect your wallet to get your kv_live_ API key.
kv_live_your_key_hereMiddleware Integration
RecommendedInstall
npm install @kyvernlabs/pulseAlready using @x402/next or another x402 framework? Pulse wraps it without changing anything.
Wrap your handler
import { withX402 } from '@x402/next'
import { withPulse } from '@kyvernlabs/pulse'
// Your x402 handler — Pulse captures every payment
const x402Handler = withX402(handler, {
accepts: { scheme: 'exact', price: '$0.01',
network: 'eip155:8453', payTo: '0x...' }
}, server)
// One line — that's the entire integration
export const GET = withPulse(x402Handler, {
apiKey: 'kv_live_your_key_here'
})Pulse reads the payment-signature and payment-response headers and captures every successful x402 payment to your dashboard. Fire-and-forget — zero impact on your endpoint latency.
Deploy & see your revenue
Deploy your endpoint. As soon as an agent pays, the transaction shows up in your dashboard — with the real on-chain hash, payer address, and a link to verify on the block explorer. No polling, no manual config.
Framework & chain examples
Pick your stack. Pulse works with all of them — no extra configuration per chain.
// app/api/my-service/route.ts
import { withX402 } from '@x402/next'
import { withPulse } from '@kyvernlabs/pulse'
const handler = async (req) => {
return Response.json({ data: "premium content" })
}
const x402Handler = withX402(handler, {
accepts: {
scheme: 'exact',
price: '$0.01',
network: 'eip155:8453', // Base mainnet
payTo: '0xYOUR_WALLET'
}
}, server)
export const GET = withPulse(x402Handler, {
apiKey: 'kv_live_your_key_here'
})Supported Networks
Pulse auto-detects the network from your x402 payment headers and stores it as a CAIP-2 chain ID. Use these values when sending events directly to the ingest API.
| Network | Chain ID | Explorer |
|---|---|---|
Base Mainnet USDC • 0x... | eip155:8453 | basescan.org |
Stellar Mainnet USDC / XLM • G... | stellar:pubnet | stellar.expert |
Stellar Testnet USDC / XLM • G... | stellar:testnet | stellar.expert/testnet |
Solana Mainnet USDC / SOL • base58 | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | solscan.io |
Solana Devnet USDC / SOL • base58 | solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 | solscan.io?cluster=devnet |
MCP Server — for AI Agents
17 toolsLet AI agents (Claude, GPT, Cursor) query your x402 analytics directly. The MCP server exposes your Pulse data as tools any LLM can call.
Install globally
npm install -g @kyvernlabs/mcpAdd to Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"kyvernlabs-pulse": {
"command": "npx",
"args": ["@kyvernlabs/mcp"],
"env": {
"KYVERNLABS_API_KEY": "kv_live_your_key_here"
}
}
}
}Available tools
| Tool | Description |
|---|---|
| pulse_get_stats | Revenue, calls, customers with deltas |
| pulse_get_endpoints | Per-endpoint revenue and latency |
| pulse_get_customers | Top paying agent wallets |
| pulse_get_transactions | Recent payments with tx hashes |
| pulse_get_timeseries | Revenue over time for charting |
| pulse_ingest_event | Record an x402 payment event |
Example prompts
“What's my x402 revenue this week?”
“Which endpoints are making the most money?”
“Show me my top 5 paying agents”
“How many verified payments did I get today?”
Direct API
Send events directly to the Pulse ingest API from any language or framework. Use this if you're not using the npm middleware — for example, from a Python service, a Rust worker, or a Solana program.
curl -X POST https://kyvernlabs.com/api/pulse/ingest \
-H "Content-Type: application/json" \
-H "X-API-Key: kv_live_your_key_here" \
-d '{
"endpoint": "/api/your-service",
"amount_usd": 0.01,
"payer_address": "0x...",
"tx_hash": "0x...",
"network": "eip155:8453",
"asset": "USDC",
"status": "success"
}'What Pulse tracks per transaction
Endpoint path
Which API was called
Payment amount
USD value of x402 payment
Payer address
Agent wallet that paid
Response latency
Time to process the request
Tx hash
Blockchain proof, links to explorer
Network
Auto-detected from x402 headers
