- Create a transaction subscription for one or more wallets
- Handle and parse incoming webhook payloads
- Verify webhook signatures for security
- Manage (list, update, delete) your subscriptions
Prerequisites
- A Zerion API key (get one here)
- A publicly accessible callback URL to receive webhook notifications (you can use webhook.site for testing)
For production use, contact api@zerion.io to whitelist your callback URL. See Webhooks for plan limits and delivery guarantees.
Steps
1
Create a subscription
Subscribe to transactions for one or more wallet addresses using the create subscription endpoint.
chain_idsis optional. Omit it to subscribe to all supported chains- Save the subscription
idfrom the response for management later
2
Handle incoming webhooks
When a transaction occurs, Zerion sends a POST request to your callback URL. Here’s what the payload looks like and how to process it.
Express.js
3
Verify webhook signatures
The Express handler above already includes full signature verification. The key points:
- Each webhook includes three headers:
x-timestamp,x-signature, andx-certificate-url - Build the signed message as
`${timestamp}\n${rawBody}\n`. Use the raw request body, notJSON.stringify(req.body) - Verify using
crypto.createVerify("SHA256")with the certificate’s public key - Cache fetched certificates to avoid re-downloading on every request
4
Manage your subscription
List, update, or delete subscriptions as needed: list subscriptions, update wallets, or delete a subscription.
Important notes
See Delivery guarantees and Subscription limits on the Webhooks reference page.Next steps
- Combine with the transaction history recipe to fetch full details (including prices) for flagged transactions
- Use
chain_idsto focus on specific chains and reduce noise - Build a notification service that forwards alerts to Slack, Discord, email, or push notifications