Skip to main content

Webhooks Setup Guide

Overview

Webhooks let eFICA notify your system in real time when key events occur — for example, when an application status changes or a document is uploaded.

This guide covers:

  • Planning and implementing a receiver endpoint
  • Verifying payload authenticity (HMAC-SHA256)
  • Registering a subscription in eFICA
  • Managing subscriptions and rotating secrets
  • Handling retries and duplicate deliveries

Step 1 — Plan your endpoint

Your endpoint must be a publicly reachable HTTPS URL that your system controls, for example:

https://api.yourcompany.com/efica/webhooks

It must:

  • Accept POST requests with a Content-Type: application/json body
  • Respond with a 2xx status within 10 seconds
  • Return the same 2xx for duplicates (idempotent processing)

Recommended pattern: acknowledge immediately with 200 OK, then process the payload asynchronously via a queue or background job. This keeps your response time well within the timeout and avoids failed deliveries caused by slow downstream processing.


Step 2 — Implement the receiver

A minimal receiver should:

  1. Verify the signature before touching the payload (see Step 3)
  2. Deduplicate using X-Efica-Event-Id as an idempotency key
  3. Enqueue the payload for background processing
  4. Return 200 OK immediately

If signature verification fails, return 401 and discard the request.


Step 3 — Verify the signature

Every delivery is signed with HMAC-SHA256 using your webhook secret. Always verify before processing.

Request headers

HeaderDescription
X-Efica-Signaturet=<unixSeconds>,v1=<hexHmac>
X-Efica-Event-IdUnique identifier for this event
X-Efica-Event-TypeThe event type string, e.g. entity.updated
User-Agentefica-webhooks/2.0

Verification steps

  1. Split X-Efica-Signature on , to extract t and v1.
  2. Reject if t differs from current Unix time by more than 300 seconds — this prevents replay attacks.
  3. Construct the signed string using the raw request body exactly as received:
signedPayload = "<t>.<rawBody>"
  1. Compute HMAC-SHA256(secret, signedPayload) and hex-encode it.
  2. Compare your result to v1 using a constant-time comparison.

Do not parse and re-serialise the JSON body before verifying — any whitespace difference will cause the check to fail. Always use the raw body bytes.

Example — Node.js

const crypto = require('crypto');

function verifyWebhook(secret, rawBody, signatureHeader) {
const [tPart, v1Part] = signatureHeader.split(',');
const t = tPart.replace('t=', '');
const v1 = v1Part.replace('v1=', '');

const ageSeconds = Math.abs(Date.now() / 1000 - Number(t));
if (ageSeconds > 300) {
throw new Error('Timestamp too old — possible replay attack');
}

const expected = crypto
.createHmac('sha256', secret)
.update(`${t}.${rawBody}`)
.digest('hex');

const valid = crypto.timingSafeEqual(
Buffer.from(expected, 'hex'),
Buffer.from(v1, 'hex')
);

if (!valid) throw new Error('Invalid signature');
}

Step 4 — Choose your event subscriptions

Subscribe only to the events your system needs to act on.

Individual

EventFires when
individual.createdA new FICA individual record is created
individual.updatedAny field on an individual record is updated

Entity

EventFires when
entity.createdA new FICA entity record is created
entity.updatedAny field on an entity record is updated
entity.document.createdA document is uploaded to an entity application
entity.document.deletedA document is removed from an entity application
entity.trust.createdA trust is added to an entity organigram
entity.trust.updatedA trust record on an entity organigram is updated

UBO

EventFires when
ubo.createdA UBO (director, member, etc.) is added to an entity application
ubo.updatedA UBO record is updated
ubo.document.createdA document is uploaded for a UBO
ubo.document.deletedA document is removed for a UBO

Step 5 — Register the subscription in eFICA

Step 1 — Open webhook settings

Open webhooks integration options

  1. Click on eFICA Settings menu option.
  2. Open the Integrations dropdown menu and select Webhooks.
  3. Create a new subscription
  4. Edit, rotate secrets and delete existing webhooks.

Step 2 — Create a subscription

Create a webhook subscription

Enter your endpoint URL, give the subscription a name, and select the event types you want to receive.

Step 3 — Save your secret

Copy webhook secret

Your webhook secret is shown once only. Copy it immediately and store it securely — for example, as an environment variable or in your secrets manager. It cannot be retrieved again; if lost, you must rotate it.


Managing subscriptions

Once registered, each subscription can be managed from the webhooks dashboard:

ActionDescription
EditUpdate the subscription name, endpoint URL, or selected event types
Rotate secretGenerate a new signing secret — all deliveries signed with the previous secret will immediately fail verification
DeletePermanently removes the subscription and stops all deliveries — this cannot be undone

Before rotating a secret: update your receiver to use the new secret first, then rotate. Rotating before updating will cause delivery failures until your receiver is updated.


Retries and delivery guarantees

eFICA will retry delivery on any non-2xx response, connection timeout, or 5xx error.

AttemptDelay
1Immediate
21 minute
35 minutes
415 minutes
560 minutes
66 hours
724 hours

After 7 attempts the delivery is marked failed-final. Failed deliveries can be manually replayed from the eFICA dashboard.

Delivery is at-least-once — the same event may be delivered more than once during retries or manual replays. Always deduplicate on X-Efica-Event-Id.


Troubleshooting

SymptomWhat to check
No webhook receivedEndpoint is publicly reachable over HTTPS; firewall allows inbound POST; TLS certificate is valid
Signature verification failsRaw request body is being used (not re-serialised); correct secret is configured; timestamp skew is within 5 minutes
Unexpected retriesEndpoint is returning 2xx within 10 seconds; processing is not blocking the response
Duplicate eventsDeduplication logic is keying on X-Efica-Event-Id
Secret lostRotate the secret from the webhooks dashboard and update your receiver

Document history

VersionDateNotes
1.02026-05-26Initial release

Support

For technical support and questions:


This documentation is maintained by the eFICA development team. For updates and corrections, please contact your account manager.

Last Updated: 26 May 2026