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.

<script src="https://apply.imprint.co/imprintsdk.js"></script>
2

Add a container to your page

Create a container for the Imprint application.

<div id="imprint-ui" />

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) and a partner_reference (provided by the Imprint team).

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:

Imprint.create({
 client_secret: "QzMyNzg4QzgtNEUwOS00QkU4LThDMjEtMkU5OUQ3QzkwRDhGCg==",
 partner_reference: "S00QkU4NEUwO",
 selector: "#imprint-ui", // reference to your container
 onCompletion: (result, data) => {
   switch (result) {
     case "OFFER_ACCEPTED":
       // Implement logic for new approved cardholders
       console.log("Offer accepted, data:", data);
       break;
     case "REJECTED":
       // Implement logic for rejected applications
       console.log("Rejected, data:", data);
       break;
     case "IN_PROGRESS":
       // Implement logic for abandoned applications
       console.log("Abandoned, data:", data);
       break;
     case "ERROR":
       // Implement error handling
       console.log("Error occurred:", data);
       break;
   }
 }
});

Reference

Imprint.create() ~ Configuration Object Fields:

PROPERTY NAMEREQUIREDTYPEDESCRIPTION
client_secretTRUEStringGenerated through Create Customer Session endpoint
partner_referenceFALSEStringUnique identifier for the program provided by the Imprint team
selectorFALSEStringDOM element to load the application. If not provided, Imprint will try to find a container with id="imprint-ui" (#imprint-ui selector)
onCompletionFALSEStringCallback function that accepts a result and data parameters (see all possible values below)
referralCodeFALSEStringFor use with Imprint’s Referral Program
offerConfigUUIDFALSEStringIdentifier for specific reward offer in the referral system

onCompletion ~ Callback result values:

ENUMDESCRIPTION
OFFER_ACCEPTEDApplication has been approved and credit offer accepted. New cardholder!
REJECTEDApplication has been rejected by Imprint
IN_PROGRESSApplication has been exited, not completed
ERRORInvalid request parameters (e.g., invalid token)

onCompletion ~ Callback data object fields:

PROPERTY NAMETYPEDESCRIPTION
customer_idstring | nullImprint Customer ID
payment_method_idstring | nullPayment Method ID
partner_customer_idstring | nullPartner Customer ID
error_codestring | nullError Code