Skip to main content
The HTML SDK is a lightweight script that exposes a global Vouchmark object. Use it when you don’t have a framework or want the simplest possible integration.

Installation

Add the script to your page’s <head> or before the closing </body>:
The script is ~12 KB gzipped and loads asynchronously so it won’t block rendering.

Quick start

Configuration options

Methods

Vouchmark.open(config)

Opens the widget overlay. If the widget is already open, this is a no-op.

Vouchmark.close()

Programmatically closes the widget. Triggers onAbandon if the flow was not yet complete.

Vouchmark.isReady()

Returns true once the script has loaded and is ready to open.

Signed sessions (optional)

If you enabled Require signed requests in the widget security settings, you must generate a sessionToken on your server before opening the widget:
Then pass it client-side:

Content Security Policy

If your site uses a strict CSP, add these directives:

Browser support

The widget supports all modern browsers (Chrome, Firefox, Safari, Edge) and degrades gracefully on older browsers. IE11 is not supported.