Skip to main content

Detecting Document Tampering: AI-Powered Fraud Prevention

Document AI reads supporting documents at $0.20 per document; ID Verification handles government IDs at $0.15 in a workflow or $0.20 standalone. Read the status and warnings, and route In Review to a person.

Detecting Document Tampering: AI-Powered Fraud Prevention

Contents

In this guide

Jump to the part you need.

Use our Document AI API for supporting documents such as bank statements, payslips and invoices at $0.20 per document. Use ID Verification for government IDs at $0.15 in a workflow or $0.20 through the standalone API. Review the warnings before accepting either result. If standalone ID Verification returns In Review because the forgery check could not produce a score, route the case to a person.

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

What each document tampering check returns and what it costs
What you are checkingCallFields you act onList price
Any PDF or image: statement, payslip, invoice, tax form, certificatePOST /v3/document-ai/document_ai.status, document_ai.warnings, extracted_data, name_match_score$0.20 per document
Government ID inside a workflowID_VERIFICATION step on a sessionid_verifications[].status, id_verifications[].warnings$0.15 per check
Government ID, server to serverPOST /v3/id-verification/id_verification.status, id_verification.warnings$0.20 per check

Start free in the sandbox at business.didit.me, no sales call. For developers, connect Didit to an AI assistant through the MCP server.

Document fraud detection: what the check has to catch

  • Template modification. A leaked or purchased template of a genuine document filled with new names, dates and numbers.
  • Splicing and cloning. Sections of two authentic documents combined, or an element copied from one region of a file and pasted into another.
  • Content replacement. One field changed with an image editor: a balance, a date, a document number, a rebuilt form field or a single digit.
  • Photo substitution. A different portrait inserted into an authentic background.
  • Security feature replication. Attempts to copy holograms, watermarks and microprinting.
  • Presentation attacks. A screen replay, a printed copy, a specimen document, or a portrait edited before the capture.
  • Generated documents. Entirely synthetic files produced with generative tools, with no original behind them.

The Document AI product page covers the hosted workflow step, and the Document AI API describes the server-to-server call. Document AI lists at $0.20 per document. See the Didit pricing page for published rates and plan details.

How AI detects tampering in an altered document

Optical character recognition reads text. It does not tell you whether the text was there when the document was issued. Altered document verification works on the file and on the capture, and it produces named risk codes your code can act on.

Pixel and compression analysis

General image-forensics techniques look for traces that editing leaves behind. Examples include error level analysis, which compares compression history across regions, copy-move detection, which finds duplicated areas in one file, and splicing detection, which looks for seams between joined sources. These are general techniques, not a list of Didit methods. The documented Didit checks are the design match, the data cross-checks and the capture checks described below.

Template and design matching

For government IDs, Didit classifies the document automatically against its library of 14,000+ document types from 220+ countries and territories. When the front image does not match a known official design with high confidence, the ID Verification API returns COULD_NOT_DETECT_DOCUMENT_TYPE and declines the request.

Cross-checks between the visual zone and the machine-readable zone

Passports and many ID cards carry the same data twice, once in the visual zone and once in the MRZ. Didit decodes the MRZ and its check digits, validates date and number formats, and compares the two zones. A mismatch raises INCONSISTENT_DATA and a broken checksum raises INVALID_MRZ. Both are configurable per request through inconsistent_data_action and invalid_mrz_action.

Forgery and capture checks on the document itself

With perform_document_liveness=true, which is the default, the images are also screened for screen replays, printed copies and portrait manipulation. Those risks decline on their own: SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED and SPECIMEN_DOCUMENT_DETECTED are hard failures, not suggestions.

Data consistency across the document and the applicant

A clean-looking document can still belong to someone else. Didit compares the name it reads against the person or company you expect. In Document AI you mark one field is_full_name, send expected_first_name and expected_last_name or expected_company_name, and read name_match_score. A score below document_ai_name_match_score_threshold, 80 by default, raises DOCUMENT_AI_NAME_MISMATCH.

For example, a score of 74 against the default threshold of 80 raises DOCUMENT_AI_NAME_MISMATCH. The default action is NO_ACTION, so the document can still be Approved. A null score means the name check was skipped because no expected name was sent or no name was found.

Prerequisites

  • A Didit organization and an API key, sent in the x-api-key header.
  • For Document AI: the file as a PDF or image, plus a field list of 1 to 30 items.
  • For ID Verification: a front image, plus a back image for two-sided documents. Accepted extensions are tiff, jpg, jpeg, png, webp and pdf, no larger than 5 MB per file. Upload uncropped photos with all four corners visible, because the service detects, aligns and crops the document itself.
  • For session-based ID Verification, register status.updated on a destination, verify the X-Signature-V2 signature and the X-Timestamp freshness before you act on the payload, or poll GET /v3/session/{sessionId}/decision/.
  • A sandbox application for testing. The sandbox is free on every plan.
Document AI upload screen where a user drops a PDF or image for extraction and tampering checks
The hosted Document AI upload screen takes one file. In the API, the file goes in document and the field definitions go in fields as one JSON string.

Step by step: detect tampering in a statement, payslip or certificate

  1. Put the key in your environment. Export it as DIDIT_API_KEY so it never sits in the request body or in a repository.
  2. Define the fields you want read. Give each field a unique key. You can also supply name, instruction and type. The type defaults to text. You can set required and is_full_name as flags. Dates come back as YYYY-MM-DD, and the request accepts 1 to 30 fields.
  3. Mark at most one field with is_full_name: true on the person or company the document should belong to. If you skip this, Didit falls back to the first text field whose key looks like a name, such as name, holder, full_name or account_holder.
  4. Send the multipart request. The file goes in document; the whole field array goes in fields as one JSON string, never as bracket-style keys.
    curl -X POST https://verification.didit.me/v3/document-ai/ -H "x-api-key: $DIDIT_API_KEY" -F 'document=@./bank-statement.pdf' -F 'fields=[{"key":"account_holder","name":"Account holder","instruction":"Full name of the account holder","type":"text","required":true,"is_full_name":true},{"key":"balance","name":"Closing balance","instruction":"Closing balance as a number","type":"number","required":true}]' -F 'expected_first_name=Jane' -F 'expected_last_name=Doe'
  5. Read document_ai.status first. It is Declined, In Review or Approved, and the strictest triggered action decides it.
  6. Read document_ai.warnings. A manipulation hit appears as DOCUMENT_AI_SUSPECTED_MANIPULATION. Every triggered risk is listed, not only the one that set the status.
  7. Set the action per risk on the request. document_ai_document_tampering_action defaults to DECLINE; document_ai_unreadable_document_action, document_ai_missing_required_fields_action and document_ai_unsupported_file_action default to REVIEW; document_ai_name_mismatch_action defaults to NO_ACTION. Accepted values are DECLINE, REVIEW and NO_ACTION.
  8. Route what the call did not decide. Anything at In Review belongs in a human queue. Do not approve a customer because the request returned HTTP 200.

Expected output

Analyzing document screen showing a file being read and checked before a result is returned
Extraction and the manipulation check run in the same call, before any status is returned.

A successful response echoes the normalised fields, returns extracted_data keyed by your key values with null for anything the model could not find, and document_ai.detected_codes lists the supported codes the API located, with a null parsed_payload when a code could be located but not decoded. Suspected manipulation appears in document_ai.warnings and produces Declined when the default action applies.

Read the status and the warnings together. A document can be Approved while still carrying an informational warning, and a document can be Declined for a reason that is not tampering, such as a missing required field when its action is set to DECLINE. The default for a missing required field is REVIEW. Each code carries a short and a long description you can show to a reviewer.

Step by step: detect tampering in an ID document

For passports, ID cards, residence permits and driver's licences, use the ID_VERIFICATION step inside a workflow at $0.15, or the standalone API at $0.20 when you already hold the images server to server. The call below is the documented example.

curl -X POST 'https://verification.didit.me/v3/id-verification/' -H 'x-api-key: YOUR_API_KEY' -F 'front_image=@./id_front.jpg' -F 'back_image=@./id_back.jpg' -F 'perform_document_liveness=true' -F 'minimum_age=18' -F 'expiration_date_not_detected_action=DECLINE' -F 'invalid_mrz_action=DECLINE' -F 'inconsistent_data_action=DECLINE' -F 'preferred_characters=latin' -F 'save_api_request=true' -F 'vendor_data=user-123'

Then read id_verification.status and id_verification.warnings, never the HTTP code alone: the call can return HTTP 200 with Approved, In Review or Declined. A document that cannot be processed at all returns 400 with COULD_NOT_RECOGNIZE_DOCUMENT. Keep save_api_request at its default of true when you want the call stored as a session in the Business Console, so a reviewer can open the cropped images and the warning list.

Session detail view in the Didit Business Console showing an ID document check and its result
A stored session in the Business Console: the document check, its images and its warnings in one place.

Hosted ID Verification walkthrough

When a person captures the document in a hosted flow, the ID Verification step runs inside a session instead of a server-to-server call. The documented flow has four steps.

  1. Create a workflow with the ID_VERIFICATION feature in the Business Console or with POST /v3/workflows/.
  2. Create a session with POST /v3/session/ and send workflow_id, vendor_data and callback.
  3. Open the returned session.url for the user, or mount the web or mobile SDK.
  4. After completion, fetch GET /v3/session/{sessionId}/decision/ and read id_verifications[]. If you registered a destination, status.updated reports status changes, and its decision field is included for Approved, Declined, In Review or Abandoned. Verify the signature and timestamp before you act on the payload. When the payload carries no decision and you need one, fetch the decision endpoint.

The session flow is documented in the ID Verification overview and the webhooks guide.

Inputs and outputs

What you send and what you read back, for the two calls
ItemDocument AI /v3/document-ai/ID Verification /v3/id-verification/
File fielddocumentfront_image, back_image
Configurationfields as a JSON array string, expected_first_name, expected_last_name, expected_company_name, expected_company_country, the five action parametersperform_document_liveness, minimum_age, invalid_mrz_action, inconsistent_data_action, expiration_date_not_detected_action, preferred_characters, save_api_request, vendor_data
Statusdocument_ai.status: Approved, In Review, Declinedid_verification.status: Approved, In Review, Declined
Tampering signalDOCUMENT_AI_SUSPECTED_MANIPULATIONSCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, SPECIMEN_DOCUMENT_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED
Data returnedextracted_data, detected_codes, name_on_document, name_match_scoreHolder fields, parsed MRZ, decoded barcodes, portrait and document images
Price$0.20 per document$0.20 per call, or $0.15 inside a workflow

Failure cases and how to recover

What each failure means and the next action
What you seeWhat it meansWhat to do
HTTP 400 for malformed Document AI fieldsfields was not a JSON array string, for example bracket-style form keysRebuild the array as one form value and resend. Nothing is billed when the request is rejected.
HTTP 400 with COULD_NOT_RECOGNIZE_DOCUMENTThe file could not be processed at allAsk for a fresh capture: uncropped, all four corners visible, no larger than 5 MB per file, supported extension.
HTTP 403, not enough creditsThe balance cannot cover the call, and no image processing startsTop up or subscribe. The sandbox keeps working while live checks are paused.
Declined with DOCUMENT_AI_SUSPECTED_MANIPULATIONThe manipulation check fired and the default action is DECLINEStop automatic approval of the document and record the warning. Do not re-run the same file and hope for a different result.
In Review with DOCUMENT_AI_UNREADABLE_DOCUMENT or DOCUMENT_AI_MISSING_REQUIRED_FIELDSDocument AI could not read the file or could not extract one or more required fields. Both warnings default to REVIEW.Send it to a person, or request a better copy. A bad camera is not fraud.
In Review with DOCUMENT_LIVENESS_NOT_COMPUTEDThe forgery check produced no usable score, because the provider failed, answered non-200 or answered with an error statusTreat the document as unchecked and route it to manual review. This escalation is not configurable and never overrides a decline.
COULD_NOT_DETECT_DOCUMENT_TYPEThe front image does not match a known official design with high confidenceCheck for a crop, a heavy compression or a photo of a photo before you escalate to fraud.
name_match_score below 80 with an Approved statusDOCUMENT_AI_NAME_MISMATCH defaults to NO_ACTION, so it does not change the statusRead the warning yourself and decide. The status does not cover this check for you.

Billing is per completed check from prepaid credit, and plan credit is used before top-ups. Each HTTP 200 response from standalone ID Verification consumes one credit, including Declined and In Review results. Document AI does not bill a malformed fields request rejected before extraction. The sandbox is free on every plan.

Where automation stops and a person decides
BoundaryDefault actionWhat we recommend
Suspected manipulation in Document AIDECLINERecord the warning and decision. Retain the underlying file only when your retention policy and applicable requirements call for it.
Unreadable document, missing required fields, unsupported fileREVIEWReview the file or request a usable copy, and send it to a person. These warnings alone do not establish fraud.
Name mismatch in Document AINO_ACTIONSet document_ai_name_mismatch_action to REVIEW when the document must match a known customer.
Screen capture, printed copy, portrait manipulation, specimen, public document imageDeclined, not configurableHonor the decline and record the specific warning. If the applicant disputes the result, review the evidence before recording confirmed fraud.
Forgery score not computedIn Review, not configurableAlways to a person. A check that did not run is not evidence that the document is genuine.
DOCUMENT_EXPIREDAlways declinesRequest a current document. Do not override.
Invalid MRZ, inconsistent data, expiration date not detectedConfigurable per requestSet DECLINE when the document is the only evidence you accept.

Layered checks that sit alongside tampering detection

A document check on its own can miss a stolen but unaltered ID, a presentation attack, or a mismatch between the document and the person holding it. We offer these checks in the same workflow: passive liveness at $0.10, face match 1:1 at $0.05, device and IP analysis at $0.03, NFC chip reading at $0.15, and AML screening at $0.20 against 1,300+ lists. When you configure these checks in the same workflow, the session decision contains per-feature arrays such as id_verifications[], liveness_checks[] and face_matches[]. A full ID check with biometrics and device analysis costs $0.33.

Worked cost example

Take a lender that receives 2,000 proof-of-funds and statement documents a month, where 600 of those applicants also complete a full ID check.

  • Document AI: 2,000 x $0.20 = $400.00
  • Full ID check: 600 x $0.33 = $198.00
  • Total at list price: $400.00 + $198.00 = $598.00

The same volume on the Scale plan takes 10% off every Didit price:

  • Document AI: 2,000 x $0.18 = $360.00
  • Full ID check: 600 x $0.297 = $178.20
  • Discounted check usage: $360.00 + $178.20 = $538.20

The $538.20 is discounted check usage, not the monthly bill. If you show monthly cost on Scale, add the $299 plan fee and use the $350 included monthly credit. That leaves $188.20 in usage beyond the credit and $487.20 in combined plan fee and usage before tax.

The two lines do different jobs. The ID check authenticates the identity document, and Document AI reads the supporting file. The $0.33 full ID check is $0.15 for the ID document, $0.10 passive liveness, $0.05 face match and $0.03 device and IP analysis, so a statement upload is an added line rather than a replacement. A document-check result, approved or declined, is not the applicant's credit decision: keep the two records separate.

Sources

Next step: open a sandbox application at business.didit.me, send one synthetic sample statement with no personal data to POST /v3/document-ai/, and read the returned status and warnings on a real response. No sales call, and the sandbox is free on every plan.

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 document tampering detection?

Document tampering detection checks whether a file has been altered since it was issued, rather than only reading the text inside it. For ID Verification, the documented checks include design matching, data cross-checks between the visual zone and the MRZ, and capture checks for screen replays and printed copies. Didit returns a status plus a list of named risk codes, so software makes the first pass.

How does AI detect document fraud?

AI document fraud detection combines image checks with data cross-checks. For ID Verification, Didit classifies the document against known official designs, decodes the MRZ and its check digits, compares the machine-readable zone with the visual zone, and screens the capture for screens, printed copies and portrait edits. Screen capture, printed copies and portrait manipulation trigger mandatory declines. Invalid MRZ and inconsistent data have configurable actions.

What models does AI document forgery detection use?

Didit documents a default model for field extraction in Document AI. The supplied API documentation does not identify the model used for the manipulation check. Use the suspected-manipulation warning and configured action to interpret the result.

Can AI detect a fake certificate or a fake bank statement?

Yes, within limits. POST /v3/document-ai/ takes the file and the fields you want read, and returns document_ai.status, a manipulation warning when it fires, the extracted values and any decoded QR codes or barcodes. The API flags suspected manipulation. When issuer authenticity matters, confirm the document through an independent source, such as the issuer.

Is there a free way to test document tampering detection?

Yes. The sandbox is free on every Didit plan, and the Free plan includes $10 in monthly credit for the first organization created with an eligible work email for its company domain. The credit excludes phone verification. The sandbox test-data page covers scenarios, magic values and sample documents so you can reproduce a decline without real personal data.

How much does document fraud detection cost?

POST /v3/document-ai/ costs $0.20 per document. POST /v3/id-verification/ costs $0.20 per call, and the ID Verification step inside a workflow costs $0.15. A full ID check with biometrics and device analysis is $0.33: $0.15 ID document, $0.10 passive liveness, $0.05 face match and $0.03 device and IP analysis. You pay per completed check, from prepaid credit.

What is the difference between Document AI and ID Verification?

ID Verification reads and authenticates government-issued identity documents such as passports, ID cards, driver's licences and residence permits across 14,000+ document types in 220+ countries. Document AI reads any PDF or image that does not fit a fixed template, such as statements, payslips, invoices and certificates, using the fields you define. Both check the file for manipulation and both return named warnings you can route on.

What happens when the tampering check cannot produce a score?

With perform_document_liveness=true, an ID Verification forgery check that returns no usable score makes the call answer status: "In Review" with a DOCUMENT_LIVENESS_NOT_COMPUTED warning instead of approving the document. The escalation is not configurable and never overrides a decline. Treat the document as unchecked and send it to a person.

Does an approved document prove the person is who they claim?

No. An Approved status means the checks and configured actions allowed the document to pass. Read the warnings and confirm which checks ran. Use passive liveness and face match when you also need to check whether the presenter matches the portrait.

Which document types does Didit support?

Didit covers 14,000+ document types from 220+ countries and territories for ID verification, with 130+ document-recognition languages. Document AI is template-free: you define 1 to 30 fields per request and the model reads them. If a file cannot be processed at all, ID Verification answers 400 with COULD_NOT_RECOGNIZE_DOCUMENT.

How do I detect a screen replay or a printed copy of a document?

That is the document liveness check. In ID Verification, perform_document_liveness defaults to true and screens the images for screen replays, printed copies and portrait manipulation. SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED and PORTRAIT_MANIPULATION_DETECTED always decline, because they are fraud and hard-failure risks.

Can I check a document without a fixed template, like a payslip?

Yes, Document AI takes any PDF or image plus a field list, so a payslip, a utility bill or a tax form needs no template. Give each field a unique key. You can also supply name, instruction and type, and the type defaults to text. Set required and is_full_name as flags, and read extracted_data with null for anything the model could not find.

What do QR codes and barcodes add to a document check?

Every successful Document AI response includes document_ai.detected_codes. A decoded payload gives you data to cross-check against the fields the model read. A code can be located with a null payload when it is damaged, and Didit does not guess a payload. A detection failure does not fail the Document AI request.

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.