Skip to content

SDK Parameter Reference

Options

OptionTypeRequiredDescription
idstringYesMounted DOM Element ID
sessionIDstringYesThe sessionID returned in LinkPay API
localestringNoLanguage used for drop-in display
Sample:en-US
environmentstringYesThe environment that the Drop-in should point to and send requests.
Value defined:HKG_prod BKK_prod TYO_prod UAT TEST
modestringYesThe configuration for the Drop-in UI's display mode.
Value defined: fullPage embedded
uiOptionobjectNoIntegrating parties can use this field to define the display of elements within the Drop-in page.
appearanceobjectNoIntegrating parties can use this field to define the UI styling of the Drop-in.

uiOption object

OptionTypeRequiredDescription
cardobjectNoControl over card payment-related elements.
TnCobjectNoControl over Terms and Conditions (TnC) related elements.
showSaveImagebooleanNoControls whether to display the button for saving payment method details (such as convenience store payments) on the Drop-in page.
If this parameter is not provided, it defaults to false, indicating that the button will not be displayed.
hidePaymentButtonbooleanNoControls whether to hide the payment button on the Drop-in page.
If this parameter is not provided, it defaults to false, indicating that the button will be displayed. When set to true, the Google Pay payment method will be hidden by default.
Once the payment button is hidden, the merchant's page needs to construct its own payment button and trigger the payment process via the sdk.pay() method.
pagingbooleanNoControls whether the personal details section and the purchase summary section are displayed on the same page within the Drop-in.
If this parameter is not provided, it defaults to false, indicating that both sections will be displayed on a single page without pagination.

card object

OptionTypeRequiredDescription
showCardHolderNamebooleanNoControls whether to display the cardholder name input field on the page for data collection. If this parameter is not provided, it defaults to false, indicating that the cardholder name input field will not be displayed.
CVVForSavedCardbooleanNoControls whether it is required to enter a CVV when making a payment with a saved card on the page. If this parameter is not provided, it defaults to false, indicating that CVV input is not required.

TnC object

OptionTypeRequiredDescription
showTnCbooleanNoControls whether to display the Terms and Conditions (TnC) section on the page.
If this parameter is not provided, it defaults to false, indicating that the TnC section will not be displayed.
modebooleanNoControls how the Terms and Conditions (TnC) are displayed on the page.
Value defined:
checkbox: Display a checkbox before the Terms and Conditions (TnC).
click2accept: There is no checkbox preceding the Terms and Conditions (TnC); clicking the Pay button implies acceptance of the TnC.
Default value: click2accept
urlstringconditionalThe page URL of the Terms and Conditions (TnC) provided by the merchant. This field is mandatory when displayTnC is set to true.

appearance object

OptionTypeRequiredDescription
colorActionstringNoThe color used for the state when a checkbox is selected or a button is enabled. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorBackgroundstringNoThe background color for the entire Drop-in interface. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorBoxStrokestringNoThe color used for borders and dividers. For the specific associated UI elements, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorDisabledstringNoThe color applied to buttons when they are in a disabled state. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorErrorstringNoThe color used for the border of checkboxes and input fields when they are in an error state, as well as the color for the error message text. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorFormBackgroundstringNoThe background color for checkboxes and input fields. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorFormBorderstringNoThe border color for input fields. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorInversestringNoThe color of the text inside buttons. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorBoxFillingOutlinestringNoThe color of the input field's border when it is in a focused state. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorPlaceholderstringNoThe color of the placeholder text within input fields. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorPrimarystringNoThe primary font color used for text. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
colorSecondarystringNoThe secondary font color used for text. For the specific associated UI, please refer to the design mockups.
It should be provided as a hexadecimal color code, for example: #5E48FC.
buttonfont objectNoControls the styling of the button. For the specific associated UI, please refer to the design mockups.
headingfont objectNoControls the styling of the title. For the specific associated UI, please refer to the design mockups.
subHeadingfont objectNoControls the styling of the parent title. For the specific associated UI, please refer to the design mockups.
headingPopupfont objectNoControls the styling of the pop-up window's title. For the specific associated UI, please refer to the design mockups.
labelfont objectNoControls the styling of the label elements. For the specific associated UI, please refer to the design mockups.
labelInfofont objectNoControls the styling of the text title. For the specific associated UI, please refer to the design mockups.
labelPopupfont objectNoControls the styling of the text title within the pop-up window. For the specific associated UI, please refer to the design mockups.
inputFieldfont objectNoControls the styling of the text within the input fields. For the specific associated UI, please refer to the design mockups.
inputFieldInfofont objectNoControls the styling of the text. For the specific associated UI, please refer to the design mockups.
inputFieldPopupfont objectNoControls the styling of the text within the pop-up window. For the specific associated UI, please refer to the design mockups.
paragraphfont objectNoControls the styling of the footer. For the specific associated UI, please refer to the design mockups.
placeholderfont objectNoControls the styling of the placeholder text within input fields. For the specific associated UI, please refer to the design mockups.
borderRadiusarrayNoControls the radius of the rounded corners for page elements. For the specific associated UI, please refer to the design mockups.
["4px", "8px", "10px", "8px"]
The four data values respectively represent: borderRadius 1 borderRadius 2 borderRadius 3 borderRadius 4
logoPositionstringNoControls the position of the merchant's logo. For the specific associated UI, please refer to the design mockups.
Value defined:left middle right

font Object

OptionTypeRequiredDescription
fontFamilystringYesThe font family.
For example: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif
fontSizestringYesThe font size.
For example:16px
fontWeightstringYesThe font weight.
For example:400
letterSpacingstringYesThe letter spacing.
For example: 0.3px
lineHeightstringYesThe line height.
For example: 1.5

Event

The Drop-in responds to commands by sending event messages to the integrating party's page. The client issuing the commands listens for these event messages.

payment_completed

This event is returned when the user successfully completes a payment within the Drop-in and the payment result is successful.

OptionTypeRequiredDescription
typestringYesFixed value: payment_completed
sessionIDstringYesIt is the same as the sessionID used when invoking the Drop-in.
merchantTransIDstringYesThe transaction order number, which can be used to retrieve details via the GET Payment API.
econtextobjectNoComing Soon

payment_failed

This event is returned when the user completes a payment within the Drop-in, but the payment result is unsuccessful.

OptionTypeRequiredDescription
typestringYesFixed value: payment_failed
sessionIDstringYesIt is the same as the sessionID used when invoking the Drop-in.
merchantTransIDstringYesThe transaction order number, which can be used to retrieve details via the GET Payment API.
codestringNoThe payment failure is indicated by an online response code.
messagestringNoThe payment failure is indicated by the online response content.

payment_not_preformed

This event is returned when an error occurs while invoking the Drop-in from the merchant's page. Examples include a non-existent or incorrect sessionID in the payment command.

OptionTypeRequiredDescription
typestringYesFixed value: payment_failed
sessionIDstringYesIt is the same as the sessionID used when invoking the Drop-in.
codestringNoThe response codes are detailed in the table below.
messagestringNoThe response codes are detailed in the table below.

Response Codes

Error detailCodeMessage
Invalid field length or formatV0000field {} invalid format
Required field missing or emptyV0001field {} absent or empty
Invalid field enumeration valueV0002field {} invalid value
Session ID not foundB2001Session ID not found
Session ID exists but order has been successfully paidB2002Order has been paid
Session ID exists but order has expiredB2003Order closed
Other errorsB2004Payment error
No available payment methods for current orderB2005No available payment method
Payment failedB2006Payment failed

payment_cancelled

This event is returned when the user actively terminates the payment process and exits the Drop-in.

OptionTypeRequiredDescription
typestringYesFixed value: payment_cancelled
sessionIDstringYesIt is the same as the sessionID used when invoking the Drop-in.

order_created

It is important to note that the order_created event does not indicate successful payment, but only signifies that the order has been successfully created.

When a user selects a payment method that requires asynchronous completion (such as convenience store payment) and clicks the "Complete" button on the payment information display page, the Drop-in will return an order_created event to the merchant's page, along with the econtext (convenience store payment details). At this point, the merchant can choose to close the Drop-in and display the payment information on their own page, using the GET Payment method to query the user's payment result.

If the merchant does not close the Drop-in after receiving the order_created event, the Drop-in will continuously poll the current order's payment status. Once the final result is retrieved, it will return either a payment_failed or payment_completed event to the merchant's page.

OptionTypeRequiredDescription
typestringYesFixed value: order_created
sessionIDstringYesIt is the same as the sessionID used when invoking the Drop-in.
merchantTransIDstringYesThe transaction order number, which can be used by the user to query order details at a later time.
econtextobjectYesThis event is returned when a payment method that requires displaying independent payment information needs to be presented.

econtext

OptionTypeRequiredDescription
paymentBrandstringYesPayment Brand
confirmationCodestring(32)NoThe confirmation number that merchant needs to diplay on payment page for user to complete the subsequent payment process at convenience stores.
paymentCodestring(32)NoA number customers that merchant needs to diplay on payment page for user to complete the follow-up payment process at convenience stores.
customerFeestring(32)NoAdditional fee charged to users for specific payment brands.
orderIDstring(24)NoRemitters/payers name that merchant needs to display on payment page for user to send money as.
bankNamestring(300)NoThe name of the bank of receving account that merchant needs to display on payment page for user to wire funds.
accountBranchNamestring(300)NoThe account branch name of receving account that merchant needs to display on payment page for user to wire funds.
accountBranchCodestring(24)NoThe account branch code of receving account that merchant needs to display on payment page for user to wire funds.
accountNumberstring(32)NoThe account number of receving account that merchant needs to display on payment page for user to wire funds.
accountTypestring(12)NoThe account type of receving account that merchant needs to display on payment page for user to wire funds.
accountNamestring(300)NoThe account name of receving account that merchant needs to display on payment page for user to wire funds.
bankIDstring(32)NoThe institution of receving account that merchant needs to display on payment page for user to complete the follow-up payment process via PayEasy.
customerIDstring(32)NoThe customer number of receving account that merchant needs to display on payment page for user to complete the follow-up payment process via PayEasy.
expiryDatedatetimeNoThe payment due date by which user must complete the follow-up payment process.
Format: ISO 8601 YYYY-MM-DDThh:mm:ssTZD
instructionURLstring(300)NoA URL for an instructions page that merchant needs to display it on payment page to guide users.