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

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