Document Check Service

Learn how to verify identity documents before authorising a transaction using emerchantpay’s Document Check Service.

You can verify your customers’ identity documents through emerchantpay’s KYC service. The Document Check Service validates documents through forensic and OCR analysis, checks for consistency, and can include facial recognition or AML screening.

Supported countries Global
Use cases KYC journeys, PIX and APM transactions, CPF/CNPJ validation
Document types Passport, ID card, driver’s licence, credit/debit card
Verification modes Image, video, or both
Response pattern Synchronous confirmation + asynchronous decision

Integration options

You can choose between two integration methods:

Flow Best for Endpoint
Upload document Mobile or kiosk apps, custom journeys POST /upload_document
Self-service session Web checkout, quick integration POST /verifications

Prerequisites

Before retrieving billing transactions, ensure you have:

  • A valid API token issued by tech-support@emerchantpay.com.
  • Access to the Genesis KYC endpoint: https://.kyc.emerchantpay.net/api/v1/
  • A valid reference ID from a transaction or customer profile.
  • A notification URL (HTTPS) to receive callback responses.

Upload document via API

This method allows you to verify a customer’s identity document by submitting it directly to the API. It’s ideal for mobile or kiosk applications where you capture the document image in your interface and send it to emerchantpay’s backend for processing. The system performs OCR and forensic checks and returns a final verification result asynchronously via callback.

Step 1: Submit document

Send an image as base64 in your API request.

POST /api/v1/upload_document
{
  “transaction_unique_id”: “1332”,
  “doc”: {
    “mime_type”: “image/jpeg”,
    “base64_content”: “{base64}”
  },
  “method”: 3
}

Step 2: Receive immediate response

{
  “code”: 0,
  “details”: [
    { “kyc_source”: “OCR”, “reference_id”: “382” },
    { “kyc_source”: “Semi-manual”, “reference_id”: “129” }
  ],
  “doc”: “51f7e411cd1202e040b21655738beb89”
}

Save the reference_id to identify related callbacks.

Step 3: Handle callback

You’ll receive a URL-encoded notification:

?kyc_source=OCR&reference_id=382&score=10&score_complete=1&status=accepted&signature=<sha-512>

Verify the signature using SHA-512 of reference_id + API login.

Self-service session flow

You can redirect your customer to a secure, hosted session where they complete identity verification. This is the simplest way to integrate document checks into your web or app experience.

Step 1: Create session

POST /api/v1/verifications
{
  “email”: “john.doe@example.com”,
  “country”: “US”,
  “reference_id”: “123456”,
  “redirect_url”: “https://merchant.com/return”,
  “document_supported_types”: [“passport”, “id_card”],
  “face”: { “allow_online”: true },
  “allow_retry”: true,
  “verification_mode”: “image_only”
}

Step 2: Get response

{
  “code”: 0,
  “status”: “pending”,
  “verification_url”: “https://app.shuftipro.com/process/kyc/code”,
  “reference_id”: “123456”
}

Redirect the customer to verification_url. The service will notify you when verification completes.

Response fields

Synchronous fields

Field Description
code 0 = success
reference_id Correlator for callbacks
status pending / accepted / declined / error
verification_url Redirect URL (for self-service)

Callback fields

Field Description
status Final result of verification
risk_score 0–100 (higher = riskier)
score_complete 1 when final score is ready
declined_reason Reason code if declined

Declined reason examples

Code Meaning Suggested action
SPDR18 Image is blurred Ask customer to re-capture
SPDR17 Document expired Provide valid document
SPDR230 Face mismatch Re-take selfie
SPDR64 Documents mismatch Upload matching documents

Supported document types

Mode Methods Supported docs
image_only Upload or camera passport, id_card, credit_or_debit_card, driver’s licence
video_only Live stream passport, id_card, driver’s licence
any All methods All supported types