Receive a verifiable presentation

After you had sent the verification request to the holder, they will either scan the QR, click the deeplink or open the MATTR VII message notifications to open their digital wallet and show the verification request screen. This screen shows the information that will be shared with the verifier and enables the holder to consent by selecting SEND CREDENTIAL:

https://www.datocms-assets.com/38428/1667764511-digital-wallets_info-request_new-ui.png?auto=format

The information is sent in a verifiable presentation format of the following structure to the configured callbackUrl:

json
Copy to clipboard.
1{
2    "presentation": {
3        "@context": [
4            "https://www.w3.org/2018/credentials/v1"
5        ],
6        "type": [
7            "VerifiablePresentation"
8        ],
9        "verifiableCredential": [
10            {
11                "@context": [
12                    "https://www.w3.org/2018/credentials/v1",
13                    "https://schema.org"
14                ],
15                "type": [
16                    "VerifiableCredential",
17                ],
18                "issuer": {
19                    "id": "did:web:governmentofkakapo.com",
20                    "name": "Government of Kakapo"
21                },
22                "issuanceDate": "2020-08-30T23:24:54.876Z",
23                "credentialSubject": {
24                    "id": "did:key:z6MkfxQU7dy8eKxyHpG267FV23agZQu9zmokd8BprepfHALi",
25                    "givenName": "Chris",
26                    "familyName": "Shin",
27                    "dateOfBirth": "01.03.1985"
28                },
29                "proof": {
30                    "type": "Ed25519Signature2018",
31                    "created": "2020-08-30T23:24:55Z",
32                    "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..BSHdalZrYml0slwgAXFVF5uAcg2DbPMfwatturKs8TnuxBxylQDnS3JkORORVmO73Ruh7h8KJvVvHO4pE5NsCQ",
33                    "proofPurpose": "assertionMethod",
34                    "verificationMethod": "did:key:z6MkndAHigYrXNpape7jgaC7jHiWwxzB3chuKUGXJg2b5RSj#z6MkndAHigYrXNpape7jgaC7jHiWwxzB3chuKUGXJg2b5RSj"
35                }
36            }
37        ],
38        "id": "335032c1-0f8b-405e-9740-44928237e06c",
39        "holder": "did:key:z6MksMYtQSvQsfk3KZy7vxBzjcBJhx1i7TaLuvJePPPDEAjH",
40        "proof": {
41            "type": "Ed25519Signature2018",
42            "created": "2020-12-08T20:12:18Z",
43            "challenge": "e1b35ae0-9e0e-11ea-9bbf-a387b27c9e60",
44            "domain": "global.mattr.wallet",
45            "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MfVEy102c4oZA_G98G6HUxEmfXFLEIWbX9C36zF_cA-D8EF8jRMQWc5eJpMn3hgLm2xhPw8GzTrnwPHa37L-DA",
46            "proofPurpose": "authentication",
47            "verificationMethod": "did:key:z6MksMYtQSvQsfk3KZy7vxBzjcBJhx1i7TaLuvJePPPDEAjH#z6MksMYtQSvQsfk3KZy7vxBzjcBJhx1i7TaLuvJePPPDEAjH"
48        }
49    }
50}

Once the user has replied to the presentation request, it is deleted from your MATTR VII tenant. Hence, you can only use a presentation request once.

Verifying the verifiable presentation

Once a valid presentation is received, MATTR VII performs the following checks to ensure the validity of the verifiable presentation:

  • Issuer DID of each credential can be resolved.

  • JSON-LD context is valid for subject claims.

  • Proof is valid indicating the credential has not been tampered with.

  • Check any credential against its RevocationList2020 status (where applicable).

The results of these checks are passed to the configured reply_url in a format of the following structure:

json
Copy to clipboard.
1{
2  "presentationType": "QueryByExample",
3  "challengeId": "GW8FGpP6jhFrl37yQZIM6w",
4  "claims": {
5    "id": "did:key:z6MkfxQU7dy8eKxyHpG267FV23agZQu9zmokd8BprepfHALi",
6    "givenName": "Chris",
7    "familyName": "Shin",
8    "dateOfBirth": "01.03.1985"
9  },
10  "verified": true,
11  "holder": "did:key:z6MkgmEkNM32vyFeMXcQA7AfQDznu47qHCZpy2AYH2Dtdu1d",
12  "presentation": {
13    "@context": [
14      "https://www.w3.org/2018/credentials/v1"
15    ],
16    "type": [
17      "VerifiablePresentation"
18    ],
19    "verifiableCredential": [
20      {
21        "@context": [
22          "https://www.w3.org/2018/credentials/v1",
23          "https://w3id.org/security/bbs/v1",
24          "https://w3id.org/vc-revocation-list-2020/v1",
25          "https://mattr.global/contexts/vc-extensions/v2",
26          "https://schema.org"
27        ],
28        "id": "urn:bnid:_:c14n0",
29        "type": [
30          "Passport",
31          "VerifiableCredential"
32        ],
33        "description": "Passport of the Government of Kakapo",
34        "name": "Passport",
35        "credentialStatus": {
36          "id": "https://YOUR_TENANT_URL/core/v1/revocation-lists/957b46e1-98c7-4f47-ba35-2420d777dcdb#0",
37          "type": "RevocationList2020Status",
38          "revocationListCredential": "https://YOUR_TENANT_URL/core/v1/revocation-lists/957b46e1-98c7-4f47-ba35-2420d777dcdb",
39          "revocationListIndex": "0"
40        },
41        "credentialBranding": {
42        "backgroundColor": "#f0f9ff",
43        "watermarkImageUrl": "https://i.imgur.com/d9HrmRM.png"
44        },
45        "credentialSubject": {
46          "id": "did:key:z6Mkhpgax4YwewHSNVeYR2DhUjWE2jbrD7n567VTfEyqnzvM",
47          "familyName": "Shin",
48          "givenName": "Chris",
49          "dateOfBirth": "01.03.1985"
50        },
51        "issuanceDate": "2023-05-01T23:38:21.766Z",
52        "issuer": {
53          "id": "did:web:governmentofkakapo.com"
54          "name": "Government of Kakapo"
55        },
56        "proof": {
57          "type": "BbsBlsSignatureProof2020",
58          "created": "2023-05-01T23:38:22Z",
59          "nonce": "Ps46iK6YtvISRPswuSGKqLL79RmAKOXb4+BoZEBA3xoLKbRJTZO5BEwpITlcCzzu8hw=",
60          "proofPurpose": "assertionMethod",
61          "proofValue": "ABY//M+suYngqMhAq5M0WNJ8izPF98uEC9Ooli80eD6BIGL/wv6o8ADs8DxtC7SHa3u0O1C2m8LfOYsVnkcE19sXUHv1P/3DW1r9MTCjBRRbPn2IcDKPQF/PiTMgcFApV+olwzuB+xuCuFqHHbMEyNM0r2h55ZYlrndbz/x939fncI9ObGSYK0Zvspg/zEKhZG8YXPkAAAB0l8UU/27di6liE3VB5gvaehL5LneRrTe8xh4Ir9pamhDqwatG2yf/q/RPGL+1qNFSAAAAAik9SSVpvQM+1KVVmdp4zNPsHbn3925k4vLd+YBcKBdoRu+ed2l/JbzqXbrx8hqYHiNEnJh+fYIjgkme0qAYAL6rVXvcnmQnB6H0MdoBnHvOy2sy0pj9+dnYk8s7Ao04vi8g/R6j8MHn5YZxObPPmAgAAAAGEsf+rf8Kw1azQoQ5q19AkSRBiWmvcdQgfyrFRIajx1UplndnAMaOn2KW2Vt6Mo8mdA5NtbR7gZWEUfGaFjKTFgZ4nnhxQmL0ovgo6pxFj8my3lWokGdWrvbuNvzgNtqWcHJ6Pv70Z2kDvoj/Dj3c+yCiGqjZ5Rv1pqIyYXO8Fetd6woO8CtxtvA2y9oVA2quUR68BRYEbtuxV3Q9OicyCjTBMJkwRJAW63RP/FBegbomW/MoX1ZKarQZe0Ueozzj",
62          "verificationMethod": "did:key:zUC7GUZCtnybMRbvBR1K2AexwMnBftUUGHyweWBjgvqY5GHMrkSFHmUqGyNLFUSphZcY8pCiFNykBsdnBRnmR2LBeut7Y3g5f3XvYuT7n8GetW3b6fZiHDRfGAkLzXg4GBiqizk#zUC7GUZCtnybMRbvBR1K2AexwMnBftUUGHyweWBjgvqY5GHMrkSFHmUqGyNLFUSphZcY8pCiFNykBsdnBRnmR2LBeut7Y3g5f3XvYuT7n8GetW3b6fZiHDRfGAkLzXg4GBiqizk"
63        }
64      }
65    ],
66    "holder": "did:key:z6Mkjajnoc1pMnqqPFsok75PzxCARfeNqtAyunmQ5HDRG619",
67    "proof": [
68      {
69        "type": "Ed25519Signature2018",
70        "created": "2023-05-01T23:41:32Z",
71        "challenge": "7TiSFJcKHdIkrm7w84904",
72        "domain": "YOUR_TENANT_URL",
73        "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..VGzuZRy0k9r_U_pgwbEJE0USsBa97-KY0pPOuKw2JCOzUCuASQ5yaP3n-d_xXyUeybJaMAkAo9haqa9VQd0MAw",
74        "proofPurpose": "authentication",
75        "verificationMethod": "did:key:z6Mkhpgax4YwewHSNVeYR2DhUjWE2jbrD7n567VTfEyqnzvM#z6Mkhpgax4YwewHSNVeYR2DhUjWE2jbrD7n567VTfEyqnzvM"
76      }
77    ],
78    "credentials": [
79      {
80        "@context": [
81          "https://www.w3.org/2018/credentials/v1",
82          "https://w3id.org/security/bbs/v1",
83          "https://w3id.org/vc-revocation-list-2020/v1",
84          "https://mattr.global/contexts/vc-extensions/v2",
85          "https://schema.org"
86        ],
87        "type": [
88          "CourseCredential",
89          "VerifiableCredential"
90        ],
91        "description": "Passport of the Kingdom of Kakapo",
92        "name": "Passport",
93        "credentialStatus": {
94          "id": "https://YOUR_TENANT_URL/core/v1/revocation-lists/957b46e1-98c7-4f47-ba35-2420d777dcdb#0",
95          "type": "RevocationList2020Status",
96          "revocationListCredential": "https://YOUR_TENANT_URL/core/v1/revocation-lists/957b46e1-98c7-4f47-ba35-2420d777dcdb",
97          "revocationListIndex": "0"
98        },
99        "credentialSubject": {
100          "familyName": "Shin",
101          "givenName": "Chris"
102        },
103        "issuer": {
104          "id": "did:web:governmentofkakapo.com",
105          "name": "Government of Kakapo"
106        },
107        "credentialBranding": {
108          "backgroundColor": "#f0f9ff",
109          "watermarkImageUrl": "https://i.imgur.com/d9HrmRM.png"
110        }
111      }
112    ]
113  }
114}
  • verified: This boolean is informed by the checks performed by MATTR VII to validate the verifiable presentation.

  • The respone payload includes both the presentation and credentials objects, each containing the list of Verifiable Credentials selected by the holder:

    • presentation includes the original presentations retrieved from the wallet, including the proof for each credential.

    • credentials includes data extracted from the presentation request.

    You can use either object based on your implementation.

As recommended, the callback URL should contain a secret unique identifier provided by your application. At this point your application logic should verify its authenticity.