To get started, place the code snippet below on your site.
Pick a prebuilt theme for quick implementation. Here is a list of themes you could use.
Juan to provide iframe demo embed. Code sample:Customize your theme’s colors, fonts and form messages in the appearance config.
Juan to provide Iframe styling examples Code ExampleAppearance
This section covers the appearance config for both short-form and long-form themes.Customizable form components include:
- Color
- Font Family
- Form messages
Theshort-formtheme appearance config options:
short-form-light-zipshort-form-Dark-zip
Thelong-formtheme appearance config options:
long-form-lightlong-form-darklong-form-border-lightlong-form-border-dark
Color
Ecrypt iframe will accept hex and letter color formats only.

Google Font
- Go to Googe font site
- Select a font you like, once you add the font to your selected family.
- Apply the CSS rules to specify families. You should see a CSS code snippet
font-family: 'Roboto', sans-serif; - Only copy the value of the CSS rule font-family ‘Roboto’, sans-serif
- Then paste it in the config for example
Capturing messages from the iframe
We are bubbling up the validation alerts to you using Post message via postMessage Here are all of the alert messages ECRYPT is passing back to you:| Alert Message | Description |
|---|---|
| credit-card-invalid | Credit card number is invalid from the input. |
| expiration-invalid | Expiration date is invalid from the input. |
| cvv-invalid | CVV is invalid from the input. |
| zip-invalid | Postal code is invalid from the input. |
| ecrypt-error-message | Token API error message |
Succesful Responses
Once the user successfully inputs their credit card information the API will post back a token id. Here is an example of how you can listen for the success message.Hide alert message in the iframe
The config option only acceptstrue or false. To hide alerts pass true.