Building the Configuration Object

The next step is creating the iFrame configuration object itself, which consists of the following parameters:

ParameterTypeRequiredDescription
tokenExIDstringtrueYour TokenEx ID
tokenSchemestringtrueEither the name (case insensitive) or the JSON value of the Token Scheme to be used (see Token Schemes)

NOTE: This must be the same as the Token Scheme used to create your Authentication Key
authenticationKeystringtrueThe generated Authentication Key (see Generating the Authentication Key).
timestampstringtrueThe timestamp when the authentication key was generated, in yyyyMMddHHmmss format.

NOTE: This value must match the one provided when generating your Authentication Key.
originstringtrueThe fully qualified origin of your application. In the TokenEx Production environment, the origin must use HTTPS.
stylesobjectfalseCSS to be applied to the PAN and CVV inputs (see Styling the iFrame)
placeholderstringfalseOptionally sets the placeholder attribute of the input
pciboolfalseSpecifies if the PCI version of the iFrame should be rendered; defaults to false
enablePrettyFormatboolfalseIf pci is true, then enabling this property will auto format the credit card number as it appears on the physical card


NOTE: This will only apply if input type is set to text. It will not work if input type is set to "num" or "tel".
enableValidateOnBlurboolfalseIf true, then the Validate function will be called when the input loses focus; otherwise, Validate must be invoked manually
inputTypestringfalseAllowed values are "number", "tel", and "text". If nothing is supplied, this will default to "text"
allowUnknownCardTypesboolfalseIf true, then unknown, or types other than 'masterCard', 'americanExpress', 'discover', 'visa', 'diners', or 'jcb' will tokenize; defaults to false

NOTE: If this field is true while using Custom Data Types in PCI w/ CVV or CVV Only modes, the CVV text field's allowable input will be 4. Use the cvvValidRegex field to validate the length of the CVV input.
debugboolfalseIf enabled, data will be output to the console to assist with debugging
customRegExstringfalseIf present, the RegEx expression provided will be used during validation events in addition to any internal validation. Please note that the backslash is an escape character - if used in your RegEx, it will need to be escaped
cvvboolfalseSpecifies if a CVV iFrame should be rendered; defaults to false
cvvOnlyboolfalseSpecifies if only the CVV iFrame should be rendered; defaults to false (see CVV Only Mode Configuration)
tokenstringfalseIf cvvOnly is set to true, the token the CVV is associated with must be provided
cardTypestringfalseIf cvvOnly is set to true, a card type must be provided to validate the CVV length
cvvInputTypestringfalseAllowed values are "number", "tel", and "text"; if nothing is supplied, this will default to "text"
cvvContainerIDstringfalseThe container in which you want to render the CVV iFrame when cvvOnly is false
cvvPlaceholderstringfalseOptionally sets the placeholder attribute of the CVV input when cvvOnly is false
customDataTypesobjectfalseCustom validations appended to our standard brand detection (see Using Custom Data Types)
customDataLabelstringfalseAllows customization of the iframe data label. If none supplied, this defaults to "Data"
customCvvDataLabelstringfalseAllows customization of the CVV iframe data label. If none supplied, this defaults to "CVV"
maskInputboolfalseHides the input being typed by masking it with masking character
fontstringfalseA google font to use in the iframe
titlestringfalseContent of the title element used by the iframe document
cvvTitlestringfalseContent of the title element used by the cvv iframe document
enableAriaRequiredboolfalseIf true, sets the aria-required and aria-invalid attributes to true. When Validate function is called aria-invalid will update according to the result of isValid
returnKhashboolfalseTrue: returns the kHash value for a given credit card
False: returns kHash property with empty value

See: Third Party Integrations
forterSiteIdstringfalseObtained from Forter

See: Third Party Integrations
forterUsernamestringfalseObtained from Forter

See: Third Party Integrations
inputModestringfalseSee MDN Input Mode for acceptable modes.
expiresInSecondsIntfalseThe expiration time when the authentication key is going to expire after initial load.

Valid range: 1 to 1200 Seconds

NOTE: Default expiration time is set to 1200 seconds (20 Minutes).

The expiration time will be reset to default, in case if user provides value which
• Is less than or equal to 0
• Is greater than 1200
inputMaxLengthIntfalseSets the maxLength property of the input.

NOTE: This parameter only works with input type "text".
useExtendedBINboolfalseIf true, returns the first eight characters of the PAN in the Tokenize response.

NOTE: Will not return firstEight in the Tokenize response if:
• PCI is false
• or PAN is fewer than 16
characters.
enableValidateOnKeyUpboolfalseIf true, then the Validate function will be called after each keystroke; otherwise, Validate must be invoked manually

NOTE: This functionality is only available for PCI and PCIwithCVV iFrame modes
enableValidateOnCvvKeyUpboolfalseIf true, then the Validate function will be called after each keystroke in the CVV iframe; otherwise, Validate must be invoked manually

NOTE: This functionality is only available for PCIwithCVV iFrame modes
returnAutoCompleteValuesboolfalseIf true, then this will return nameOnCard and cardExp values whenever a user utilizes the browsers autocomplete functionality.

NOTE: Autocomplete must be enabled
cardMaxLengthsobjectfalseEXAMPLE:
cardMaxLengths: {
"visa" : 16,"mastercard" : 19,
"americanexpress" : 19,
"discover" : 16,
"diners" : 16,
"jcb" : 19
}
This field is optional.

Providing an object for this field requires all properties, i.e. card brands, to be specified on the object.

Either all card brand properties on the object must have integer values, or they all must be set to null.

If no object is provided for this field, the max length for any card brand will be set to the default max length, which is 19.

If the object is not used but still provided, set all the card brand property values to null, and the values will default to 19.

Required card brands:
americanexpress
diners
discover
jcb
mastercard
visa

NOTE: This functionality is only available for PCI and PCIwithCVV iFrame modes. Max Length for PCI and PCIwithCVV is 19 by default