SDK Event Reference
SDK Events are Zero Latency, client-side triggers that synchronize user website's UI with the payment lifecycle. it allows the frontend to instantly react to user actions—such as a BIN validation or a canceled window—ensuring a fluid user experience and status transpancy without page reloads in Drop-in.
SDK Events occur in Main Order Flow
payment_completed
payment_completedReturned when the payment is successfully completed.
Merchants can use this event to update UI or notify users of a successful transaction.
| Field | Type | M/O | Description |
|---|---|---|---|
| type | String | M | Fixed value: payment_completed |
| sessionID | String | M | Same as sessionID in the payment command |
| merchantTransID | String | M | Merchant transaction ID, used for querying order details |
| econtext | Object | O | Returned when independent payment method info needs to be displayed |
payment_failed
payment_failedReturned when the payment fails.
Merchants should display
codeormessageto the user for further action.
| Field | Type | M/O | Description |
|---|---|---|---|
| type | String | M | Fixed value: payment_failed |
| sessionID | String | M | Same as sessionID in the payment command |
| merchantTransID | String | O | Merchant transaction ID |
| code | String | O | Response code returned for failed payment |
| message | String | O | Response message returned for failed payment |
payment_not_preformed
payment_not_preformedDrop-in uses this event for errors that occur before calling the payment API. Example: sessionID in the payment command does not exist or is invalid.
Also returned if Drop-in finds no available payment methods for the current order.
| Field | Type | M/O | Description |
|---|---|---|---|
| type | String | M | Fixed value: payment_not_preformed |
| sessionID | String | M | Same as sessionID in the payment command |
| code | String | O | Standard V/B class response code |
| message | String | O | Standard V/B class response message |
Standard Response Codes
| Code | Message |
|---|---|
| V0000 | field invalid format |
| V0001 | field absent or empty |
| V0002 | field invalid value |
| B2001 | Session ID not found |
| B2002 | Order has been paid |
| B2003 | Order closed |
| B2004 | Payment error |
| B2005 | No available payment method |
| B2006 | Payment failed (fallback code) |
payment_cancelled
payment_cancelledReturned when the user actively terminates the payment process in Drop-in.
Merchants should not treat this as a failed transaction. The transaction result must be verified via backend query.
| Field | Type | M/O | Description |
|---|---|---|---|
| type | String | M | Fixed value: payment_cancelled |
| sessionID | String | M | Same as sessionID in the payment command |
SDK Events occur in optional Order Flow
payment_method_select
payment_method_selectIt is available in Card Bin Verification Function, which can be optional set-up in SDK Initialization.Returned when merchant request isVerifyPaymentBrand: true in SDK and user enter card information in drop-in page
Merchants can use this event to receive the card information and control in SDK response to allow if the card able to proceed the payment
| Field | Type | M/O | Description |
|---|---|---|---|
| type | String | M | Fixed value: payment_method_selected |
| verificationID | String | M | 16-character UUID identifying the verification request |
| first6No | String | O | The first 6 digits of the card number |
| last4No | String | O | The last 4 digits of the card number |
| paymentBrand | String | O | The card brand (e.g., Visa, Mastercard, JCB) |
Merchant response: dropInInstance.value.callbackVerification({msg: '',isVaild: '', id})
| Field | Type | M/O | Description |
|---|---|---|---|
| msg | String | M | Custom message displayed to the user when isValid is false |
| isVaild | String | M | true or false |
| id | String | O | 16-character UUID identifying the verification request |
Updated about 2 hours ago
