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

Returned when the payment is successfully completed.

Merchants can use this event to update UI or notify users of a successful transaction.

FieldTypeM/ODescription
typeStringMFixed value: payment_completed
sessionIDStringMSame as sessionID in the payment command
merchantTransIDStringMMerchant transaction ID, used for querying order details
econtextObjectOReturned when independent payment method info needs to be displayed

payment_failed

Returned when the payment fails.

Merchants should display code or message to the user for further action.

FieldTypeM/ODescription
typeStringMFixed value: payment_failed
sessionIDStringMSame as sessionID in the payment command
merchantTransIDStringOMerchant transaction ID
codeStringOResponse code returned for failed payment
messageStringOResponse message returned for failed payment

payment_not_preformed

Drop-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.

FieldTypeM/ODescription
typeStringMFixed value: payment_not_preformed
sessionIDStringMSame as sessionID in the payment command
codeStringOStandard V/B class response code
messageStringOStandard V/B class response message

Standard Response Codes

CodeMessage
V0000field invalid format
V0001field absent or empty
V0002field invalid value
B2001Session ID not found
B2002Order has been paid
B2003Order closed
B2004Payment error
B2005No available payment method
B2006Payment failed (fallback code)

payment_cancelled

Returned 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.

FieldTypeM/ODescription
typeStringMFixed value: payment_cancelled
sessionIDStringMSame as sessionID in the payment command


SDK Events occur in optional Order Flow

payment_method_select

It 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

FieldTypeM/ODescription
typeStringMFixed value: payment_method_selected
verificationIDStringM16-character UUID identifying the verification request
first6NoStringOThe first 6 digits of the card number
last4NoStringOThe last 4 digits of the card number
paymentBrandStringOThe card brand (e.g., Visa, Mastercard, JCB)

Merchant response: dropInInstance.value.callbackVerification({msg: '',isVaild: '', id})

FieldTypeM/ODescription
msgStringMCustom message displayed to the user when isValid is false
isVaildStringMtrue or false
idStringO16-character UUID identifying the verification request