Skip to Content
API and DashboardExample TemplatesIssuanceIssue ISO 18013-5 Mobile Driving License as mDoc

Issue ISO 18013-5 Mobile Driving License as mDoc

A Mobile Driving Licence (mDL) is the digital, phone-based equivalent of a physical driver’s license. It carries the holder’s identity and driving privilege data and can be presented both in person and online, with the verifier able to request only the attributes they need (for example just an age check). The credential follows the ISO/IEC 18013-5  standard, which defines the mDL doctype org.iso.18013.5.1.mDL, its data elements, and the mdoc presentation format used here.

Creating issuer root X509 certificate

Before you can create the credential template for mDL issuance, you need to set up an issuer root x509 certificate with a P-256 key.

The certificates guide contains detailed guidance on creating a certificate. We recommend creating your initial certificate through the dashboard.

Alternatively, if your issuer certificate needs to be signed by an external certificate authority, you can create a certificate signing request and import the externally signed certificate into Paradym.

Creating the credential template

We recommend creating this template through the API, as it allows you to exactly copy the payload as defined below. See Interacting with the API, the API reference for Create mDoc credential template , or the Issue credentials guide for more information on creating credential templates.

POST/v1/projects/{projectId}/templates/credentials/mdocOpen in Reference
{
  "name": "Mobile Driving Licence",
  "description": "Mobile driving licence (mDL) compliant with ISO/IEC 18013-5 standard",
  "issuer": {
    "signer": "certificate",
    "keyType": "P-256"
  },
  "background": {
    "color": "#F1F2F0",
    "url": "https://i.imgur.com/i2jlNk5.png"
  },
  "text": {
    "color": "#2F3544"
  },
  "validUntil": {
    "start": "issuance",
    "future": {
      "years": 1
    }
  },
  "type": "org.iso.18013.5.1.mDL",
  "attributes": {
    "org.iso.18013.5.1": {
      "type": "object",
      "properties": {
        "family_name": {
          "type": "string",
          "name": "Family Name",
          "description": "Last name, surname, or primary identifier of the mDL holder",
          "required": true
        },
        "given_name": {
          "type": "string",
          "name": "Given Name",
          "description": "First name(s), other name(s), or secondary identifier of the mDL holder",
          "required": true
        },
        "birth_date": {
          "type": "date",
          "name": "Date of Birth",
          "description": "Day, month and year on which the mDL holder was born (full-date format)",
          "required": true
        },
        "issue_date": {
          "type": "date",
          "name": "Date of Issue",
          "description": "Date when mDL was issued",
          "required": true
        },
        "expiry_date": {
          "type": "date",
          "name": "Date of Expiry",
          "description": "Date when mDL expires",
          "required": true
        },
        "issuing_country": {
          "type": "string",
          "name": "Issuing Country",
          "description": "Alpha-2 country code of the issuing authority's country or territory",
          "required": true
        },
        "issuing_authority": {
          "type": "string",
          "name": "Issuing Authority",
          "description": "Issuing authority name",
          "required": true
        },
        "document_number": {
          "type": "string",
          "name": "Licence Number",
          "description": "The number assigned or calculated by the issuing authority",
          "required": true
        },
        "portrait": {
          "type": "binary",
          "name": "Portrait of mDL Holder",
          "description": "A reproduction of the mDL holder's portrait (binary data)",
          "required": true
        },
        "driving_privileges": {
          "type": "array",
          "name": "Categories of Vehicles/Restrictions/Conditions",
          "description": "Driving privileges of the mDL holder",
          "required": true,
          "items": {
            "type": "object",
            "properties": {
              "vehicle_category_code": {
                "type": "string",
                "name": "Vehicle Category Code",
                "description": "Vehicle category code as per ISO/IEC 18013-1 Annex B",
                "required": true
              },
              "issue_date": {
                "type": "date",
                "name": "Privilege Issue Date",
                "description": "Date of issue for this driving privilege",
                "required": false
              },
              "expiry_date": {
                "type": "date",
                "name": "Privilege Expiry Date",
                "description": "Date of expiry for this driving privilege",
                "required": false
              },
              "codes": {
                "type": "array",
                "name": "Restriction/Condition Codes",
                "description": "Array of restriction/condition codes",
                "required": false,
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "name": "Code",
                      "description": "Code as per ISO/IEC 18013-2 Annex A"
                    },
                    "sign": {
                      "type": "string",
                      "name": "Sign",
                      "description": "Sign as per ISO/IEC 18013-2 Annex A"
                    },
                    "value": {
                      "type": "string",
                      "name": "Value",
                      "description": "Value as per ISO/IEC 18013-2 Annex A"
                    }
                  }
                }
              }
            }
          }
        },
        "un_distinguishing_sign": {
          "type": "string",
          "name": "UN Distinguishing Sign",
          "description": "Distinguishing sign of the issuing country according to ISO/IEC 18013-1",
          "required": true
        },
        "administrative_number": {
          "type": "string",
          "name": "Administrative Number",
          "description": "An audit control number assigned by the issuing authority",
          "required": false
        },
        "sex": {
          "type": "number",
          "name": "Sex",
          "description": "mDL holder's sex using values as defined in ISO/IEC 5218",
          "required": false
        },
        "height": {
          "type": "number",
          "name": "Height (cm)",
          "description": "mDL holder's height in centimetres",
          "required": false
        },
        "weight": {
          "type": "number",
          "name": "Weight (kg)",
          "description": "mDL holder's weight in kilograms",
          "required": false
        },
        "eye_colour": {
          "type": "string",
          "name": "Eye Colour",
          "description": "mDL holder's eye colour",
          "required": false
        },
        "hair_colour": {
          "type": "string",
          "name": "Hair Colour",
          "description": "mDL holder's hair colour",
          "required": false
        },
        "birth_place": {
          "type": "string",
          "name": "Place of Birth",
          "description": "Country and municipality or state/province where the mDL holder was born",
          "required": false
        },
        "resident_address": {
          "type": "string",
          "name": "Permanent Place of Residence",
          "description": "The place where the mDL holder resides and/or may be contacted",
          "required": false
        },
        "portrait_capture_date": {
          "type": "date",
          "name": "Portrait Image Timestamp",
          "description": "Date when portrait was taken",
          "required": false
        },
        "age_in_years": {
          "type": "number",
          "name": "Age Attestation: How Old Are You (in years)?",
          "description": "The age of the mDL holder",
          "required": false
        },
        "age_birth_year": {
          "type": "number",
          "name": "Age Attestation: In What Year Were You Born?",
          "description": "The year when the mDL holder was born",
          "required": false
        },
        "age_over_16": {
          "type": "boolean",
          "name": "Age Over 16",
          "description": "Whether mDL holder is 16 years old or older",
          "required": false
        },
        "age_over_18": {
          "type": "boolean",
          "name": "Age Over 18",
          "description": "Whether mDL holder is 18 years old or older",
          "required": false
        },
        "age_over_21": {
          "type": "boolean",
          "name": "Age Over 21",
          "description": "Whether mDL holder is 21 years old or older",
          "required": false
        },
        "age_over_25": {
          "type": "boolean",
          "name": "Age Over 25",
          "description": "Whether mDL holder is 25 years old or older",
          "required": false
        },
        "age_over_65": {
          "type": "boolean",
          "name": "Age Over 65",
          "description": "Whether mDL holder is 65 years old or older",
          "required": false
        },
        "issuing_jurisdiction": {
          "type": "string",
          "name": "Issuing Jurisdiction",
          "description": "Country subdivision code of the jurisdiction that issued the mDL (ISO 3166-2)",
          "required": false
        },
        "nationality": {
          "type": "string",
          "name": "Nationality",
          "description": "Nationality of the mDL holder as a two letter country code (alpha-2 code)",
          "required": false
        },
        "resident_city": {
          "type": "string",
          "name": "Resident City",
          "description": "The city where the mDL holder lives",
          "required": false
        },
        "resident_state": {
          "type": "string",
          "name": "Resident State/Province/District",
          "description": "The state/province/district where the mDL holder lives",
          "required": false
        },
        "resident_postal_code": {
          "type": "string",
          "name": "Resident Postal Code",
          "description": "The postal code of the mDL holder",
          "required": false
        },
        "resident_country": {
          "type": "string",
          "name": "Resident Country",
          "description": "The country where the mDL holder lives as a two letter country code",
          "required": false
        },
        "biometric_template_face": {
          "type": "binary",
          "name": "Biometric Template Face",
          "description": "Biometric template for facial recognition data",
          "required": false
        },
        "biometric_template_finger": {
          "type": "binary",
          "name": "Biometric Template Finger",
          "description": "Biometric template for fingerprint data",
          "required": false
        },
        "biometric_template_iris": {
          "type": "binary",
          "name": "Biometric Template Iris",
          "description": "Biometric template for iris recognition data",
          "required": false
        },
        "biometric_template_signature_sign": {
          "type": "binary",
          "name": "Biometric Template Signature/Sign",
          "description": "Biometric template for signature or sign recognition data",
          "required": false
        },
        "family_name_national_character": {
          "type": "string",
          "name": "Family Name in National Characters",
          "description": "The family name of the mDL holder using full UTF-8 character set",
          "required": false
        },
        "given_name_national_character": {
          "type": "string",
          "name": "Given Name in National Characters",
          "description": "The given name of the mDL holder using full UTF-8 character set",
          "required": false
        },
        "signature_usual_mark": {
          "type": "binary",
          "name": "Signature / Usual Mark",
          "description": "Image of the signature or usual mark of the mDL holder",
          "required": false
        }
      }
    }
  }
}

Issuing a sample credential

Once you have created the template, you can test the issuance with a sample credential. The creation of the credential template should have returned an id, make sure to set the value of credentialTemplateId to this id in the payload.

You can issue the credential using the Create OpenID4VC credential offer  endpoint. You can read more on using a credential template in the issue credentials guide.

To receive the credential, you can use the Paradym Wallet (see Integrating with a Holder Wallet).

POST/v1/projects/{projectId}/openid4vc/issuance/offerOpen in Reference
{
  "credentials": [
    {
      "credentialTemplateId": "<CREDENTIAL_TEMPLATE_ID>",
      "attributes": {
        "org.iso.18013.5.1": {
          "family_name": "van der Berg",
          "given_name": "Emma Charlotte",
          "birth_date": "1995-03-15",
          "issue_date": "2023-08-20",
          "expiry_date": "2033-08-20",
          "issuing_country": "NL",
          "issuing_authority": "RDW (Demo)",
          "document_number": "NL987654321",
          "portrait": "/9j/4AAQSkZJRgABAQAASABIAAD/4QBMRXhpZgAATU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAeKADAAQAAAABAAAAoAAAAAD/wAARCACgAHgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9sAQwAEBAQEBAQGBAQGCQYGBgkMCQkJCQwPDAwMDAwPEg8PDw8PDxISEhISEhISFRUVFRUVGRkZGRkcHBwcHBwcHBwc/9sAQwEEBQUHBwcMBwcMHRQQFB0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8+P/kWL/wCLr6Qoo52HKj5wXwH4tVgwseQc/wCti/8Ai6+j6KKTdxpWCiiipGf/2Q==",
          "driving_privileges": [
            {
              "vehicle_category_code": "B",
              "issue_date": "2013-03-20",
              "expiry_date": "2033-08-20"
            },
            {
              "vehicle_category_code": "AM",
              "issue_date": "2011-03-15",
              "expiry_date": "2033-08-20"
            }
          ],
          "un_distinguishing_sign": "NL",
          "administrative_number": "ADM2023080012345",
          "sex": 2,
          "height": 168,
          "weight": 62,
          "eye_colour": "blue",
          "hair_colour": "blond",
          "birth_place": "Amsterdam, Netherlands",
          "resident_address": "Prinsengracht 263, 1016 GV Amsterdam",
          "portrait_capture_date": "2024-08-30",
          "age_in_years": 30,
          "age_birth_year": 1995,
          "age_over_16": true,
          "age_over_18": true,
          "age_over_21": true,
          "age_over_25": true,
          "age_over_65": false,
          "nationality": "NL",
          "resident_city": "Amsterdam",
          "resident_state": "Noord-Holland",
          "resident_postal_code": "1016 GV",
          "resident_country": "NL",
          "family_name_national_character": "van der Berg",
          "given_name_national_character": "Emma Charlotte"
        }
      }
    }
  ]
}

Presentation template

If you want to verify a mDL credential, use the presentation template payload, or select it as a pre-made template in the dashboard.

Last updated on