Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bancofcalifornia-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

ThreeDSecure.createUI(object options): ThreeDSecureUI

Description

Create a ThreeDSecureUI from the provided options.

Parameters

options object containing the following values:
OptionDescriptionExamplesRequired
cardNumberThe card number to run 3DS for’4111111111111111’Yes, if using raw credit card data No, if using paymentToken or customerVaultId
cardExpMonth2 digit card expiration date for the month’07’ (meaning July)Yes, if using raw credit card data No, if using paymentToken or customerVaultId
cardExpYear2 or 4 digit card expiration year’2021’ ‘24’Yes, if using raw credit card data No, if using paymentToken or customerVaultId
paymentTokenToken from Collect.js’00000000-000000-000000-000000000000’Yes, if using Collect.js No, if using raw card data or customerVaultId
customerVaultIdMerchant defined Customer Vault id. This is not the billing id or shipping id.‘12345’Yes, if using Customer Vault No, if using raw card data or paymentToken
currencyThe 3 character currency code for the transaction.‘USD’ ‘GBP’Yes
amountThe amount of the transaction in minor units. If the customer is challenged, this value will be displayed on the challenge screen.‘1000’ (meaning 10 USD)Yes
emailThe email address of the cardholder that owns the card. Required (if available) unless market or regional mandate restricts sending this information.example@example.comYes, if applicable
cityThe cardholder’s city. Required (if available) unless market or regional mandate restricts sending this information.‘Atlanta’Yes, if applicable
address1The cardholder’s address. Required (if available) unless market or regional mandate restricts sending this information.‘123 Fake St.‘Yes, if applicable
address2The cardholder’s address’APT 1’No
address3The cardholder’s address’Unit 1’No
countryThe customer’s country. 2 Characters, ISO 3166. Required (if available) unless market or regional mandate restricts sending this information.‘US’Yes, if applicable
firstNameThe first name of the cardholder’Jane’Yes
lastNameThe last name of the cardholder’Doe’Yes
postalCodeThe zip code or postal code of the cardholder. Required (if available) unless market or regional mandate restricts sending this information.‘60605’Yes, if applicable
stateThe state, province, or other subdivision of the cardholder. This field must be a 2 character subdivision code defined by ISO 3166-2. Required (if available) unless market or regional mandate restricts sending this information.‘GA’Yes, if applicable
phoneThe phone number of the cardholder’8008675309’No
shippingCityCity the cardholder would like their purchase shipping to’Chicago’No
shippingAddress1Address the cardholder would like their purchase shipping to’123 Fake st’No
shippingAddress2Address the cardholder would like their purchase shipping to’APT 2’No
shippingAddress3Address the cardholder would like their purchase shipping to’Unit 1’No
shippingCountryCountry the cardholder would like their purchase shipping to. 2 characters, ISO 3166.‘US’No
shippingFirstNameFirst name of the recipient’John’No
shippingLastNameLast name of the recipient’Doe’No
shippingPostalCodeZip code or postal code the cardholder would like their purchase shipping to’60605’No
shippingStateThe state, province, or other subdivision of the cardholder. This field must be a 2 character subdivision code defined by ISO 3166-2.‘GA’No
processorThe processor id that will be used to run the transaction. Processor ids can be found in the merchant portal in Transaction Routing’myprocessor’No, if not provided the system will automatically use your default processor
challengeIndicatorThe 2-digit 3DS challenge indicator you would like to pass along with the 3DS request. Requests that the card issuer does or doesn’t challenge a customer.‘01’ - No preference ‘02’ - No challenge requested ‘03’ - Challenge requested (3DS Requestor preference) ‘04’ - Challenge requested (Mandate) ‘05’ - No challenge requested (transactional risk analysis is already performed) ‘06’ - No challenge requested (data share only) ‘07’ - No challenge requested (strong consumer authentication is already performed) ‘08’ - No challenge requested (utilise allowlist exemption if no challenge required) ‘09’ - Challenge requested (allowlist prompt requested if challenge required)No, if not provided the system will automatically use ‘01’ - No preference.
browserJavaEnabledThe string value of the browser’s setting for if Java is enabled. As this is a deprecated field for most modern browsers, a try/catch is recommended to future-proof your integration.try { const userBrowserJavaEnabled = String(window.navigator.javaEnabled()); } catch(e) { const userBrowserJavaEnabled = String(false); } /* In threeDsService.createUI(): */ browserJavaEnabled: userBrowserJavaEnabledYes, if you are manually collecting device data.
browserJavascriptEnabledThe string value of the browser’s setting for if Javascript is enabled. Since using Gateway.js requires the user’s browser to have Javascript enabled, it is safe to default this to true.String(true)Yes, if you are manually collecting device data.
browserLanguageThe string value of the browser’s setting for the user’s selected language.`window.navigator.languagewindow.navigator.userLanguage`Yes, if you are manually collecting device data.
browserColorDepthThe string value of the user’s screen’s color depth.String(window.screen.colorDepth)Yes, if you are manually collecting device data.
browserScreenHeightThe string value of the user’s screen’s height.String(window.screen.height)Yes, if you are manually collecting device data.
browserScreenWidthThe string value of the user’s screen’s width.String(window.screen.width)Yes, if you are manually collecting device data.
browserTimeZoneThe string value of the user’s timezoneString(new Date().getTimezoneOffset())Yes, if you are manually collecting device data.
deviceChannelThis is required to be ‘Browser''Browser’Yes, if you are manually collecting device data.

Side Effects:

Raises an error if options are invalid.

Example:

const gateway = Gateway.create('collect_checkout_0000000000000000000000000');
const threeDsService = gateway.get3DSecure();

const threeDSecureUI = threeDsService.createUI({
    customerVaultToken: "myCustomerVaultToken",
    currency: 'USD',
    amount: '1000'
})