Skip to main content
A webhook is Reval telling your server something happened: a cycle was charged, a charge failed, a customer paused or cancelled. It complements the API: you query the API, webhooks notify you. Everything is configured in Reval → Integrations → Webhooks.
Webhooks are best-effort with respect to the main flow: a dead endpoint never holds up a charge or an order. Reval queues the delivery, attempts it separately and retries on failure.

Setting up an endpoint

  1. In Reval → Integrations → Webhooks, paste your server’s URL (it must be https) and pick which events it subscribes to.
  2. Save. Reval generates a signing secret (whsec_…) for that endpoint: reveal it with “Show” and copy it to your server.
  3. Use “Send test”: your endpoint receives a test event and the admin shows the result (HTTP status or error).
You can have up to 10 endpoints per store, each with its own event list and its own secret. Pausing an endpoint stops sending to it without deleting its configuration or history; Delete removes both.
Payloads include the subscriber’s personal data (email, name, city). That is why only https URLs are accepted, and Reval refuses internal or private addresses (localhost, LAN IPs, hosts without a domain). The hostname is checked again at every delivery, after DNS resolution: if it starts pointing to a private address, the delivery is dropped with an error.

The events

The same 15 subscription events Reval sends to Klaviyo and Shopify Flow, with the same data, plus the 3 for abandoned checkouts and carts, which have no subscription yet and go only to Klaviyo and webhooks. Each delivery’s topic is subscription.<event>, checkout.<event> or cart.<event>:

The delivery

Each delivery is a POST to your URL with a JSON body and these headers:
data carries the same properties Klaviyo and Shopify Flow receive: customer identity, product, amounts (raw and formatted), plan, cycle number, dates, shipping address and portal links, plus each event’s own properties (reason, source, detail, held_product_names, merged_with_subscription_ids, etc.).

The data properties

The properties are the same for every event, plus each event’s own. They are snake_case; raw amounts are numbers and the _formatted ones are strings ready for an email. Labels (frequency_label, next_payment_date_label, reason, reason_text) follow the store’s configured language (Spanish or Portuguese); for conditions use the raw properties (status, frequency_type, source, ISO dates) and reason_key, which do not change with the language. Plus, depending on the event: Answer any 2xx as soon as you can, ideally before processing, and process in the background. Reval waits 10 seconds; after that it gives up and counts the attempt as failed. Redirects are not followed.

Verifying the signature

Each delivery is signed with the endpoint’s secret so you can confirm Reval sent it and it was not altered:
  • t is the send time in Unix seconds.
  • v1 is HMAC-SHA256(secret, "<t>.<raw body>") in hex.
Sign the raw body exactly as received (the bytes, not a re-serialized JSON), compare in constant time, and reject signatures more than 5 minutes off:
If you think the secret leaked, delete the endpoint and create a new one: it gets a new secret. Events already queued for the deleted endpoint are discarded.

Retries

If your server answers anything but 2xx, does not answer within 10 seconds or cannot be resolved, Reval retries with growing waits: After the seventh attempt the delivery is marked Failed. It is not lost: you see it in the log and can resend it once your server is back. Because retries keep the same X-Reval-Delivery, an endpoint that answered 2xx late (say, right after the timeout) can receive the same event twice. Store the id and drop duplicates.

Delivery log

Under each endpoint, “View deliveries” shows the last 50: event, date, attempt count, status (Pending, In progress, Delivered, Failed), HTTP status of the last response and the error if any. Each row has “Resend”, which sends exactly the same payload with the same id again.

FAQ

Are events from before the endpoint existed sent? No. An endpoint receives the events that happen while it exists and is active. For history there is the API. Can I receive only cancellations? Yes: when creating or editing the endpoint, tick only the events you care about. What happens if I pause the endpoint? Events that occur while it is paused are neither sent nor stored for it. Once resumed, it receives new ones. Can my endpoint be Zapier, Make or n8n? Yes, any public https URL works. Those tools usually answer 2xx immediately, which is exactly what Reval expects.