Skip to main content

Card Templates

Card templates define how credentials issued through the platform are displayed in wallets.
While credentials contain the signed data, templates describe how that data should be presented to the user, including layout, branding, and which claims are visible on the card.

Templates allow issuers to customize the visual appearance of credentials without requiring updates to the wallet application.

Template Metadata

A card template is defined by a JSON document that instructs the wallet how to render a credential.

Templates describe:

  • layout structure
  • branding
  • field mappings
  • display labels
  • supported assets

The wallet combines the template metadata with the credential claims to render the card.


Template Metadata Structure

PropertyTypeRequiredDescription
vctstringyesThe credential type this template applies to
displayNamestringyesHuman-readable name of the card
layoutstringyesLayout used to render the card
brandingobjectnoVisual styling for the card
fieldsarrayyesMapping of credential claims to card UI slots
descriptionstringnoOptional description of the card
versionstringnoTemplate version identifier

Example Template Metadata

{
"vct": "com.platform.customerA.membership.v1",
"displayName": "Customer A Membership Card",
"layout": "photo_list",
"branding": {
"logoUrl": "https://example.com/assets/customerA/logo.png",
"backgroundColor": "#1E3A8A",
"textColor": "#FFFFFF",
"accentColor": "#FBBF24"
},
"fields": [
{
"slot": "photo",
"claim": "photo"
},
{
"slot": "hero",
"claim": "fullName",
"label": "Name"
},
{
"slot": "row1",
"claim": "membershipId",
"label": "Member ID"
},
{
"slot": "row2",
"claim": "tier",
"label": "Tier"
},
{
"slot": "row3",
"claim": "expiryDate",
"label": "Valid Until"
}
]
}

Template Examples

Below are examples of supported card template layouts.

Template 1

Template 2

Template 3

Template 4


Layout

The layout property defines the structural arrangement of the card.

Layouts determine how slots are arranged visually.

Supported layouts may include:

LayoutDescription
photo_heroPhoto with a large highlighted value
photo_listPhoto with stacked data fields
list_highlightData rows with highlighted field
simple_listText-only card layout

The wallet rendering engine implements these layouts.


Branding

The branding section defines the visual appearance of the card.

Branding may include:

PropertyDescription
logoUrlIssuer logo displayed on the card
backgroundColorCard background color
backgroundImageOptional background image
textColorPrimary text color
accentColorHighlight color

Example:

"branding": {
"logoUrl": "https://example.com/assets/logo.png",
"backgroundColor": "#1E3A8A",
"textColor": "#FFFFFF",
"accentColor": "#FBBF24"
}

Field Mapping

The fields section maps credential claims to UI slots in the template.

Each field object contains:

PropertyRequiredDescription
slotyesUI position within the layout
claimyesClaim name in the credential
labelnoDisplay label shown in the wallet

Example:

{
"slot": "row1",
"claim": "membershipId",
"label": "Member ID"
}

The wallet retrieves the claim value from the credential and renders it in the specified slot.


Supported Slots

Templates use predefined UI slots supported by the wallet renderer.

SlotDescription
photoCardholder image
logoIssuer
TitleCard title
row1First data row
row2Second data row
row3Third data row
row4Fourth data row
footerFooter information

Available slots may vary depending on the selected layout.


Template Versioning

Templates are versioned using the vct.

Example:

com.platform.customerA.membership.v1
com.platform.customerA.membership.v2

Versioning allows:

  • design updates
  • layout changes
  • new fields
  • backwards compatibility for previously issued credentials

When making major layout changes, create a new template version.


Best Practices

Keep credentials as the source of truth

Templates should only control presentation, not credential data.

Use consistent claim names

Use consistent claim names across credentials to simplify field mapping.

Version templates carefully

Avoid modifying the layout of an existing template version used by issued credentials.

Keep layouts simple

Limit layouts to supported structures to ensure consistent rendering across wallets.


Summary

Templates allow issuers to control how credentials appear in wallets without modifying the wallet application.

Key principles:

  • Credentials contain verifiable data
  • Templates define visual presentation
  • Wallets render cards using template metadata