What you’ll build
- A transaction subscription for one or more wallets
- A webhook handler that parses incoming payloads
- Signature verification for every webhook
- Commands to list, update and delete subscriptions
For production use, get your callback URL whitelisted by messaging the team through the chat widget in the Dashboard. See Webhooks for plan limits and delivery guarantees.
Steps
1
Create a subscription
Subscribe one or more wallet addresses with create subscription.
chain_idsis optional. Omit it to subscribe to all supported chains.- Save the subscription
idfrom the response. You need it to manage the subscription later.
2
Receive and verify webhooks
When a watched wallet makes a transaction, Zerion API sends a POST request to your callback URL. This Express handler verifies the signature, then reads the notification and the transactions it contains.How the signature check works:
Express.js
- Each webhook carries three headers:
x-timestamp,x-signatureandx-certificate-url. - The signed message is
`${timestamp}\n${rawBody}\n`. Use the raw request body, notJSON.stringify(req.body). - Verify it with
crypto.createVerify("SHA256")and the certificate’s public key. Cache certificates so you don’t download one on every request.
3
Manage your subscriptions
Next steps
- Use
chain_idsto focus on specific chains and reduce noise. - Forward alerts to Slack, Discord, email or push notifications.
- Combine with the transaction history recipe to fetch full details, including prices, for notified transactions.