Event Callbacks
The SDK triggers event callbacks in the EMV Core SDK to notify the application of specific events during the transaction lifecycle. They enable developers to respond dynamically to changes in transaction status and system events. These callbacks provide real-time updates, ensuring seamless communication between the SDK and the application.
These are the available callbacks.
You can read a more detailed description of each Callback event in the sections below.
CardTokenReceived
CardTokenReceivedThis event is triggered after a card token is successfully retrieved.
Open loop example:
{"jsonrpc":"2.0", "method": "CardTokenReceived", "params": {"status": "OK",
"errorCode": 0, "errorDescription": "", "CardToken":
"WSAr79nKPywW3INXrWvr6IL3vgTgSJlwZBgseKDmMHM=", "PartialPan": ""}, "id": 702}Closed loop example:
"LocalCLP", "errorCode": 0, "errorDescription": "", "CardToken": "73D0D1C5",
"PartialPan": ""}, "id": 702}ReaderMessageEvent
ReaderMessageEventThis callback provides updates on user interface messages from the card reader.
{"jsonrpc": "2.0", "method": "ReaderMessageEvent", "params": {"index": 36,
"line1": "Authorizing", "line2": "Please wait"}}| Parameter | Description |
|---|---|
| index | The index of the message – Decimal value according to the Message Index table. Note: The actual text presented on the reader display depends on the Kiosk configuration and may differ from the table values. |
SystemStatusChanged
SystemStatusChangedThis method is only available for the Android operating system.
The SystemStatusChanged event indicates changes in the SDKs or connected devices' operational state.
void onTransactionComplete(TransactionResult result);SystemStatus is an enumeration representing the current state of the system. See the possible result values in the table below:
| Result | Description |
|---|---|
Ready | The SDK is ready for transactions. |
NotReady | The SDK is not operational. |
PaymentTransaction | A transaction is currently in progress. |
Update | A firmware or configuration update is ongoing. |
TransactionComplete
TransactionCompleteThe TransactionComplete is called by EMV Core when the transaction is complete and either succeeds or fails. Contains the details required by the POS to print a receipt and to link transactions to sale events
Open loop request:
{
"jsonrpc": "2.0",
"method": "TransactionComplete",
"params": {
"status": "OK",
"errorCode": 0,
"errorDescription": "",
"transactionId": "2046651064",
"authorizationDetails": {
"AmountAuthorized": 4.5,
"AmountRequested": 4.5,
"AuthorizationCode": "",
"PartialPan": "541333******4111",
"CardType": "MasterCard",
"IsTransactionApproved": true,
"eReceipt": "[https://s.wee.ai/tr/...eIHT](https://s.wee.ai/tr/...eIHT)",
"Card_ID": "",
"Card_Balance": 0.0,
"RRN": "",
"TransactionDbID": "2046651064",
"Transaction_Referance": "2046651064",
"CardToken": "5VXkNqtUDJBxQj9p/qTGt74jWaPHlRs7xxWa1Yu0gDI=",
"Additional_Parameters": {
"SiteId": "1",
"EntryMode": "4",
"MachineAuTime": "2025-09-03T14:12:30.006",
"NayaxTransactionId": "2046651064"
}
}
},
"id": 701
}Closed loop request:
{"jsonrpc":"2.0", "method": "TransactionComplete", "params":
{"status": "LocalCLP", "errorCode": 0, "errorDescription": "",
"transactionId": "4701113B", "authorizationDetails":
{"CardType": "Mifare", "Card_ID": "4701113B", "Card_Balance": 0.00,
"CardToken": "4701113B", "Additional_Parameters": {}}}, "id": 701}
Response:
{"jsonrpc":"2.0", "result":true, "id":701}
Updated 7 days ago