Document Trust Service

Document Trust Service (DOCUMENTTRUST)

Full document verification: OCR extraction → validation → government authority reconciliation → PASS / REVIEW / FAIL decision.

Use this when you need to confirm that a physical identity document is structurally valid and matches official records (FRSC, PVC, Passport, NIN).

Related: Document Validate Service (validation only, no authority) · Full API Guide


Quick reference

ItemValue
Service SKUDOCUMENTTRUST
MethodPOST
Path/api/v1/document/trust
Content-Typemultipart/form-data
BilledYes — every completed session (including FAIL decisions)
AuthInstitution secret API key

What it does

  1. Uploads the document image to Orcha OCR and extracts identity fields.
  2. Runs classification, format, expiry, and cross-field checks.
  3. Reconciles extracted data against the matching government API:
    • Passport → passport authority
    • Driver's licence → FRSC
    • Voter's card → PVC
    • NIN slip → NIN
  4. Returns a structured decision (PASS, REVIEW, or FAIL), trustScore, per-check breakdown, and audit evidence.

Request

Form fields

FieldTypeRequiredDefaultDescription
documentImagefileYesFront of document (photo or scan)
documentImageBackfileNoBack of document (stored for audit; not used in OCR v1)
docTypestringNoautoDocument type hint (see below)
customerReferencestringNoYour internal customer or case reference

docType values

ValueDocument
autoAuto-detect (tries handlers until required fields are extracted)
passportInternational Passport
drivers_licenseDriver's Licence (FRSC)
voters_cardPermanent Voter's Card (PVC)
nin_slipNIN Slip

Example request

curl -X POST "https://api.dikript.com/api/v1/document/trust" \
  -H "X-Dikript-Api-Key: YOUR_SECRET_KEY" \
  -F "documentImage=@drivers_license_front.jpg" \
  -F "docType=drivers_license" \
  -F "customerReference=CUST-001"

Example response

{
  "status": true,
  "message": "Successful",
  "code": "200",
  "transactionRef": "N202608121100001234",
  "apiVersion": "v1",
  "data": {
    "sessionId": "a1b2c3d4e5f67890abcdef1234567890",
    "customerReference": "CUST-001",
    "decision": "PASS",
    "trustScore": 0.91,
    "mode": "trust",
    "docTypeRequested": "drivers_license",
    "docTypeDetected": "drivers_license",
    "processedAtUtc": "2026-08-12T10:00:00Z",
    "processingDurationMs": 4200,
    "summary": {
      "headline": "Document passed trust checks.",
      "checksPassed": 12,
      "checksFailed": 0,
      "checksReview": 0,
      "checksSkipped": 0
    },
    "checks": [
      {
        "code": "DOC_CLASSIFICATION",
        "category": "classification",
        "status": "pass",
        "message": "Document classified as drivers license.",
        "confidence": 0.95
      },
      {
        "code": "AUTHORITY_RECORD_FOUND",
        "category": "authorityReconcile",
        "status": "pass",
        "message": "Authority record found.",
        "confidence": 1.0
      }
    ],
    "extractedData": {
      "documentType": "drivers_license",
      "fields": {
        "fullName": "JOHN DOE",
        "licenseNumber": "ABC12345678",
        "expiryDate": "15-03-2028"
      }
    },
    "authorityData": {
      "source": "frsc",
      "recordFound": true,
      "fields": {
        "licenseNumber": "ABC12345678",
        "fullName": "JOHN DOE"
      }
    },
    "audit": {
      "auditRef": "a1b2c3d4e5f67890abcdef1234567890",
      "evidenceRetentionUntilUtc": "2033-08-12T10:00:00Z",
      "documentImageHash": "sha256:abc123...",
      "documentImagePath": "125215/document-trust/a1b2.../front.jpg"
    }
  }
}

Decisions

DecisionMeaningSuggested action
PASSAll critical checks passedProceed with onboarding
REVIEWNon-critical mismatch or expiring soonQueue for manual review
FAILCritical failure (format, expiry, authority mismatch, etc.)Reject or request resubmission

trustScore (0–1) is a summary metric. decision is the primary business outcome.


Billing

HTTP statusBilled?
200 — completed session (any decision)Yes
400 — validation error (missing image, bad docType)No
401 / 403 — auth or service accessNo
Insufficient balanceNo

Each successful response includes transactionRef for wallet reconciliation.


Retrieve a session later

GET /api/v1/document/trust/{sessionId}

Not billed. Returns the stored session JSON for your institution.


Prerequisites

  1. DOCUMENTTRUST enabled in your institution offerings with pricing.
  2. Sufficient wallet balance or active subscription.
  3. Supported document types: passport, driver's licence, voter's card, NIN slip.

When to use Document Trust vs Document Validate

NeedUse
Confirm document matches government recordsDocument Trust (DOCUMENTTRUST)
OCR + format/expiry checks only, no authority lookupDocument Validate
Selfie / liveness / face matchSeparate biometric products (LIVELINESSCHECK, FACECOMPARISON, etc.)

See the full Document Trust API Guide for check codes, processing flow, and configuration.