Document types

Which documents Hub accepts, and how doc_type maps to source.

The documents Hub can verify, and the two fields that identify them.

Supported documents

doc_typeDocument
passportPassport
drivers_licenseDriver's licence
national_cardProvincial photo card
resident_permitPermanent resident card
indigenous_cardSecure Certificate of Indian Status
health_cardHealth card

Which of these your users can choose is set per client during onboarding. Availability can be further restricted by issuing country and province — health cards in particular are commonly limited to specific provinces.

🚧

national_card is a provincial photo card, not a national identity card. The value name is misleading.

📘

For indigenous_card, only the Secure Certificate of Indian Status is accepted.

doc_type and source

The userinfo response contains both fields. Here's how they differ:

FieldWhat it isUse it?
doc_typeHub's own document typeYes
sourceThe document type from the document-scanning providerInformational only
doc_typesource
passportpassport
drivers_licensedriving_licence
national_cardnational_identity_card
resident_permitresidence_permit
indigenous_cardindigenous_card
health_cardnational_health_insurance_card

source is also how you tell a document result from a bank result in Select mode: bank verification returns source: "bank".

What each document returns

Not every document carries every field. This matters most for address.

doc_typeAddressNationality
drivers_licenseYesN/A
national_cardYesN/A
passportN/AYes
resident_permitN/AYes
indigenous_cardN/AN/A
health_cardN/AN/A

Fields not available for a document type

🚧

Plan for fields a document doesn't carry

If your process relies on a field such as address or nationality, check which documents carry it in the table above. When a document doesn't carry a field, Hub returns the literal string "N/A", not null, an empty string or an absent key.

Here are some of the claims from a passport response. The full response is in Full examples by document type.

{
  "doc_type": "passport",
  "address": {
    "country": "N/A",
    "locality": "N/A",
    "postal_code": "N/A",
    "region": "N/A",
    "street_address": "N/A"
  },
  "nationality": "CAN",
  "dcn": "N/A",
  "acn": "N/A"
}

So this check does not work:

if claims.get("address", {}).get("postal_code"):
    # Passes for a passport - postal_code is the string "N/A"
    save_postal_code(...)
if (claims.address?.postal_code) {
  // Passes for a passport - postal_code is the string "N/A"
  savePostalCode(...);
}
if (!claims.path("address").path("postal_code").asText().isEmpty()) {
    // Passes for a passport - postal_code is the string "N/A"
    savePostalCode(...);
}
if (!string.IsNullOrEmpty(claims["address"]?["postal_code"]?.GetValue<string>()))
{
    // Passes for a passport - postal_code is the string "N/A"
    SavePostalCode(...);
}

"N/A" means the field isn't available for that document type. Check for it explicitly, the same way you'd check for an empty value:

def value_or_none(v):
    return None if v in (None, "", "N/A") else v

postal_code = value_or_none(
    claims.get("address", {}).get("postal_code")
)
const valueOrNull = (v) => ([undefined, null, "", "N/A"].includes(v) ? null : v);

const postalCode = valueOrNull(claims.address?.postal_code);
static String valueOrNull(JsonNode v) {
    String s = v.asText("");
    return s.isEmpty() || s.equals("N/A") ? null : s;
}

String postalCode = valueOrNull(claims.path("address").path("postal_code"));
static string? ValueOrNull(string? v) => v is null or "" or "N/A" ? null : v;

var postalCode = ValueOrNull(claims["address"]?["postal_code"]?.GetValue<string>());

This also affects subject matching: a passport can't be matched on postal code, so that attribute scores 0.

Full examples by document type

The same person, verified with each supported document. Compare the tabs to see which fields carry real values and which come back as "N/A".

{
  "sub": "4aa2e0dc889045edb251e584d1d3b7f8",
  "doc_type": "drivers_license",
  "source": "driving_licence",
  "scan_result": "CLEAR",
  "given_name": "JOHN",
  "family_name": "DOE",
  "birthdate": "1965-03-03",
  "address": {
    "street_address": "4101 Yonge Street",
    "locality": "Toronto",
    "region": "ON",
    "postal_code": "M2P 1N6",
    "country": "CAN"
  },
  "doc_number": "S12345678901234",
  "issue_date": "2021-03-15",
  "expiry_date": "2031-03-15",
  "issuing_country": "CA",
  "issuing_authority": "ON",
  "nationality": "N/A",
  "dcn": "RG1234567",
  "acn": "0012345678",
  "com.securekey.verified.me.ui_locale": "en-CA",
  "com.securekey.vids.job_id": "d306f935-cb23-4a39-8acc-232eed539e1e"
}
{
  "sub": "4aa2e0dc889045edb251e584d1d3b7f8",
  "doc_type": "passport",
  "source": "passport",
  "scan_result": "CLEAR",
  "given_name": "JOHN",
  "family_name": "DOE",
  "birthdate": "1965-03-03",
  "address": {
    "street_address": "N/A",
    "locality": "N/A",
    "region": "N/A",
    "postal_code": "N/A",
    "country": "N/A"
  },
  "doc_number": "GM123456",
  "issue_date": "2021-03-15",
  "expiry_date": "2031-03-15",
  "issuing_country": "CA",
  "issuing_authority": "CA",
  "nationality": "CAN",
  "dcn": "N/A",
  "acn": "N/A",
  "com.securekey.verified.me.ui_locale": "en-CA",
  "com.securekey.vids.job_id": "d306f935-cb23-4a39-8acc-232eed539e1e"
}
{
  "sub": "4aa2e0dc889045edb251e584d1d3b7f8",
  "doc_type": "national_card",
  "source": "national_identity_card",
  "scan_result": "CLEAR",
  "given_name": "JOHN",
  "family_name": "DOE",
  "birthdate": "1965-03-03",
  "address": {
    "street_address": "4101 Yonge Street",
    "locality": "Toronto",
    "region": "ON",
    "postal_code": "M2P 1N6",
    "country": "CAN"
  },
  "doc_number": "123AA4567890",
  "issue_date": "2021-03-15",
  "expiry_date": "2031-03-15",
  "issuing_country": "CA",
  "issuing_authority": "ON",
  "nationality": "N/A",
  "dcn": "PC7654321",
  "acn": "0087654321",
  "com.securekey.verified.me.ui_locale": "en-CA",
  "com.securekey.vids.job_id": "d306f935-cb23-4a39-8acc-232eed539e1e"
}
{
  "sub": "4aa2e0dc889045edb251e584d1d3b7f8",
  "doc_type": "resident_permit",
  "source": "residence_permit",
  "scan_result": "CLEAR",
  "given_name": "JOHN",
  "family_name": "DOE",
  "birthdate": "1965-03-03",
  "address": {
    "street_address": "N/A",
    "locality": "N/A",
    "region": "N/A",
    "postal_code": "N/A",
    "country": "N/A"
  },
  "doc_number": "AA1234567",
  "issue_date": "N/A",
  "expiry_date": "2031-03-15",
  "issuing_country": "CA",
  "issuing_authority": "CA",
  "nationality": "USA",
  "dcn": "N/A",
  "acn": "N/A",
  "com.securekey.verified.me.ui_locale": "en-CA",
  "com.securekey.vids.job_id": "d306f935-cb23-4a39-8acc-232eed539e1e"
}
{
  "sub": "4aa2e0dc889045edb251e584d1d3b7f8",
  "doc_type": "indigenous_card",
  "source": "indigenous_card",
  "scan_result": "CLEAR",
  "given_name": "JOHN",
  "family_name": "DOE",
  "birthdate": "1965-03-03",
  "address": {
    "street_address": "N/A",
    "locality": "N/A",
    "region": "N/A",
    "postal_code": "N/A",
    "country": "N/A"
  },
  "doc_number": "110566685",
  "issue_date": "2021-03-15",
  "expiry_date": "2031-03-15",
  "issuing_country": "CA",
  "issuing_authority": "CA",
  "nationality": "N/A",
  "dcn": "N/A",
  "acn": "N/A",
  "com.securekey.verified.me.ui_locale": "en-CA",
  "com.securekey.vids.job_id": "d306f935-cb23-4a39-8acc-232eed539e1e"
}
{
  "sub": "4aa2e0dc889045edb251e584d1d3b7f8",
  "doc_type": "health_card",
  "source": "national_health_insurance_card",
  "scan_result": "CLEAR",
  "given_name": "JOHN",
  "family_name": "DOE",
  "birthdate": "1965-03-03",
  "address": {
    "street_address": "N/A",
    "locality": "N/A",
    "region": "N/A",
    "postal_code": "N/A",
    "country": "N/A"
  },
  "doc_number": "ZE000509",
  "issue_date": "2021-03-15",
  "expiry_date": "2031-03-15",
  "issuing_country": "CA",
  "issuing_authority": "ON",
  "nationality": "N/A",
  "dcn": "N/A",
  "acn": "N/A",
  "com.securekey.verified.me.ui_locale": "en-CA",
  "com.securekey.vids.job_id": "d306f935-cb23-4a39-8acc-232eed539e1e"
}
📘

Names come back in uppercase. They're read off the document, so expect DOE rather than Doe. Normalise before displaying or comparing.

These are all CLEAR results. For what a SUSPECTED or REJECTED response looks like, see Document verification and Fraud flags.

Issuing fields

FieldExampleNotes
issuing_countryCAISO 3166 alpha-2
issuing_authorityON, CAProvince for provincially issued documents, country otherwise
nationalityCAN, N/AISO 3166 alpha-3 where present
🚧

issuing_country uses two-letter codes (CA) while nationality uses three (CAN). Address country may also appear as CAN in some document responses. Don't assume one format across fields — normalise before comparing.

Related