Documentation Index
Fetch the complete documentation index at: https://docs.fyatu.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Every webhook event Fyatu delivers includes asign field in the JSON body. This is an HMAC-SHA256 signature you must verify before processing the event.
sign is computed over the raw data value only — not the full envelope. Your endpoint must recompute the same HMAC and compare it against sign before trusting anything in the payload.
Your
webhookSecret is generated when you call POST /webhooks/secret/regenerate. It is shown once and never returned again. Store it securely in an environment variable — never in code or version control.Signature Algorithm
- Sign only the
datavalue — notevent,version,eventId, orsignitself - Use the exact bytes from the HTTP body for the
datavalue — do not parse and re-serialize it - Always use constant-time comparison — never
===or==
Test Your Implementation
Use these known-good values to verify your implementation before going live.| Field | Value |
|---|---|
| Webhook secret | 975127f2e7165836d99f54cf9c298da5b8bd43060bc0634e8cb3774e8bd6db4c |
Expected sign | c580cd5259a8d2289a22ca6f97af56ed5ebd8a7a783bf56636761ef9d59b1830 |
verifySignature function should return true when given this payload and secret. If it returns false, your implementation has a bug — the most common cause is re-serializing data instead of using the raw bytes.
Verification Examples
Best Practices
Respond quickly
Return
200 within 10 seconds. Acknowledge first and process asynchronously if needed. Fyatu retries timed-out deliveries.Make handlers idempotent
The same event may be delivered more than once. Use
eventId or reference to deduplicate — store processed event identifiers in your database.Use constant-time comparison
Always use timing-safe functions (
timingSafeEqual, hash_equals, hmac.Equal). Variable-time === comparisons are vulnerable to timing attacks.Never re-serialize through a map
Sign the raw
data bytes as received. Re-encoding through a dictionary can change key order, producing a different HMAC. The Go example uses json.RawMessage to avoid this.Retry Behavior
If your endpoint returns a non-2xx status or doesn’t respond within 10 seconds, Fyatu retries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
Rotating Your Secret
If yourwebhookSecret is compromised, regenerate it immediately:

