ID Analyzer
← 返回部落格
Document VerificationImmigration DocumentsKYC

Verifying Residence Permits and Visas: Extracting and Validating Data From Non-Passport Immigration Documents

ID Analyzer TeamNov 28, 2026閱讀時間 5 分鐘
Verifying Residence Permits and Visas: Extracting and Validating Data From Non-Passport Immigration Documents

Most identity verification flows are designed around passports, national ID cards and driver licenses. Many real customers, however, hold a foreign passport plus a residence permit card, or a passport with a visa sticker inside it. Fintechs onboarding expats, employers checking status, landlords and universities all run into these documents regularly.

Residence permits and visas don't behave like primary identity documents. They often depend on another document, carry status information that changes how you should treat the customer, and use machine-readable formats that differ from passports. This guide covers how to extract and validate them reliably.

Why These Documents Need Their Own Logic

A passport answers the question "who is this person?" A residence permit or visa answers a second question: "what is this person's status in this country, and until when?"

That difference has three practical consequences:

  • Validity is more than expiry. A permit can be unexpired yet issued for a category that doesn't fit your use case.
  • Documents are often linked. A visa is only meaningful alongside the passport it is placed in. A residence permit usually names a nationality that should match the holder's passport.
  • Formats vary widely. Permit cards, visa stickers and paper endorsements all exist, and issuers redesign them over time.

Know the Machine-Readable Formats

Most modern residence permits and visas include a machine-readable zone (MRZ), but not in the passport layout.

Residence permit cards

Card-format permits typically use the TD1 layout: three lines of 30 characters, the same size used by many national ID cards. Some issuers use the TD2 layout (two lines of 36 characters). The document code at the start of the first line identifies the document type, and the codes used for residence permits vary by issuing state. Don't hard-code assumptions; let document classification identify the exact type.

Visa stickers

Machine-readable visas start with the letter V and come in two sizes. The MRV-A format uses two lines of 44 characters, and MRV-B uses two lines of 36 characters. The document number in a visa MRZ normally refers to the visa itself, not the passport it is attached to. To connect the two, you have to compare data across both documents.

Barcodes and visual zones

Some permits also carry barcodes. Many visas and permits print important fields only in the visual inspection zone (VIZ). These include permit type, remarks, conditions and sometimes employment restrictions. MRZ parsing alone will miss them, so you need OCR of the full document.

A Validation Workflow That Holds Up

1. Classify before you parse

Identify the issuing country, document type and version first. A permit card from one country and a visa sticker from another need different field maps. ID Analyzer recognizes more than 3,000 document formats across 190+ countries, which covers the range of permits and visas real customers submit.

2. Extract MRZ, barcode and visual zone data

Read every zone available. Validate MRZ check digits for the document number, date of birth, expiry date and composite fields. Then compare the MRZ values with the VIZ values. A mismatch between the printed expiry date and the encoded one is a classic sign of tampering.

3. Authenticate the document itself

Run document authentication and anti-forgery checks against the expected template. Look for altered fields, photo substitution, and signs that the image was captured from a screen or photocopy. Visa stickers are physically attached to passport pages, so watch for stickers that look misaligned or lifted, or that don't match the page they appear on.

4. Cross-check against the passport

When a customer submits a visa or permit, also collect the passport and compare:

  • Full name, accounting for transliteration and name-order differences
  • Date of birth
  • Sex
  • Nationality on the permit versus the passport's issuing state or nationality field

Treat a hard mismatch on date of birth as a stop. Treat name differences as candidates for review, because permits and passports sometimes render the same name differently.

5. Match the face

The permit or visa photo should match the passport photo, and both should match the person in front of the camera. Use biometric face match against a live selfie, combined with liveness detection, so a stolen permit paired with a printed photo or replayed video is rejected. Comparing all three images (passport, permit, selfie) is stronger than comparing any single pair.

6. Apply your business rules

With validated data in hand, decide what the document means for you:

  • Is the permit or visa unexpired at the time of verification?
  • Is its category one your policy accepts?
  • Will it expire soon enough that you need a re-verification date on file?

Store the expiry date as structured data so you can trigger re-checks before it lapses rather than discovering it later.

Heads up

Extracting a permit category is not the same as making a legal determination. Whether a document grants the right to work, rent or open an account depends on local law, and that can change. Have your compliance team define which document types and categories are acceptable, and send anything unrecognized to manual review instead of auto-approving.

Common Pitfalls

Relying only on the MRZ. Conditions, remarks and permit types often appear only in the visual zone.

Ignoring the host passport. A genuine visa in a forged passport, or a genuine passport carrying a stolen visa, will only be caught by cross-document checks.

Treating expired passports and valid visas inconsistently. Some visas stay valid in a newer passport while the old passport carries the sticker. Decide your policy explicitly and capture both documents when it applies.

Assuming a physical document exists. Some countries are moving immigration status to electronic records. Have a fallback path for customers who can't present a card or sticker.

Screening Still Applies

Validating immigration documents confirms identity and status. It doesn't replace AML, PEP and sanctions screening. Run the extracted name, date of birth and nationality through screening the same way you would for passport holders, and keep the results with the verification record.

Bringing It Together

A reliable residence permit and visa flow does five things. It classifies the document precisely, reads every data zone, authenticates the physical document, links it to the passport and the live face, and applies clear policy rules to the result. Each step is simple on its own. Together they close the gaps fraudsters exploit when systems treat secondary documents as an afterthought.

開始驗證

準備好驗證你的第一張證件了嗎?

註冊即享免費測試額度——無需信用卡。

  • 無需信用卡

  • 註冊即送免費試用額度