Data structure

Signed JSON credential payload

Let’s look into the structure of a signed JSON credential issued by a MATTR VII tenant:

JSON
{
    "id": "b955f2f1-2ea7-4225-a74e-4111094074be",
    "tag": "external-identifier",
    "credential": {
        "id": "b955f2f1-2ea7-4225-a74e-4111094074be",
        "type": ["VerifiableCredential", "EducationalOccupationalCredential", "AlumniCredential"],
        "issuer": {
            "id": "did:web:learn.vii.au01.mattr.global",
            "name": "Zealopia Business Institute",
            "logoUrl": "https://static.mattr.global/credential-assets/zealopia/web/icon.svg",
            "iconUrl": "https://static.mattr.global/credential-assets/zealopia/web/logo.svg"
        },
        "name": "Course credential",
        "description": "This credential shows that the person has attended the mention course and attained the relevant awards.",
        "credentialBranding": {
            "backgroundColor": "#6303FF",
            "watermarkImageUrl": "https://static.mattr.global/credential-assets/zealopia/web/watermark.svg"
        },
        "issuanceDate": "2024-01-10T22:54:57.083Z",
        "expirationDate": "2025-02-01T08:12:38.156Z",
        "credentialSubject": {
            "id": "did:key:z6Mkr9f7o82NFLRFTTCWRR1GiZpca22Xf6YKo2zKThrZMA2w",
            "givenName": "Emma",
            "familyName": "Tasma",
            "alumniOf": "Zealopia University"
        },
        "@context": [
            "https://www.w3.org/2018/credentials/v1",
            "https://w3id.org/vc-revocation-list-2020/v1",
            "https://mattr.global/contexts/vc-extensions/v2"
        ],
        "credentialStatus": {
            "id": "https://learn.vii.au01.mattr.global/core/v2/credentials/web-semantic/revocation-lists/1fd271b0-55be-4c48-8da0-f4bda929947f#1",
            "type": "RevocationList2020Status",
            "revocationListIndex": "1",
            "revocationListCredential": "https://learn.vii.au01.mattr.global/core/v2/credentials/web-semantic/revocation-lists/1fd271b0-55be-4c48-8da0-f4bda929947f"
        },
        "proof": {
            "type": "Ed25519Signature2018",
            "created": "2024-01-10T22:54:57Z",
            "verificationMethod": "did:web:learn.vii.au01.mattr.global#Fo5mW6ivUV",
            "proofPurpose": "assertionMethod",
            "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..NgQKScBviBxYE0M2lCS4x8dDZI-eMPo_bMEXyldYGM5k0uh29c0YbgW6xbvzaaioUjbHr3ZUUlq2E8TcOOA9Bg"
        }
    },
    "credentialStatus": {
        "id": "https://learn.vii.au01.mattr.global/core/v2/credentials/web-semantic/revocation-lists/1fd271b0-55be-4c48-8da0-f4bda929947f#1",
        "type": "RevocationList2020Status",
        "revocationListIndex": "1",
        "revocationListCredential": "https://learn.vii.au01.mattr.global/core/v2/credentials/web-semantic/revocation-lists/1fd271b0-55be-4c48-8da0-f4bda929947f"
    }
}
  • id : Unique identifier of this JSON credential. This can be used to retrieve its information from the credential registry or to change its revocation status.

  • tag : JSON credentials can be tagged when they are issued, and these tags can later be used when querying the credential registry.

  • credential: This object includes all the signed credential payload:

    • id : The JSON credential unique identifier is signed as part of the credential payload.

    • type : This array of credential types indicates what sort of information a credential holds. MATTR VII automatically injects VerifiableCredential as the first value of this array. At least one additional value must exist in the array to differentiate this credentials from other JSON credentials.

    • issuer : Includes information regarding the credential’s issuer (the entity which attests the claims in the credential):

      • id : The DID that identifies the credential’s issuer.
      • name : Issuer’s name.
      • logoURL : URL for a logo that is displayed on the bottom part of the credential. If no logo is provided, the issuer’s name and iconURL are used instead.
      • iconURL : URL for an icon that is displayed next to the issuer’s name when the credential is offered to the holder. It is also displayed next to the issuer’s name on the bottom part of the credential when logoURL is not provided. When iconURL is not provided, the first letter from name is used instead.
    • name : Credential name, displayed on the top part of the credential in the holder’s digital wallet.

    • description : Credential description, displayed below the name field on the credential in the holder’s digital wallet.

    • credentialBranding : Credential branding properties:

      • backgroundColor : Colour hex code used as the credential background color in the holder’s digital wallet.
      • watermarkImageUrl : URL for a watermark image included as a pattern on the credential in the holder’s digital wallet. If no watermark image is provided, a wave pattern is applied to the credentials by default.
    • issuanceDate : Indicates the date and time when the credential becomes valid.

    • expirationDate : Indicates the date and time after which the credential is not considered valid and cannot be verified.

    • credentialSubject : Includes information regarding the credential’s subject:

      • id : The DID that identifies the holder and is associated with their digital wallet. This is what binds this credential to a specific holder.
      • givenName : This is an example for a custom claim that can be signed as part of the credential payload.
      • familyName : This is an example for a custom claim that can be signed as part of the credential payload.
      • educationalCredentialAwarded : This is an example for a custom claim that can be signed as part of the credential payload.
    • @context : Defines the contexts for claims included in the credential. Any JSON credential issued by a MATTR VII tenant will always include the following contexts, which reference the W3C Verifiable Credential definitions:

    If you require introducing different contexts in your production implementation, please contact us. Referenced contexts must be whitelisted or credential issuance will fail. In-line context definitions are not supported and would also result in an error.

    • credentialStatus : When the JSON credential is issued as a revocable credential, this element includes information that enables retrieving and updating its revocation status.
    • proof : Includes information regarding the encryption algorithm used to sign the credential and how it can be verified.
  • credentialStatus : This is identical to the credentialStatus object included in the signed payload, and makes revocation status available as part of the credential metadata.

Branded JSON credential

The following image depicts how the credential above would look like in the holder’s digital wallet:

Branded JSON credential