Skip to main content
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_ids is optional. Omit it to subscribe to all supported chains.
  • Save the subscription id from 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.
Express.js
How the signature check works:
  • Each webhook carries three headers: x-timestamp, x-signature and x-certificate-url.
  • The signed message is `${timestamp}\n${rawBody}\n`. Use the raw request body, not JSON.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.
Always validate the x-certificate-url domain before fetching. Ensure it points to a trusted Zerion domain to prevent SSRF attacks.
Transaction prices in webhook notifications are always null. To get USD values, fetch the full transaction using the wallet transactions endpoint after receiving the notification:
3

Manage your subscriptions

List subscriptions, change their wallets or delete one.

Next steps

  • Use chain_ids to 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.