Optimizing API Gateways for Didit Webhook Scalability and Security
Effectively managing webhooks from identity verification providers like Didit requires robust API Gateway strategies. This guide explores best practices for ensuring scalability, enhancing security through HMAC signature.

Contents
In this guide
Jump to the part you need.
Strategic API Gateway PlacementPosition your API Gateway as the central traffic controller for incoming Didit webhooks, enabling centralized security, rate limiting, and routing before notifications reach internal services.
Enhance Security with HMAC VerificationAlways implement HMAC signature verification for Didit webhooks using the provided
secret_shared_keyto guarantee authenticity and prevent tampering, a critical step for data integrity.Design for Scalability and ResilienceUtilize asynchronous processing, message queues, and auto-scaling within your webhook handling architecture to manage fluctuating loads and maintain high availability, crucial for real-time identity verification workflows.
Didit's Configurable Webhooks Simplify IntegrationDidit offers flexible webhook configuration, including payload versions (v3 recommended), URL updates, and secret key rotation, streamlining the process of building secure and scalable identity verification systems.
In today's fast-paced digital landscape, real-time communication between services is paramount. Webhooks have emerged as a powerful mechanism for event-driven architectures, allowing applications to receive instant notifications about important changes. For identity verification platforms like Didit, webhooks are essential for informing clients about the status of verification sessions, compliance updates, and other critical events. However, integrating and managing these webhooks effectively, especially at scale, presents unique challenges related to scalability, security, and reliability.
An API Gateway acts as a single entry point for all client requests, routing them to the appropriate backend services. When it comes to webhooks, an API Gateway can play a crucial role in optimizing their performance, enhancing their security, and simplifying their management. This article will delve into strategies for leveraging API Gateways to optimize Didit webhook scalability and security, ensuring your identity verification workflows are robust and efficient.
The Role of API Gateways in Webhook Management
An API Gateway sits in front of your backend services, acting as a reverse proxy that receives incoming requests and forwards them. For webhooks, the gateway can perform several vital functions:
- Centralized Security: It can enforce authentication, authorization, and validate incoming requests before they reach your internal systems. For Didit webhooks, this includes verifying the HMAC signature, a critical security measure.
- Traffic Management: API Gateways can handle rate limiting, throttling, and load balancing, preventing your backend services from being overwhelmed by a sudden surge of webhook notifications.
- Routing and Transformation: They can intelligently route webhook payloads to different internal services based on their content or type, and even transform payloads if necessary to match internal system requirements.
- Monitoring and Logging: Gateways provide a central point for logging all incoming webhook traffic, offering valuable insights into performance, errors, and potential security threats.
By centralizing these functions, an API Gateway reduces the burden on individual backend services, making your overall architecture more resilient and easier to manage.
Ensuring Webhook Security: HMAC Signature Verification
Security is non-negotiable when dealing with identity verification data. Didit employs HMAC (Hash-based Message Authentication Code) signatures to ensure the authenticity and integrity of its webhook notifications. This mechanism allows your application to verify that the webhook originated from Didit and that its content has not been tampered with in transit.
When Didit sends a webhook, it includes a signature in the request headers, generated using a shared secret key (secret_shared_key) and the webhook payload. Your API Gateway, or the service handling the webhook, must independently compute the HMAC signature using the same shared secret and the received payload. If the computed signature matches the one provided in the header, you can be confident of the webhook's legitimacy. If they don't match, the webhook should be rejected immediately.
Didit's API allows you to retrieve and rotate this secret_shared_key, providing an extra layer of security. Regularly rotating this key, especially if there's any suspicion of compromise, is a good security practice. The API also allows you to configure your webhook_url and webhook_version (v3 recommended for the latest features and security).
Designing for Scalability and Resilience
Identity verification often involves bursts of activity, meaning your webhook handling system must be designed to scale. An API Gateway can significantly contribute to this by:
- Load Balancing: Distributing incoming webhook requests across multiple instances of your backend services, ensuring no single service becomes a bottleneck.
- Rate Limiting: Protecting your backend from excessive requests. While Didit manages its outbound webhook rate, internal rate limits can prevent a cascading failure if an issue causes a flood of retries or unexpected traffic.
- Asynchronous Processing: Instead of processing webhooks synchronously, the API Gateway can quickly acknowledge receipt and then push the payload to a message queue (e.g., Kafka, RabbitMQ, SQS). This decouples the ingestion of webhooks from their processing, allowing your system to handle high volumes without dropping messages and improving overall responsiveness.
- Auto-scaling: Integrating your API Gateway with cloud auto-scaling features ensures that your webhook handling infrastructure can automatically adjust its capacity based on demand, providing elasticity and cost efficiency.
By implementing these strategies, you can build a highly scalable and resilient system that can reliably process Didit's real-time identity verification notifications, even during peak loads.
How Didit Helps
Didit is engineered to provide an AI-native, developer-first identity platform that simplifies integration and ensures robust security for your verification workflows. Our modular architecture means you can easily plug in identity checks, including our comprehensive ID Verification, Passive & Active Liveness, and AML Screening & Monitoring solutions, all designed to integrate seamlessly with your existing systems.
Didit's webhooks are a cornerstone of our real-time notification system. We provide clear documentation and API endpoints to manage your webhook configuration, including setting your webhook_url, choosing the webhook_version (v3 recommended), and rotating your secret_shared_key for HMAC verification. This flexibility allows businesses to tailor their webhook integration to their specific security and architectural requirements. Our commitment to enterprise-grade security, including ISO 27001 certification and GDPR compliance, ensures that all data transmitted, including via webhooks, adheres to the highest standards.
Furthermore, Didit offers Core KYC with pay-per-use pricing, so businesses can start verifying identities without upfront costs, which reflects our commitment to value. Our AI-native approach ensures that our systems are continuously learning and adapting, providing cutting-edge fraud prevention and accurate verification results. By leveraging Didit's configurable webhooks and robust security features, you can build an identity verification system that is both scalable and secure, minimizing manual review and maximizing automation.
Ready to Get Started?
Ready to see Didit in action? Get a free demo today.
Start verifying identities for free with Didit's free tier.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alejandro Rosas
Co-founder and CTO

Questions
Blog questions
Who writes the Didit blog?
Which topics does the blog cover?
Is the blog available in my language?
Where do I find product updates?
Are these posts legal advice?
How do I find posts on one topic?
Are posts dated?
Do posts link to the docs?
Is the blog the same as the docs?
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


