Current integration model
Typical Cascade scenario:
- Backend calls
POST /otp/send. - User enters the code.
- Backend calls
POST /otp/verify. - The decision is made from
successin JSON.
This is enough for login, registration and operation confirmation.
Webhooks
Contact support about connecting webhooks. For a connected webhook, provide an HTTPS handler on your backend and store the issued secret there.
| Event | When it fires |
|---|---|
otp.sent |
The channel accepted the message. Device delivery confirmation appears separately where supported |
otp.verified |
The code was verified successfully |
otp.failed |
The send attempt failed |
Cascade makes a JSON POST request with id, event, created_at, company_id, and a data object. Use data.otp_log_id to match the event to the send request.
Check X-Webhook-Signature before parsing JSON. Compute the HMAC-SHA256 of the raw request body with the webhook secret, encode it as hex, and prepend sha256=. Compare the result with the header in constant time. X-Webhook-Event contains the event name. Return 2xx after processing.