Setup
- In the Merchant Portal, open Developers → Webhooks and add an endpoint URL (HTTPS required, publicly reachable).
- Select the events you want to receive (or all of them).
- Copy the endpoint’s signing secret (
whsec_...). You will use it to verify that events really come from Flowlix.
Events
Event payload
Every delivery is aPOST with a JSON envelope; data contains the full
current object exactly as GET /v1/payments/{id} would return it:
data.refund (and data.refund.payment_id links back to
the payment).
Verifying signatures
Every delivery includes aFlowlix-Signature header:
- Split the header into
t(Unix timestamp) andv1(hex signature). - Compute
HMAC-SHA256(signing_secret, "{t}.{raw_request_body}"). - Compare your result to
v1with a constant-time comparison. - Reject the event if the signature does not match or
tis more than 5 minutes old (replay protection).
Delivery semantics
- Respond fast with
2xx. Acknowledge within 10 seconds — persist the event and process it asynchronously if your handling is slow. Any non-2xx response (or a timeout) counts as a failed delivery. - Retries. Failed deliveries are retried with exponential backoff for up to 24 hours. After that the delivery is marked failed; you can inspect and replay deliveries from the Merchant Portal.
- At-least-once. The same event can be delivered more than once. Make your
handler idempotent — deduplicate by the event
id. - Ordering is not guaranteed. Events may arrive out of order. Don’t apply
state from the event blindly; either rely on the full object in
data(which is always the current state at delivery time) or re-fetch viaGET /v1/payments/{id}.
Recommended handler skeleton
GET /v1/payments for payments that somehow missed an event (your
endpoint was down longer than the retry window, a network partition, etc.).