Skip to main content

iFrame Configuration Object

You must set up the configuration object before adding the iFrame to your form. This object controls some front-end properties of the iframe, such as CSS, character masking, and placeholder values.

Below is an example of an iFrame configuration object with minimal parameters.

var iframeConfig = {
origin: "https://mysite.com",
enablePrettyFormat: true,
placeholder: "XXXX-XXXX-XXXX-XXXX",
cvvPlaceholder: "XXX"
}
PCI Compliance scope

The Deets iFrame is configured to use PCI scope tokenization by default.

The following table presents all possible parameters you can use to configure the iFrame object:

ParameterTypeRequiredDescription
originstringtrueThe fully qualified origin of your application. In the Deets Production environment, the origin must use HTTPS.
enablePrettyFormatbooleantrueEnabling this property will auto-format the credit card number as it appears on the physical card. Change to false if you want to do your own formatting
placeholderstringtrueSets the placeholder attribute of the input.
cvvPlaceholderstringtrueSets the placeholder attribute of the CVV input.
enableValidateOnBlurbooleanfalseIf true, the Validate function will be called when the input loses focus; otherwise, Validate must be invoked manually.
debugbooleanfalseIf enabled, data will be output to the console to assist debugging.
customRegExstringfalseIf true, the RegEx expression provided will be used during validation events and any internal validation. Please note that the backslash is an escape character. If used in your RegEx, it will need to be escaped.
maskInputbooleanfalseHides the input being typed by masking it with a masking character.
titlestringfalseContent of the title element used by the iframe document.
cvvTitlestringfalseContent of the title element used by the CVV iframe document.
customDataTypeobjectfalseThe object contains custom validations appended to our standard card brand detection.

Once you've finished creating your configuration object, you can use it to integrate the Deets iFrame.