PayNow

WebstoreTemplatePreviewResponseDto

Represents the data the editor uses to preview a template.

templateWebstoreTemplatePreviewDtoRequired
Represents a template compiled and ready to render.
compatibilityModeenumRequired
Specifies the dialect a webstore template is written in.
Possible enum values
  • invalid

    No compatibility mode specified. This value is typically used as a default or uninitialized state.

  • paynow

    A native PayNow template.

  • tebex

    A template written for Tebex, rendered through a compatibility layer so it works without changes.

compiledWebstoreTemplateCompiledFileDto[]Required
The template's files after compilation, including any that failed to compile.
content_typestringRequired
The MIME type of the file.
file_namestringRequired
The name of the file within the template.
compiledstringOptional
The compiled output of the file, or null when compilation failed.
errorstringOptional
The error compilation raised, or null when the file compiled successfully.
compiled_atstringRequired
The date and time the template was compiled.
schemaWebstoreTemplateSchemaDtoOptional
Represents a template's schema, declared by its author: who maintains it, how it receives updates and the settings a store can configure without editing the template's files.
authorstringRequired
The name of the template's author.
configWebstoreTemplateSchemaSectionDto[]Required
The sections of settings the template exposes, in display order.
→ WebstoreTemplateSchemaSectionDto
support_emailstringOptional
The email address to contact for support with the template, or null when none is given.
support_urlstringOptional
The URL to visit for support with the template, or null when none is given.
updatesWebstoreTemplateSchemaUpdatesDtoOptional
→ WebstoreTemplateSchemaUpdatesDto
variablesWebstoreTemplatePreviewVariablesDtoRequired
Represents the variable values a template preview renders with.
saved_atstringRequired
The date and time the variable values were last saved.
variablesWebstoreTemplateVariableDto[]Required
The template's variables and their current values.
idFlakeIdRequired
created_atstringRequired
The date and time the variable was created.
namestringRequired
The label shown for the variable in the editor.
template_idFlakeIdRequired
typeenumRequired
Specifies how a template variable's 'value' is interpreted when the template renders.
Possible enum values
  • invalid

    No type specified. This value is typically used as a default or uninitialized state.

  • string

    The value is used as plain text.

  • html

    The value is inserted as raw HTML without escaping.

  • number

    The value is parsed as a number.

  • boolean

    The value is parsed as a boolean; 'true' is true, anything else is false.

  • json

    The value is parsed as a JSON document.

updated_atstringRequired
The date and time the variable was last updated.
valuestringRequired
The value of the variable, always stored as a string and parsed according to 'type' when the template renders.
variablestringRequired
The name the template's files reference the value by.
webstore_idFlakeIdRequired
Example
{
  "template": {
    "compatibilityMode": "invalid",
    "compiled": [
      {
        "content_type": "string",
        "file_name": "string",
        "compiled": "string",
        "error": "string"
      }
    ],
    "compiled_at": "2024-01-01T00:00:00Z",
    "schema": {
      "author": "string",
      "config": [
        {
          "header": "string",
          "options": [
            {
              "id": "string",
              "name": "string",
              "nested_options": [
                {}
              ],
              "type": "string",
              "values": [
                "string"
              ],
              "default": {},
              "description": "string",
              "max": 0,
              "min": 0,
              "multiline": true,
              "numeric": true
            }
          ]
        }
      ],
      "support_email": "string",
      "support_url": "string",
      "updates": {
        "github_branch": "string",
        "supported": true,
        "version_check_supported": true,
        "github_token": "string",
        "github_url": "string",
        "version": "string"
      }
    }
  },
  "variables": {
    "saved_at": "2024-01-01T00:00:00Z",
    "variables": [
      {
        "id": "411486491630370816",
        "created_at": "2024-01-01T00:00:00Z",
        "name": "string",
        "template_id": "411486491630370816",
        "type": "invalid",
        "updated_at": "2024-01-01T00:00:00Z",
        "value": "string",
        "variable": "string",
        "webstore_id": "411486491630370816"
      }
    ]
  }
}