Skip to main content

How it works

The Imprint Web SDK renders the application experience inside an <iframe> that the SDK injects into the container on your page. Everything the cardholder sees and interacts with — the application flow, and any redirect-based flows such as Account Linking — is loaded within that iframe.
Because the experience runs inside an iframe, every page the cardholder is redirected to must be allowed to render in a frame. If any page in a redirect chain returns an X-Frame-Options: DENY (or SAMEORIGIN) header, or a Content-Security-Policy frame-ancestors directive that excludes Imprint’s origin, the browser will refuse to display it and the flow will break — typically with a blank frame and no error the SDK can surface.This most commonly affects the Account Linking OAuth flow, where the cardholder is redirected to your login/authorization page. See Account Linking → Framing requirements for the exact requirements.
This framing constraint applies only to the Web SDK. The iOS and Android SDKs present the experience in a native view (not an iframe), so X-Frame-Options / CSP frame-ancestors headers do not affect them.

Installation

1

Load the Imprint script

Include the Imprint script either at index.html or the page on which you plan on loading the Imprint application. It must always be loaded directly from the URL below, rather than included in a bundle or hosted yourself.
2

Add a container to your page

Create a container for the Imprint application.
Imprint application requires a minimum width of 375px.
3

Display the card application experience

The script exposes the global Imprint object. Imprint.create() initializes the UI flow and accepts a configuration object with an optional callback function and additional data fields.Imprint.create() needs to be initialized with a client_secret (generated by Creating a Customer Session).The configuration object accepts an optional onCompletion callback function, which is triggered at the end of the application flow in different scenarios. Please refer to the full list of onCompletion parameter options below.Example Implementation:

Reference

Imprint.create() ~ Configuration Object Fields: onCompletion ~ Callback result values: onCompletion ~ Callback data object fields: