Docs
Template Spec v1
A template is a single JSON document. Admins upload it in Admin → Templates; it's validated against this spec. When a store owner customizes a template, the saved card config uses the same shape plus businessName — that's what your wallet API server receives.
Example
{
"specVersion": 1,
"punches": {
"default": 10, "min": 4, "max": 20,
"layout": "grid", // "grid" | "row"
"stampIcon": "coffee" // built-in icon name or https URL to an SVG
},
"colors": { // all #RRGGBB
"background": "#5A3221",
"foreground": "#FFFFFF",
"label": "#E8CDB5",
"stampFilled": "#FFFFFF",
"stampEmpty": "#7A4A35"
},
"assets": {
"logo": "slot", // "slot" = store owner uploads; or https URL
"strip": "slot"
},
"content": {
"title": "Loyalty Card",
"reward": "Free coffee",
"description": "Collect {{punches_required}} stamps, get a {{reward}}",
"terms": "One stamp per visit."
},
"editable": ["colors.*", "assets.logo", "assets.strip",
"punches.default", "punches.stampIcon", "content.*"]
}Fields
style(optional):"standard"(default) or"photoBlend"— the strip/hero image fades into a background color sampled from the photo's edge, giving a full-image look. Wallet server should render the fade into the strip image and set the pass background tocolors.background. Full-card background photos are not supported on Apple store cards or Google loyalty cards.wallet(optional) — wallet-server styling. Wallet cards allow at most 12 stamps.stampIcon:{ source: "wallet" | "vepunch" | "upload", name?, url? }— a built-in wallet icon name, or a public PNG URL (Vepunch icons and uploads). Exactly one ofstampIcon/stampIconUrlreaches the wallet.design:{ preset, stampShape?: "circle" | "rounded" | "none", stampPanel?: "frosted" | "none", rewardIcon?: wallet icon name | null, googleLogo?: "auto" | "wide" | "circle", showQr?: boolean, custom? }(googleLogo defaults to \"auto\"; showQr defaults to true).colors.stampFilledis sent asdesign.iconColor.badgeColor: #RRGGBB behind each stamp (design.badgeColor).emptyColor/emptyIconUrl: tint for empty stamps, sent asstampEmptyIconUrl. Unset = faded copy of the filled icon.autoColors: photo blend only, default true — the wallet picks colours from the banner and the card colours are not sent.
apple.fullPhoto(optional, iPhone iOS 27+):{ enabled, backgroundImageUrl?, label? (≤20), value? (≤30), tagline? (≤40) }. Sent asdesign.applePoster,design.posterLabel,design.posterValue,design.posterTaglineand top-levelappleBackgroundImageUrl(falls back to the strip photo). Disabled sendsdesign.applePoster: false. Older iPhones and Google Wallet show the normal card, so the strip photo stays required.locations(optional, ≤10):[{ name (≤60, merchant-only), latitude (-90..90), longitude (-180..180), message? (≤100) }]. Sent to the wallet server as top-levellocationswithmessagenull when empty; always included on update,[]clears them.punches.min/max: range the owner can pick from (max 30).defaultmust be within range.colors: five required hex colors. Ensure foreground contrasts with background (4.5:1).assets:"slot"means the owner uploads. Logo 480×150 PNG, strip 1125×432 PNG, icon 87×87 PNG.content: text fields; may contain tokens.editable: dot paths the owner may change..*unlocks a whole group. Anything not listed is locked.
Tokens
{{business_name}}, {{reward}}, {{punches_required}}, {{punches_earned}}
Built-in stamp icons
coffee, croissant, scissors, pizza, citrus, star, heart, cake-slice, ice-cream-cone, sandwich, dumbbell, paw-print
