SDK Parameter Reference
Options
| Option | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Mounted DOM Element ID |
| sessionID | string | Yes | The sessionID returned in LinkPay API |
| locale | string | No | Language used for drop-in display Sample: en-US |
| environment | string | Yes | The environment that the Drop-in should point to and send requests. Value defined: HKG_prod BKK_prod TYO_prod UAT TEST |
| mode | string | Yes | The configuration for the Drop-in UI's display mode. Value defined: fullPage embedded |
| uiOption | object | No | Integrating parties can use this field to define the display of elements within the Drop-in page. |
| appearance | object | No | Integrating parties can use this field to define the UI styling of the Drop-in. |
uiOption object
| Option | Type | Required | Description |
|---|---|---|---|
| card | object | No | Control over card payment-related elements. |
| TnC | object | No | Control over Terms and Conditions (TnC) related elements. |
| showSaveImage | boolean | No | Controls 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. |
| hidePaymentButton | boolean | No | Controls 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. |
| paging | boolean | No | Controls 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
| Option | Type | Required | Description |
|---|---|---|---|
| showCardHolderName | boolean | No | Controls 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. |
| CVVForSavedCard | boolean | No | Controls 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
| Option | Type | Required | Description |
|---|---|---|---|
| showTnC | boolean | No | Controls 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. |
| mode | boolean | No | Controls 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 |
| url | string | conditional | The page URL of the Terms and Conditions (TnC) provided by the merchant. This field is mandatory when displayTnC is set to true. |
appearance object
| Option | Type | Required | Description |
|---|---|---|---|
| colorAction | string | No | The 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. |
| colorBackground | string | No | The 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. |
| colorBoxStroke | string | No | The 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. |
| colorDisabled | string | No | The 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. |
| colorError | string | No | The 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. |
| colorFormBackground | string | No | The 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. |
| colorFormBorder | string | No | The 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. |
| colorInverse | string | No | The 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. |
| colorBoxFillingOutline | string | No | The 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. |
| colorPlaceholder | string | No | The 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. |
| colorPrimary | string | No | The 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. |
| colorSecondary | string | No | The 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. |
| button | font object | No | Controls the styling of the button. For the specific associated UI, please refer to the design mockups. |
| heading | font object | No | Controls the styling of the title. For the specific associated UI, please refer to the design mockups. |
| subHeading | font object | No | Controls the styling of the parent title. For the specific associated UI, please refer to the design mockups. |
| headingPopup | font object | No | Controls the styling of the pop-up window's title. For the specific associated UI, please refer to the design mockups. |
| label | font object | No | Controls the styling of the label elements. For the specific associated UI, please refer to the design mockups. |
| labelInfo | font object | No | Controls the styling of the text title. For the specific associated UI, please refer to the design mockups. |
| labelPopup | font object | No | Controls the styling of the text title within the pop-up window. For the specific associated UI, please refer to the design mockups. |
| inputField | font object | No | Controls the styling of the text within the input fields. For the specific associated UI, please refer to the design mockups. |
| inputFieldInfo | font object | No | Controls the styling of the text. For the specific associated UI, please refer to the design mockups. |
| inputFieldPopup | font object | No | Controls the styling of the text within the pop-up window. For the specific associated UI, please refer to the design mockups. |
| paragraph | font object | No | Controls the styling of the footer. For the specific associated UI, please refer to the design mockups. |
| placeholder | font object | No | Controls the styling of the placeholder text within input fields. For the specific associated UI, please refer to the design mockups. |
| borderRadius | array | No | Controls 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 |
| logoPosition | string | No | Controls 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
| Option | Type | Required | Description |
|---|---|---|---|
| fontFamily | string | Yes | The font family. For example: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif |
| fontSize | string | Yes | The font size. For example: 16px |
| fontWeight | string | Yes | The font weight. For example: 400 |
| letterSpacing | string | Yes | The letter spacing. For example: 0.3px |
| lineHeight | string | Yes | The 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.
| Option | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Fixed value: payment_completed |
| sessionID | string | Yes | It is the same as the sessionID used when invoking the Drop-in. |
| merchantTransID | string | Yes | The transaction order number, which can be used to retrieve details via the GET Payment API. |
| econtext | object | No | Coming Soon |
payment_failed
This event is returned when the user completes a payment within the Drop-in, but the payment result is unsuccessful.
| Option | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Fixed value: payment_failed |
| sessionID | string | Yes | It is the same as the sessionID used when invoking the Drop-in. |
| merchantTransID | string | Yes | The transaction order number, which can be used to retrieve details via the GET Payment API. |
| code | string | No | The payment failure is indicated by an online response code. |
| message | string | No | The 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.
| Option | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Fixed value: payment_failed |
| sessionID | string | Yes | It is the same as the sessionID used when invoking the Drop-in. |
| code | string | No | The response codes are detailed in the table below. |
| message | string | No | The response codes are detailed in the table below. |
Response Codes
| Error detail | Code | Message |
|---|---|---|
| Invalid field length or format | V0000 | field {} invalid format |
| Required field missing or empty | V0001 | field {} absent or empty |
| Invalid field enumeration value | V0002 | field {} invalid value |
| Session ID not found | B2001 | Session ID not found |
| Session ID exists but order has been successfully paid | B2002 | Order has been paid |
| Session ID exists but order has expired | B2003 | Order closed |
| Other errors | B2004 | Payment error |
| No available payment methods for current order | B2005 | No available payment method |
| Payment failed | B2006 | Payment failed |
payment_cancelled
This event is returned when the user actively terminates the payment process and exits the Drop-in.
| Option | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Fixed value: payment_cancelled |
| sessionID | string | Yes | It 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.
| Option | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Fixed value: order_created |
| sessionID | string | Yes | It is the same as the sessionID used when invoking the Drop-in. |
| merchantTransID | string | Yes | The transaction order number, which can be used by the user to query order details at a later time. |
| econtext | object | Yes | This event is returned when a payment method that requires displaying independent payment information needs to be presented. |
econtext
| Option | Type | Required | Description |
|---|---|---|---|
| paymentBrand | string | Yes | Payment Brand |
| confirmationCode | string(32) | No | The confirmation number that merchant needs to diplay on payment page for user to complete the subsequent payment process at convenience stores. |
| paymentCode | string(32) | No | A number customers that merchant needs to diplay on payment page for user to complete the follow-up payment process at convenience stores. |
| customerFee | string(32) | No | Additional fee charged to users for specific payment brands. |
| orderID | string(24) | No | Remitters/payers name that merchant needs to display on payment page for user to send money as. |
| bankName | string(300) | No | The name of the bank of receving account that merchant needs to display on payment page for user to wire funds. |
| accountBranchName | string(300) | No | The account branch name of receving account that merchant needs to display on payment page for user to wire funds. |
| accountBranchCode | string(24) | No | The account branch code of receving account that merchant needs to display on payment page for user to wire funds. |
| accountNumber | string(32) | No | The account number of receving account that merchant needs to display on payment page for user to wire funds. |
| accountType | string(12) | No | The account type of receving account that merchant needs to display on payment page for user to wire funds. |
| accountName | string(300) | No | The account name of receving account that merchant needs to display on payment page for user to wire funds. |
| bankID | string(32) | No | The institution of receving account that merchant needs to display on payment page for user to complete the follow-up payment process via PayEasy. |
| customerID | string(32) | No | The customer number of receving account that merchant needs to display on payment page for user to complete the follow-up payment process via PayEasy. |
| expiryDate | datetime | No | The payment due date by which user must complete the follow-up payment process. Format: ISO 8601 YYYY-MM-DDThh:mm:ssTZD |
| instructionURL | string(300) | No | A URL for an instructions page that merchant needs to display it on payment page to guide users. |

