SDK Parameter Reference

Here is the SDK parameters required during the integration step 4, SDK initialization. The parameters can be set in level of transaction. Each transaction can have different SDK values so that to appear in different effects.

SDK basic construction

These are the mandatory field to identify and build up a SDK.

FieldTypeM/ODescription
typeStringMFixed value: payment
sessionIDStringMA unique 16-character UUID to initialize SDK for a drop-in order, created in interaction API
environmentStringMSet the environment for requests, e.g., HKG_prod, BKK_prod, TYO_prod, UAT
modeStringMfullPage, embedded, bottomUp

Language Setting

This section is to control the language displayed on drop-in user can see.

FieldTypeM/ODescription
localeStringOLanguage for Drop-in display.
Supported languages:
English:en-US
Chinese: zh-CN
Traditional Chinese: zh-TW
Japanese: ja-JP
Korean: ko-KR
Thai: th-TH
Default value : English

Payment Workflow Setting

This section is to control the the payment steps that user will experienced. Merchant can decide the presence and format of the features of (1) card details input, (2) Terms & Conditions and (3) QR code payment.

FieldTypeM/ODescription
uiOptionObjectO

card

ObjectOCustomize card payment section setting

showCardHolderName

booleanOTo indicate if user is required to input card holder name when choosing card payment

CVVForSavedCard

booleanOTo indicate if user is required to input CVV when choosing saved card to proceed payment

showScanCardButton

booleanOTo indicate if there is button to allow user scan the card to input the card details
Default value: false

autoInvokeCardScanner

booleanOTo indicate if user is allowed to scan the card to input the card details
Default value: false

TnC

ObjectOCustomize TnC section setting

showTnC

booleanOTo indicate if TnC is displayed.
Value:trueor false
Default value: false

mode

booleanOValue for how user accepting TnC.
checkbox: User to tick a checkbox to accept TnC
click2accept: User click payment button to default accepting TnC
Default value: click2accept

url

StringCMandatory field whenshowTnC is true.
The url of TnC merchant request to display

showSaveImage

booleanOTo indicate if user is allowed to save the QR code in device
Default value: false

Card BIN Validation Set-up

This section is to control if card BIN information is required to return to merchant. Details of card bin validation features can be referred to Card BIN Verification.

FieldTypeM/ODescription
verifyOptionobjectO
isVerifyPaymentBrandbooleanOTo indicate card BIN is required to processed and returned in SDK event.
Default value: false
maxWaitTimestringOMaximum waiting time for merchant to respond the Card BIN validation event in second unit.
Default value: 10

Layout/UI Control

This section is to control the the styling and layout design of the drop-in. Merchant can control the (1) color, (2) fonts and (3) spacing of the page. To Illustrate how the below values effects on the drop-in page and check the possible values ,please refer to Drop-in Customization Reference.

FieldTypeM/ODescription
appearanceObjectO

colorAction

StringOCheckbox or clickable button color, hex code (e.g., #5E48FC)

colorBackground

StringODrop-in background color, hex code

colorBoxStroke

StringOBorder/line color, hex code

colorDisabled

StringODisabled button color, hex code

colorError

StringOError border and text color, hex code

colorFormBackground

StringOInput background color, hex code

colorFormBorder

StringOInput border color, hex code

colorInverse

StringOButton text color, hex code

colorBoxFillingOutline

StringOInput border when selected, hex code

colorPlaceholder

StringOInput placeholder color, hex code

colorPrimary

StringOPrimary font color, hex code

colorSecondary

StringOSecondary font color, hex code

button/font

ObjectOButton font style

heading/font

ObjectOHeading font style

subHeading/font

ObjectOSubheading font style

headingPopup/font

ObjectOPopup heading font style

label/font

ObjectOLabel font style

labelInfo/font

ObjectOLabel info font style

labelPopup/font

ObjectOPopup label font style

inputField/font

ObjectOInput field font style

inputFieldInfo/font

ObjectOInput field info font style

inputFieldPopup/font

ObjectOInput field popup font style

paragraph/font

ObjectOParagraph font style

placeholder/font

ObjectOInput placeholder font style

borderRadius

ArrayOPage corner radius [radius1, radius2, radius3, radius4]

logoPosition

StringOMerchant logo position: left, middle, right. Default: left
ColumnsbooleanOTo indicate if the page displays in 2 column
Default value: false(Single Columns)

SDK Initialization Example

{
  "id": "#dropApp",
  "type":"payment",
  "sessionID": "c8b7907686e4498d9af24222ea3b37f3",
  "locale": "en-US",
  "mode": "fullPage",
  "environment": "UAT",
  "uiOption": {
    "showSaveImage": false,
    "card": {
      "showCardHolderName": true,
      "CVVForSavedCard": true,
      "showScanCardButton": false
    },
    "TnC": {
      "showTnC": true,
      "mode": "click2accept",
      "url": ""
    },
  "verifyOption": {
    "isVerifyPaymentBrand": true
  },
  "appearance": {
      "colorBackground": "#fff"
  },
    "Columns": true
}