SDK helpers

Build public receive URLs and verify Cliodot-signed deliveries when a destination you own receives an outbound webhook.

Inbound (providers → Cliodot)#

Configured per endpoint via verify templates (stripe, paystack, cliodot, custom, none, …). Verification is performed by the Cliodot API.

Outbound (Cliodot → your URL)#

When Cliodot delivers to a destination you own, deliveries are signed with:

Text
X-Cliodot-Signature: t=<unix>,v1=<hmac-sha256-hex>

Signed payload: {timestamp}.{rawBody}

Verify outbound deliveries#

TypeScript
import { verifyCliodotWebhookSignature } from "cliodot";

const ok = verifyCliodotWebhookSignature({
  secret: process.env.WEBHOOK_DESTINATION_SECRET!,
  body: rawBodyString,
  signatureHeader: req.headers["x-cliodot-signature"],
});

Build a public URL#

TypeScript
import { buildWebhookReceiveUrl } from "cliodot";

const url = buildWebhookReceiveUrl({
  domain: "acme.example.com",
  appSlug: "payments",
  endpointSlug: "stripe",
});