Server SDK
Didit Java SDK for identity verification
Create sessions, read decisions and verify webhooks from your Java or Kotlin server. One dependency from Maven Central.
implementation("me.didit:didit-java:1.18.0")
Integrate Didit in Your App: API, SDK and Webhooks (Developer Guide) · 8 min · YouTube
Install
Install and set your key
Add the dependency, then set one environment variable.
Environment variables
DIDIT_API_KEYNeeded for every call.DIDIT_ORGANIZATION_IDNeeded for calls scoped to an organization, such as cases, networks and regulatory reports.DIDIT_APPLICATION_IDNeeded for the same calls, to pick the application.new Didit() reads DIDIT_API_KEY on its own. Use the builder only to override it. Keep the key on your server.
// Gradleimplementation("me.didit:didit-java:1.18.0")<!-- Maven --><dependency> <groupId>me.didit</groupId> <artifactId>didit-java</artifactId> <version>1.18.0</version></dependency>
Create a session
Create a session
A session is one run of your checks for one person. One call returns the URL to send your user to.
What you send
workflow_idThe workflow to run. A workflow is the set of checks a session runs.vendor_dataYour own user ID. Didit returns it with every result.callbackThe page Didit sends the user to after the flow.What you get back
session.url()https://verify.didit.me/session/3FaJ9wLqX2MzSend your user hereOpen the URL on the web. The response also carries a session token for the native SDKs.
import me.didit.Didit;import me.didit.types.SessionsCreateParams;Didit client = new Didit();var session = client.sessions().create(SessionsCreateParams.builder() .workflowId("11111111-2222-3333-4444-555555555555") .vendorData("user-123") .callback("https://example.com/verification/done") .build());System.out.println(session.url());
Webhook
Verify the webhook
A webhook is a message Didit sends to your server when a result is ready. One call checks that it is real.
Webhooks.verify throws WebhookVerificationException for anything that is not a valid, fresh delivery.SessionStatusUpdatedEvent.@RequestBody byte[] body and the headers as @RequestHeader Map<String, String> headers.VerifyOptions.import java.util.Map;import me.didit.errors.WebhookVerificationException;import me.didit.webhooks.SessionStatusUpdatedEvent;import me.didit.webhooks.WebhookEvent;import me.didit.webhooks.Webhooks;public class DiditWebhookHandler { private final String secret = System.getenv("DIDIT_WEBHOOK_SECRET"); public int handle(byte[] rawBody, Map<String, String> headers) { WebhookEvent event; try { event = Webhooks.verify(rawBody, headers, secret); } catch (WebhookVerificationException e) { System.out.println("rejected: " + e.reason()); return 400; } if (event instanceof SessionStatusUpdatedEvent) { SessionStatusUpdatedEvent updated = (SessionStatusUpdatedEvent) event; System.out.println(updated.sessionId().orElse("") + " " + updated.status().orElse("")); } return 200; }}
Requirements
What you need
Six facts about the SDK.
me.didit:didit-java on Maven Central....Async variant that returns a CompletableFuture.Optional values. In Kotlin, read them with .getOrNull().build() checks the required fields.java.net.http, Jackson and the JSpecify nullness annotations.Questions
Questions about the Java SDK
Which Java version does the SDK need?
Does the Java SDK work with Kotlin?
Does the Java SDK support async calls?
How do I add the Didit Java SDK to my build?
How do I verify a webhook in Spring Boot?
How do I handle API errors in Java?
Does the Java SDK retry failed requests?
How does the Java SDK check required fields?
Which calls need the organization and application ids?
How are the Didit Java SDK versions numbered?
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.
- Trusted by EU regulators
After a year of supervised testing, EU financial regulators confirmed that verifying with Didit is safer than checking an ID in person.
- 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
Learn Didit, one short video at a time
Start
Install the SDK
Create an account, get your sandbox key and add the dependency.
Free sandbox. Credit applies to work-email sign-ups.