Skip to main content

Technical

eID API integration guide: patterns, code and security

An eID API returns a signed answer about a person, not a credential. Register your return host, start a wallet verification, then trust it only when outcome is verified and simulated is false.

eID API integration guide: patterns, code and security

Contents

In this guide

Jump to the part you need.

This guide is for engineers adding national eIDs to onboarding. It covers the five interaction patterns an eID API can use, the exact Didit wallet calls with a runnable example from our docs, the result you should expect, and the failures worth planning for. Prices run from $0.10 to $0.95 per completed wallet verification. The main caveat: a successful start call means authentication began, not that the person is verified.

Prices checked against the live Didit price feed on November 26, 2026.

The integration at a glance

Selected digital ID wallets: a non-exhaustive list of entries available in the live Didit price feed on November 26, 2026, with list prices
WalletCountriesUSD per completed verificationLive-feed status
MitID personalDenmark$0.25Available
BankID SwedenSweden$0.20Available
iDIN full identificationNetherlands$0.95Available
Finnish Trust NetworkFinland$0.25Available
Smart-IDEstonia, Latvia, Lithuania, Belgium$0.21Available
Mobile-IDEstonia, Lithuania$0.21Available
BankID Norway HighNorway$0.35Available
Personalausweis Profile 2Germany$0.49Available
Bank iDCzechia$0.20Available
Google WalletUnited States, United Kingdom, Brazil, Singapore, Taiwan$0.10Available

Availability is specific to your environment: the console uses its environment's live capability catalog when you save a workflow, and a wallet marked coming soon cannot be enabled there. A published price does not establish production availability. Check the standalone wallet catalog before you build. A configured document fallback runs a separate document check and is billed separately.

Start free in the sandbox at business.didit.me, no sales call. If you want an assistant to write the first call, connect Didit through the Didit MCP server. Keep the ID verification product page and the price list open while you work.

What you get, and the route we recommend

An eID API does not hand you a credential. Your system is the relying party: the person authenticates inside the wallet's own app, and your backend receives a signed answer about that person. Didit reports the assurance tier as cryptographic, meaning an identity provider authenticated the person and signed the attributes it returned. That is all the tier claims. It is not a ranking against the other two methods: they describe different evidence, not more or less of the same thing, and how long a sign-in takes is the wallet's own flow.

We recommend two routes and only two. Use the standalone wallet APIs when your application manages the interface and the authentication steps: each wallet has a dedicated start endpoint, with shared result, polling and cancellation endpoints, and you do not need a workflow. Use the Sessions API when you want the hosted wallet journey, workflow rules and a configured document fallback in the same flow. Wallet availability, the user's approval and the verified attributes are identical on both.

General eID interaction patterns

This table is a general overview of common eID concepts, not a list of Didit-supported flows. The wallet catalog gives the interaction each Didit wallet uses.

How an eID sign-in can reach your backend: a general overview
PatternWhat the user doesHow your backend hears back
Browser redirect (OpenID Connect)Leaves your page for the scheme's login, signs in, comes backAn authorization code your backend exchanges for a signed ID token
App push with a comparison codeTypes a personal code, matches the code shown on your page against the app, types the PIN in the appYou poll the scheme until the order completes
QR code or app launchScans an animated QR on a computer, or the app opens on the same phoneYou poll the scheme until the order completes
Chip card over NFCHolds the card to an NFC phone and types the card PIN in the scheme's appThe eID service reads the chip and returns the attributes
Wallet presentation over OpenID4VPApproves which attributes to share in a wallet appA presentation of signed, selectively disclosed attributes

In the general browser redirect pattern, the scheme returns an authorization code your backend exchanges for a signed ID token. That is a common eID concept, not a documented Didit wallet response. The polling patterns are asynchronous: the start call returns a reference and an action for the person, and the answer arrives later. In the chip card pattern the person holds the card to an NFC phone and types the card PIN in the scheme's app. In the wallet presentation pattern the person approves which attributes to share in a wallet app.

What changes with the EUDI Wallet

Didit lists the EUDI Wallet at a published $0.15 per completed verification, marked coming soon, so it is not available in production today. For a live Digital Credentials wallet such as Google Wallet, the flow already works: the start response carries next_action.type = request_digital_credential, your page or app collects what the wallet returned, and you post it to the wallet response endpoint for Didit to decrypt and decide.

Prerequisites

  • A Didit application API key, stored on your backend only. Never place x-api-key in a browser bundle or a mobile application.
  • An active identity with the issuing scheme, and access to its authentication method. The account must be eligible for the attributes you request and the person must consent to share them.
  • A registered return hostname if you use a redirect wallet, and an HTTPS return_url on that host.
  • A written rule for which wallets you accept per country, and what happens when the person has none.
  • A fallback route. A wallet without a portrait does not include a selfie comparison. A configured document fallback runs a separate document check. Add NFC, liveness or face match only when those steps are configured in your workflow.

Access requirements vary by scheme, so start with the standalone wallet catalog. Didit provides the documented wallet endpoints, result handling and signature validation. Check each wallet's availability and requirements in the catalog. If you are moving off direct scheme integrations, the switch page covers that path.

Step by step: a Finnish Trust Network sign-in

  1. Read the wallet catalog. Call the digital ID wallet catalog to get the current endpoints, required fields and availability for your application. Do this first. A wallet that is not available in your environment cannot be enabled, so confirm availability before building the integration.

  2. Register your return hostname. Redirect wallets send the person back to your application, so register the exact host before starting anything.

    curl --request PATCH --url https://verification.didit.me/v3/webhook/ --header 'x-api-key: YOUR_API_KEY' --header 'Content-Type: application/json' --data '{"allowed_return_hosts": ["app.example.com"]}'

    Use bare hostnames, with no scheme, path or wildcard, one entry per subdomain, up to 20. An update replaces the whole list, so send every hostname you want to keep. This is only the browser return page; completion webhooks for your backend are configured separately.

  3. Start the verification. Each wallet has its own start URL. For the Finnish Trust Network it is /v3/id-verification/wallets/ftn/.

    curl --request POST --url https://verification.didit.me/v3/id-verification/wallets/ftn/ --header 'x-api-key: YOUR_API_KEY' --header 'Idempotency-Key: your-unique-attempt-key' --header 'Content-Type: application/json' --data '{"country": "FIN", "return_url": "https://app.example.com/identity/complete", "vendor_data": "your-customer-reference"}'

    Use a distinct Idempotency-Key for each new attempt and reuse that key when you retry the same start request. Changing the request body while reusing a key is a conflict, not a new verification.

  4. Send the browser to the wallet. Save the returned request_id. When wallet_verification.next_action.type is redirect, open wallet_verification.next_action.url in the person's browser and let them finish inside the wallet.

  5. Read the result from your backend. After the person returns, fetch the verification. Wallets that approve on the phone are polled with POST /v3/id-verification/wallets/verifications/{request_id}/poll/ instead. Polling availability depends on the selected wallet.

    curl --request GET --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/ --header 'x-api-key: YOUR_API_KEY'
  6. Gate on the outcome. Treat the person as verified only when wallet_verification.outcome is verified and simulated is false. A pending response can carry a next action; a terminal response has none.

  7. Handle the completion event. On the webhook side, read the raw body before parsing, recompute the HMAC-SHA256 signature and compare it against X-Signature-V2 with a constant-time check, reject an X-Timestamp more than 300 seconds away from now, then process the event by webhook_type and update state idempotently.

The verification page while the backend is still waiting on the wallet
A start call that returns 200 only means authentication began. The interface keeps the person on a processing screen until the outcome is terminal.

Expected output

This is the shape of a completed verification, abridged to the fields you will actually branch on. Values are placeholders.

{
  "request_id": "00000000-0000-4000-8000-000000000001",
  "wallet_verification": {
    "wallet": {
      "id": "WALLET_ID",
      "name": "WALLET_NAME"
    },
    "country": "FIN",
    "status": "Approved",
    "outcome": "verified",
    "error": null,
    "simulated": false,
    "expires_at": "2026-11-26T10:10:00Z",
    "next_action": null,
    "identity": {
      "full_name": "Alex Example"
    }
  }
}

The identity object carries the attributes the issuer shared for that wallet, so its keys vary by scheme. The outcome field has five documented values, and only one of them means you may use the identity.

Outcome values on a wallet verification
OutcomeMeaning
pendingAuthentication is still in progress.
verifiedAuthentication completed and the returned identity is verified.
cancelledThe person or your application cancelled the attempt.
timeoutThe authentication window expired.
failedAuthentication or identity validation failed.

Failure cases and recovery

What you will see and what to do about it
What you seeWhat it meansRecovery
outcome: pendingThe wallet is still authenticatingWait, or poll the phone approval; do not open an account yet
outcome: cancelledThe person or your app cancelledA cancel declines a pending verification without charging for it. Offer another route; never retry a cancelled sign-in automatically
outcome: timeoutThe authentication window expiredOffer a fresh attempt with a new Idempotency-Key
outcome: failedAuthentication or identity validation failedLog the error, offer the document fallback, stop retrying
409 verification_in_progress with Retry-AfterThe person is approving in the app at that momentWait the number of seconds in the header, then read the result again
401Invalid or expired API keyFix the key on the backend; keys do not belong in client code
403The key is missing or lacks permissionUse a key from the application that started the verification, with the scopes the call needs
404The verification does not exist or belongs to another applicationCheck request_id and that you used the key of the application that started it
Signature mismatch or stale X-TimestampThe webhook is not from Didit, or it was replayedReject it before parsing the body, and keep the delivery for inspection

Two more practical rules. Cancelling a verification the person is completing right then answers 409 with Retry-After, so treat a cancel as best effort. And if your return hostname is not registered, the browser cannot come back to you even though the wallet approved the person, so register the host before the first attempt rather than after the first bug report.

Inputs and outputs

Fields on the standalone wallet calls
ItemDirectionWhat it does
x-api-keySentApplication key. Backend only, never in a browser or app bundle
Idempotency-KeySentOne per attempt, reused when retrying the same request
countrySentThe wallet's market, ISO 3166-1 alpha-3, for example FIN
return_urlSentHTTPS page on a registered hostname where the browser returns
vendor_dataSentYour own reference, up to 2,000 UTF-8 bytes, returned with the result and the completion webhook
metadataSentOptional JSON object, returned with the result
request_idReturnedIdentifies the verification for status, polling, response and cancel calls
next_action.type and next_action.urlReturnedThe action the person must take; redirect means send the browser to the URL
outcomeReturnedpending, verified, cancelled, timeout or failed
simulatedReturnedtrue on a simulated check. Never treat it as a real identity
identityReturnedThe verified attributes the issuer shared

You pay once per completed wallet verification, at the per-wallet price above, from prepaid credit. The listed price includes the wallet identity check and adds no separate national eID transaction fee. A cancel declines a pending verification without charging. A configured document fallback runs a separate document check and is billed on its own line: $0.15 for the ID document only, or $0.33 for the full ID check with liveness and face match. We run this for 4,000+ companies, and the billing rules are the same as for any other Didit check.

The review boundary is simple and worth writing down. Didit returns the outcome, the wallet and the verified attributes. Whether that person gets an account, a lower tier, or a manual review is your decision under your policies and applicable law. Sessions that need a human appear in the console with their status, warnings and evidence, and reviewers can set a status by hand; the decision record shows whether it was automatic, manual or an investigator.

Video thumbnail explaining Didit credits, auto-recharge and volume discounts
Completed checks draw from plan credit first, then from top-ups. Cancelled wallet attempts do not bill.
A session overview in the Didit Business Console with its status and warnings
The console view of one session: status, warnings and the evidence behind a decision, before anyone overrides it by hand.

Worked cost example

Suppose a Nordic and Baltic sign-up completes 10,000 wallet verifications in a month: 4,000 Danish MitID, 3,000 Swedish BankID, 2,000 Estonian Smart-ID and 1,000 Finnish Trust Network. At list price:

  • 4,000 x $0.25 = $1,000.00 for MitID
  • 3,000 x $0.20 = $600.00 for BankID Sweden
  • 2,000 x $0.21 = $420.00 for Smart-ID
  • 1,000 x $0.25 = $250.00 for Finnish Trust Network

That is $1,000.00 + $600.00 + $420.00 + $250.00 = $2,270.00 for 10,000 completed wallet checks, or $0.227 each. Add 800 people who took the document fallback instead, billed as the ID document only at $0.15: 800 x $0.15 = $120.00. The month totals $2,390.00 across 10,800 completed checks. On the Growth plan every Didit price is 4% lower and on Scale 10% lower; read the current plan terms on the pricing page before you model a year.

Security checklist

  • Keep x-api-key on the backend. An API integration still requires the person to authenticate; you cannot verify someone by submitting their identifier.
  • Never trust a 200 from the start endpoint. Authentication is asynchronous, and only a terminal verified outcome with simulated: false is usable.
  • Reuse an Idempotency-Key only for the identical request, so a retry cannot create a second verification.
  • Verify the webhook signature over the raw body with a constant-time comparison, and accept a match on the -Previous header while a rotated secret is being deployed.
  • Reject an X-Timestamp outside 300 seconds, and make event handling idempotent on the event identifier.
  • The PIN belongs in the scheme's app. No page you control should ever collect it.
  • Set your own policy per country: which wallets you accept, which level of assurance you require, and what happens to people with no eID.

Whether an eID result satisfies your customer-due-diligence policy depends on the scheme, jurisdiction and your risk assessment. Obtain legal advice for your implementation.

Sources

Next step: create a sandbox application and run the Finnish Trust Network example end to end at business.didit.me. Sandbox testing is free and unlimited; no sales call. In paid use, check the current plan, credit and channel charges on the pricing page.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

What is an eID API and what does it return?

An eID API lets your sign-up ask a national electronic identity scheme to authenticate a person and return a signed set of attributes about them. Your backend never sees the credential, only the signed answer. Didit returns the wallet that was used, the country, the outcome, the assurance tier and the shared attributes. You still decide what that answer is worth for your risk policy.

Which national eIDs can Didit verify through one API in 2026?

The live price feed lists these as available on November 26, 2026: MitID for Denmark, BankID Sweden, iDIN for the Netherlands, Finnish Trust Network, Smart-ID for Estonia, Latvia, Lithuania and Belgium, Mobile-ID for Estonia and Lithuania, BankID Norway High, Personalausweis Profile 2 for Germany, Bank iD for Czechia and Google Wallet. This list is not exhaustive of every scheme in the wallet catalog; availability is specific to your environment, so read the catalog before you build. A wallet marked coming soon cannot be enabled in that environment.

How much does an eID verification cost with Didit?

Per completed wallet verification, at list price: Google Wallet $0.10, BankID Sweden $0.20, Bank iD $0.20, Smart-ID $0.21, Mobile-ID $0.21, MitID $0.25, Finnish Trust Network $0.25, BankID Norway High $0.35, Personalausweis Profile 2 $0.49 and iDIN full identification $0.95. A document fallback is billed separately at $0.15 for the ID document only or $0.33 for the full ID check. Growth takes 4% off and Scale 10% off every Didit price.

Do I need to create a workflow to use the Didit eID API?

No. The standalone wallet APIs start a verification from your own application with no workflow and no workflow_id. Create a workflow only when you want the hosted journey, workflow rules or a configured document fallback in the same flow, in which case you use the Sessions API and read the result from the decision endpoint or a webhook.

What does a verified eID result contain?

It contains request_id, the wallet identity and name, the country, status, outcome, an error when there is one, simulated, an expiry and the identity object with the attributes the issuer shared. The attribute keys vary by scheme, and a wallet without a portrait returns no selfie comparison. Only outcome: verified with simulated: false is a real identity check.

Can I test an eID sign-in without a real MitID or BankID?

Sandbox testing is free and unlimited on every plan. Check the sandbox scenarios available for your application, and treat simulated: true as non-production. Test cancellation and timeout on your own side by exercising the branches that read a non-verified outcome.

What happens if the person cancels or the sign-in times out?

A cancel declines a pending verification without charging for it, and a completed one is returned unchanged. A timeout means the authentication window expired. Handle both the same way: do not open an account, do not retry the same attempt automatically, and offer the document fallback instead. If a cancel arrives while the person is approving in the app, the API answers 409 with a Retry-After header.

Is an eID sign-in enough on its own for AML customer due diligence?

Whether an eID result satisfies your customer-due-diligence policy depends on the scheme, jurisdiction and your risk assessment. Obtain legal advice for your implementation. An eID sign-in returns a signed answer at the level the scheme asserts, but that does not by itself settle your CDD policy.

Do I need my own contract with each eID scheme?

That depends on the scheme and how you integrate. If you integrate directly, confirm the scheme's requirements with the issuer. With Didit, the documented wallet endpoints handle the start, result, polling and cancellation calls, and each wallet's availability and requirements are in the catalog.

Can a coding assistant write the first Didit eID call for me?

Yes. The Didit MCP server is free and hosted at https://mcp.didit.me/mcp with OAuth sign-in, and the MCP setup page covers each client. The integration prompt at didit.me/developers/integration-prompt gives an agent the endpoint, the headers and the payload in one paste. Review the generated code against the wallet catalog before you ship it.

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.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.