This setup is intended for local development and testing. For production deployments, replace ngrok with your own publicly accessible server and use environment-specific secrets.
Prerequisites
- Node.js or Bun installed
- ngrok installed (to expose your local server)
- A Wavy Node account with a project created
- An API key from your project
Organization compliance data
Before anything else, configure your organization’s compliance data in the dashboard. Navigate to Management → Organization in the sidebar and fill in the Compliance Data section:- Platform domain — Your platform’s domain. It’s auto-formatted to uppercase (e.g.,
wavynode.com→WAVYNODE). - Tax IDs — The tax identifier for each country where you have active legislation:
| Country | Field | Example |
|---|---|---|
| Mexico (MX) | RFC | XAXX010101000 |
| Colombia (CO) | NIT | 900123456-7 |
| El Salvador (SV) | NIT | 0614-123456-001-0 |
| Guatemala (GT) | NIT | 1234567-8 |
Step 1: Clone and install
You can also use
npm install if you prefer Node.js over Bun.Step 2: Configure environment variables
Copy the template and edit:.env file needs these values:
.env
Generate the SECRET
The SECRET is a 32-character hex string used to sign requests between Wavy Node and your integration. Generate one with:
615d9b7ea991acfa33f823c374c3a062. Save this value — you’ll also need to configure it in the Wavy Node dashboard.
Get your API key
Find your API key in the Wavy Node dashboard under your project’s API Keys section. The format isApiKey wavy_....
Step 3: Implement your endpoints
The template includes two endpoints you need to customize:GET /users/{userId}
Wavy Node calls this endpoint to get user data for compliance reports. Return a JSON object with the user’s information:
The
mexico object is required only if you have Mexican legislation active in your project. See Endpoints for the full response schema.POST /webhook
Wavy Node sends real-time notifications when suspicious activity is detected. The template already handles signature verification — you just need to add your business logic:
Step 4: Start the server
http://localhost:3001.
Step 5: Expose with ngrok
In a separate terminal:https://abc123.ngrok-free.dev.
Step 6: Configure your project in Wavy Node
Update your project with the integration URL and secret. In the dashboard, go to Settings → Integración and fill in:- Integration URL — Your ngrok public URL (e.g.,
https://abc123.ngrok-free.dev) - Integration Secret — The same 32-character secret from your
.envfile
Step 7: Register addresses
Register the wallet addresses you want to monitor, linking them to users in your system:foreign_user_id is the user’s ID in your system. When Wavy Node needs data for this user, it calls GET /users/user-123 on your integration.
Step 8: Test the integration
The template includes a test script that simulates the calls Wavy Node makes to your server. With the server running and ngrok active:GET /users/user-123— verifies your user data endpoint responds correctly with a valid HMAC signaturePOST /webhook— sends a simulated notification with a sample transaction and inflicted laws- Invalid signature — sends a request with a fake signature to verify your middleware rejects it with 401
Compliance reports
Once your integration is running, compliance reports are generated automatically. Here’s how the report lifecycle works:For Mexican legislation, reports are generated when a user’s monthly transaction total exceeds 210 UMAs (~$24,635 MXN). The threshold is updated automatically based on the current UMA value.
Next steps
Authentication
Understand how HMAC signature verification works.
Endpoints
Full reference for the user data and webhook endpoints.