Webhooks

A webhook is an HTTP POST that Prembly sends to your server when something finishes: a user completes an SDK session, a workflow run ends, a transaction is screened, an analyst releases a held payment. Your server doesn't have to keep asking whether the result is ready; Prembly tells it.

Use webhooks when a result arrives later than the request that started it. That covers SDK and workflow sessions (the user finishes in their own time), async verifications, transaction monitoring reviews, watchlist alerts and credit decisions. For a direct API verification you already get the result in the response, and the webhook is a copy you can use to keep a second system in step.

In this section


Set up your endpoint

1. Build a route that accepts POST requests

Your endpoint must:

  • be reachable from the public internet over HTTPS;
  • accept a JSON body;
  • reply 200 OK within 10 seconds.

Reply 200 exactly. Most deliveries treat any other status, including 201, 202 and 204, as a failure. See Respond, retries and duplicates.

2. Add the URL in the dashboard

Go to Developers → API Integrations (/dashboard/integrations). In the Webhook Configuration card, enter your URL in Endpoint URL and click Save Configuration.

This is your organisation's webhook URL. Every event below goes to it unless a more specific URL is set (see the next step).

One URL for live and sandbox

Your organisation has a single webhook URL. Sandbox and live events arrive at the same endpoint. Most payloads tell you which environment they came from (for example is_sandbox on transaction monitoring events); see the event reference. If you want them separated, point the URL at a router that inspects the payload, or use a separate workflow URL for test workflows.

3. (Optional) Send some events somewhere else

Two products let you override the organisation URL:

ProductWhere to set itRules
WorkflowsIn the workflow builder, open Customise widget → Webhook & redirect, enter Webhook URL, and click Save URLs.Must start with https://. Must not contain a username or password. Leave it empty to use the organisation URL.
Transaction monitoring escalationsIn an escalation rule, choose the Webhook alert channel and enter Webhook URL.Used only for transaction.escalated. Other transaction monitoring events still go to the organisation URL.

4. Test in sandbox

Switch the dashboard to Sandbox Mode, run a verification or an SDK session with your sandbox keys, and watch the request arrive. Then check it in Webhook Logs (see Delivery logs and resending).


What a delivery looks like

Every webhook is an HTTP POST with a JSON body.

POST /webhooks/prembly HTTP/1.1
Host: api.yourcompany.com
Content-Type: application/json
User-Agent: Prembly-Webhook/1.0
X-Prembly-Signature: 3q2+7wQhF3y0x0k1mJYc9mN0bH8sQ6m3n0r1yZk2bWs=
prembly-reference: 7d8f2c1e-4b6a-4f0e-9a3c-2e5d1b8c9f00
token: 7d8f2c1e-4b6a-4f0e-9a3c-2e5d1b8c9f00

{"status":"success","detail":"verification completed","response_code":"00","data":{...}}

Headers

HeaderDescription
Content-TypeAlways application/json.
User-AgentAlways Prembly-Webhook/1.0.
X-Prembly-SignatureBase64-encoded HMAC-SHA256 of the raw body. See Verify that a request came from Prembly.
prembly-referencePrembly's reference for the thing this event is about: an SDK session, a workflow run number, a transaction ID, a credit application ID and so on. It stays the same when Prembly retries or you resend the delivery.
tokenSame value as prembly-reference. Kept for older integrations; use prembly-reference.

HTTP header names are case-insensitive, so read the signature as x-prembly-signature if your framework lower-cases headers.

Body

The body is compact JSON (no spaces after : or ,) encoded as UTF-8. Prembly signs these exact bytes, so read the raw body before any JSON parser touches it. If you parse it and serialise it again, the signature won't match.

Each product sends its own payload shape. The Event reference lists every event and shows how to tell them apart.


Next steps