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 data object 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
dataobject — notevent,version, orsignitself - Encode
dataas JSON with no unicode escaping and no slash escaping (equivalent to PHP’sJSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) - Always use constant-time comparison when checking the result — never
===or==
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
reference or another unique field 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.Re-serialize data carefully
When recomputing the signature, re-serialize the
data object from the parsed JSON — don’t use the raw body substring. Use the same encoding settings as the examples above.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:

