Skip to main content

Card binding SDK

This SDK collects users' card information. The boundCardToken parameter can be obtained through OpenAPI. Check it out.

Merchant website access example

<script src="https://ramp.multiexc.com/js/frames.min.js"></script>
<script>
// nitialization
MultiexcFrames.init({
boundCardToken: "******",
});
// Calling card binding
MultiexcFrames.dispatch("submitCard");
</script>

<div id="multiexcFrame"></div>

SDK parameters

Functions

Method nameDescription
init(object)Initialization method for loading form
MultiexcFrames.init(object)
addEventHandler(event, handler)Add a call method for specified trigger events. "event" refers to the name of a valid event, and "handler" refers to the callback handling.
Example: MultiexcFrames.addEventHandler(Events.CARD_TOKENIZED, (event) => {})
removeEventHandler(event, handler)This is used to remove events added via the addEventHandler method. "event" refers to the name of a valid event, and "handler" refers to a specified function to remove.
Example: MultiexcFrames.removeEventHandler(Events.CARD_TOKENIZED, (event) => {})
removeAllEventHandlers(event)Removes all listeners added to the specified event. "event" refers to the name of a valid event.
Example: MultiexcFrames.removeAllEventHandlers(Events.CARD_TOKENIZED)
dispatch(event, handler)Manually triggers a specified event. "event" refers to a list of valid events, and "handle" represents a callback handling (optional).
Example: MultiexcFrames.dispatch(Events.CARD_SUBMIT, (e) => {})

Init configuration

Configuration nameDescriptionMandatoryDefault value
boundCardTokenCard binding tokenYnone
localeLanguageNen
View supported languages.
getContainerNode DOM inserted to iframeN() => document.querySelector("#multiexcFrame")
fieldsForm optionsN{ holderName: false, phone: false, country: false, city: false, address: false, postalCode: false }

addEventHandler Event

Event nameJavascript constantDescription
cardTokenizationValidCARD_TOKENIZATION_VALIDTriggered upon completion of card binding token verification. It will return to
isValid: true / false
cardValidationChangedCARD_VALIDATION_CHANGEDTriggered when the status of the card verification changes. It will return to
isValid: true / false

dispatch Event

Event nameJavascript constantDescriptionResponse
submitCardCARD_SUBMITMethod for card form submission{ tokenValid: true/false, status: true/false, cardId: "622***111" }
resetFormCARD_RESET_FORMMethod for clearing card formundefined
isCardValidCARD_IS_VALIDObtain the result of whether the card verification has been successful{ isValid: true / false }

Fields Option

NameJavascript constantDescription
holderNameFIELD_HOLDER_NAMECardholder name
phoneFIELD_PHONECardholder's mobile number and area code
countryFIELD_COUNTRYCardholder's country/region
cityFIELD_CITYCardholder's mobile number and area code
addressFIELD_ADDRESSCardholder address
postalCodeFIELD_POSTAL_CODECardholder's postal code

Custom CSS

If you want to override the default style of Frames and customize the element's CSS, pass a style object to the init method.

Property nameDescription
backgroundColorThe iframe element background color.
inputThe default input element style
Accepts an object with colorbackgroundColorfontSizeheightpaddingroundedborder
labelThe form lable element style
Accepts an object with colorpaddingBottomfontSize
focusRules applied when the element is focused
Accepts an object with color
invalidRules applied when the element is invalid
Accepts an object with colorpaddingfontSize
placeholderThe input element placeholder style
Accepts an object with color
selectThe default select element style
Accepts an object with optionsbackgroundColor
options Accepts an object with activeBackgroundColorfontSizecolorheight

For example, an instance of Frames initialized with these values:

MultiexcFrames.init({
boundCardToken: "YOUR-CARD-TOKEN",
style: {
backgroundColor: "#000000",
padding: "10px 5px",
input: {
color: "#e7d2c4",
backgroundColor: "#F8F6F9",
fontSize: "20px",
height: "80px",
padding: "10px 10px 10px 10px",
rounded: "20px",
border: "1px solid #e7d2c4",
},
label: {
color: "#e7d2c4",
fontSize: "14px",
paddingBottom: "15px",
},
focus: {
color: "#afd523",
},
invalid: {
color: "#9a1313",
fontSize: "20px",
padding: "10px 10px 10px 10px",
},
placeholder: {
color: "#ba8397",
},
select: {
backgroundColor: "#e7d2c4",
border: "1px solid #9a1313",
options: {
activeBackgroundColor: "#bcc397",
fontSize: "20px",
color: "#26bfd4",
height: "64px",
},
},
},
});

How was your Reading Experience with us?

footer_logoCopyright
socialsocialsocial
Quadrum Verslo Centra, Konstitucijos pr 21, Vilnius 08130 , Lithuania