Format as a QR Code

This guide will show you how to format your credentials as a QR code.


You need the following in order to proceed with this tutorial: 


Make the following request to format a Compact Credential as a QR code:

Copy to clipboard.
1POST https://YOUR_TENANT_URL/v2/credentials/compact/qrcode

You can make a similar request to a different endpoint to format a Compact Semantic Credential as a QR code:

Copy to clipboard.
1POST https://YOUR_TENANT_URL/v2/credentials/compact-semantic/qrcode

Request body

Copy to clipboard.
3  "width": 800
  • payload: Use the encoded element from the response obtained when creating the Compact Credential.

  • width: Optionally specify the desired width of the output QR code. When no width is specified MATTR VII will generate a QR code with an optimised width based on the size of the payload. Maximal value is 1000px.


The response include a QR code as a PNG file. This QR code contains the encoded credential.

If the provided payload is invalid, the API will return an error:

  • 400:

    • Payload is not a string.

    • Payload does not match a Compact Credential profile.

    • Generated QR code is larger than the provided width.

  • 413:

    • The payload is too large to be stored in a QR code.

What's next?

Now that you have the credential formatted as a QR code, you can share it using your selected communication channel (e.g. e-mail, messaging platform, etc.).