Grain sends webhook notifications to your server when key events occur during the hedge and wallet lifecycle. Instead of polling the API for status changes, your application receives real-time HTTP POST requests with event details — enabling you to automate settlement tracking, trigger internal workflows, and keep your systems in sync.Documentation Index
Fetch the complete documentation index at: https://docs.grainfinance.co/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Configure webhooks from Dashboard → Developer → Webhooks. Each environment (Sandbox and Live) has its own configuration.- Navigate to Developer → Webhooks in the Grain Dashboard.
- Enter your Webhooks URL — the HTTPS endpoint where Grain will send event notifications.
-
Copy your Webhook Secret — displayed in the dashboard as “Verification Token” (prefixed with
whl_live_orwhl_sandbox_). This secret is used to compute HMAC signatures for verifying webhook authenticity — see Signature Verification. - Toggle Webhooks Active to start receiving events.
Requirements
- Your endpoint must accept HTTP POST requests with a JSON body.
- Respond with a 2xx status code within 5 seconds to acknowledge receipt. Any other response (or a timeout) is treated as a delivery failure.
-
Failed deliveries are retried using an exponential backoff schedule. Use the
eventIdfield to deduplicate redelivered events.