Embed the Imprint application experience on your website
Load the Imprint script
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.Add a container to your page
Display the card application experience
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()
~ Configuration Object Fields:
PROPERTY NAME | REQUIRED | TYPE | DESCRIPTION |
---|---|---|---|
client_secret | TRUE | String | Generated through Create Customer Session endpoint |
partner_reference | FALSE | String | Unique identifier for the program provided by the Imprint team |
selector | FALSE | String | DOM element to load the application. If not provided, Imprint will try to find a container with id="imprint-ui" (#imprint-ui selector) |
onCompletion | FALSE | String | Callback function that accepts a result and data parameters (see all possible values below) |
referralCode | FALSE | String | For use with Imprint’s Referral Program |
offerConfigUUID | FALSE | String | Identifier for specific reward offer in the referral system |
onCompletion
~ Callback result
values:
ENUM | DESCRIPTION |
---|---|
OFFER_ACCEPTED | Application has been approved and credit offer accepted. New cardholder! |
REJECTED | Application has been rejected by Imprint |
IN_PROGRESS | Application has been exited, not completed |
ERROR | Invalid request parameters (e.g., invalid token) |
onCompletion
~ Callback data
object fields:
PROPERTY NAME | TYPE | DESCRIPTION |
---|---|---|
customer_id | string | null | Imprint Customer ID |
payment_method_id | string | null | Payment Method ID |
partner_customer_id | string | null | Partner Customer ID |
error_code | string | null | Error Code |