This guide walks you through creating a subscription, adding a TRON address to watch, sending a test event, and verifying the signature on your end. By the end you will have a working end-to-end webhook pipeline with no on-chain activity required to test it.Documentation Index
Fetch the complete documentation index at: https://docs.offthehook.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
You need an Off the Hook API key. API keys are prefixed withoth_. Contact the Off the Hook team to provision your account.
Create a subscription
A subscription tells Off the Hook where to send events and which event types to deliver. Send a The response includes the subscription resource and a
POST request to /v1/subscriptions with your destination URL and the events you want to receive.secret field under destination:Add an address to watch
An empty subscription receives no events. Add a TRON address to your subscription’s address filter using a Each address entry includes a
PATCH request. Replace sub_2QkP9aB7xN... with the ID from the previous step.chainId using a CAIP-2 identifier. You can add addresses on multiple chains in a single request by including multiple objects in the add array.Send a test event
You do not need to wait for a real on-chain transfer to verify your endpoint is working. The Check your destination (for example, webhook.site) — you should see an incoming request within a few seconds. The payload will have
/test endpoint fires a service.ping event to your destination immediately."kind": "service.ping" and the same Standard Webhooks headers as a real transfer event, so you can use it to test your signature verification logic too.Verify the webhook signature
Every delivery Off the Hook sends is signed with HMAC-SHA256. You must verify the signature before trusting the payload. Off the Hook implements the Standard Webhooks spec, so the Svix verification library works without modification.Pass the raw request body (not parsed JSON) and the full request headers. The library checks the
webhook-signature, webhook-id, and webhook-timestamp headers. If verification fails, reject the request.For a complete example including replay attack prevention and deduplication, see Verify webhook signatures.Now that you have a working subscription, you can add more addresses across Mainnet, Nile, and Shasta, explore event history in the Events API, or browse the full API reference to manage subscriptions programmatically.