Skip to main content

Building the Configuration Object

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

ParameterTypeRequiredDescription
tokenExIDstringtrueYour TokenEx ID
tokenSchemestringtrue

Either the name (case insensitive) or the JSON value of the Token Scheme to be used (see Token Schemes)

info
This must be the same as the Token Scheme used to create your Authentication Key.
authenticationKeystringtrueThe generated Authentication Key (see Generating the Authentication Key).
timestampstringtrue

The timestamp when the authentication key was generated, in yyyyMMddHHmmss format.

info
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
enablePrettyFormatboolfalse

If pci is true, then enabling this property will auto format the credit card number as it appears on the physical card

info
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"
allowUnknownCardTypesboolfalse

If true, then unknown, or types other than 'masterCard', 'americanExpress', 'discover', 'visa', 'diners', or 'jcb' will tokenize; defaults to false

info
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.
expiresInSecondsIntfalse

The expiration time when the authentication key is going to expire after initial load.

Valid range: 1 to 1200 Seconds

info

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

inputMaxLengthIntfalse

Sets the maxLength property of the input.

info
This parameter only works with input type "text".
useExtendedBINboolfalse

If true, returns the first eight characters of the PAN in the Tokenize response.

info
Will not return firstEight in the Tokenize response if:
  • PCI is false
  • or PAN is fewer than 16
characters.
enableValidateOnKeyUpboolfalse

If true, then the Validate function will be called after each keystroke; otherwise, Validate must be invoked manually

info
This functionality is only available for PCI and PCIwithCVV iFrame modes.
enableValidateOnCvvKeyUpboolfalse

If true, then the Validate function will be called after each keystroke in the CVV iframe; otherwise, Validate must be invoked manually

info
This functionality is only available for PCIwithCVV iFrame modes
returnAutoCompleteValuesboolfalse

If true, then this will return nameOnCard and cardExp values whenever a user utilizes the browsers autocomplete functionality.

info
Autocomplete must be enabled.
cardMaxLengthsobjectfalse
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 (case-sensitive):
americanExpress
diners
discover
jcb
masterCard
visa

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