Format Compact Credential as a PDF

This guide will show you how to format your Compact or Compact Semantic Credentials as a PDF document.


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

  • Access to MATTR VII APIs. If you’re experiencing any difficulties, contact us.

  • The payload of a signed Compact or Compact Semantic Credential.

  • A PDF template: This is used by MATTR VII to format the different information from the credential into a PDF document.


Make the following request to format a Compact Credential as a PDF document:

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

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

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

Request body

Copy to clipboard.
2  "templateId": "ccad3b98-7086-4556-9e19-9e2aa6ca5c5b",


The response includes a PDF document displaying information from the credential in accordance with the used PDF template.

Bad request (400) Errors may occur in the following scenarios:

  • Payload is not a string.

  • Payload does not match a Compact Credential profile.

  • The credential has expired.

  • Unable to validate or decode the payload.

  • The PDF template does not exist.

  • The provided template.pdf file doesn't contain a QR code button field.

  • The decoded payload doesn't include a required claim.

What's next?

Now that you have the Compact or Semantic Credential formatted as a PDF document, you can share it using your selected communication channel (e.g. e-mail, messaging platform, etc.).