API examples
卡銷售
{
"messageId": "message_67890",
"posId": "pos_12345",
"transactionType": "SALE",
"originalTerminalTransactionId": "",
"requestAmount": 30,
"currency": "HKD",
"preferredEntryMode": "CARD"
}
{
"messageId": "message_67890",
"posId": "pos_12345",
"responseCode": 1000,
"responseResult": "SUCCESS",
"terminalTransactionId": "a91606ddd339fdf7908c3f91d3da022cff87d962",
"transactionPrintData": {
"acqReferenceId": "123456",
"baseAmount": 30,
"batch": 1,
"cardData": {
"atc": "0003",
"maskedExpiry": "XX/XX",
"maskedPan": "XXXXXXXXXXXX0010",
"tc": "aabbccddeeff1122",
"tvr": "0000000000"
},
"currency": "HKD",
"dateTime": "2019-06-25T08:33:36+0000",
"entryMode": "CONTACTLESS",
"mid": "112233",
"paymentBrand": "VISA",
"paymentInstrumentType": "CARD",
"posReferenceId": "message_67890",
"shopAddress": "Unit 1301-09 & 19-20, Tower II, Grand Century Place, 193 Prince Edward Road West, Kowloon, Hong Kong",
"shopEmail": "[email protected]",
"shopLogo": "data:image/svg+xml;charset=utf8,<svg viewBox=\" 0 0 384 70\" xmlns=\"http://www.w3.org/2000/svg\"><g fill-rule=\"evenodd\"><path d=\"m0.65304 68.413 27.707-65.77h17.445l27.801 65.77h-19.405l-4.6646-11.755h-25.282l-4.6646 11.755h-18.938zm28.92-25.842h14.647l-7.2767-18.472-7.37 18.472zm56.472 25.842v-65.304h28.081c16.419 0 27.054 8.4895 27.054 22.856v0.18658c0 15.486-11.848 23.603-27.987 23.603h-9.0492v18.658h-18.098zm18.098-32.838h8.6761c6.3438 0 10.355-3.4518 10.355-8.5828v-0.18658c0-5.5975-4.0115-8.4895-10.449-8.4895h-8.5828v17.259zm84.553 34.145c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958s35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /><polygon points=\"236.4 68.413 236.4 0.311 254.03 0.311 254.03 68.413\" /><polygon points=\"268.02 68.413 268.02 0.311 285.66 0.311 285.66 68.413\" /><path d=\"m333.17 69.72c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958 20.151 0 35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /></g></svg>",
"shopName": "SPECTRA Technologies",
"shopPhone": "2319 2918",
"tid": "112233",
"totalAmount": 30,
"trace": 31,
"transactionId": "a91606ddd339fdf7908c3f91d3da022cff87d962",
"transactionStatus": "APPROVED",
"transactionType": "SALE"
}
}
{
"messageId": "message_67890",
"posId": "pos_12345",
"responseCode": 1000,
"responseResult": "SUCCESS",
"terminalTransactionId": "ab375a7257abd482bc281c7db2cebf4c1516fed9",
"transactionPrintData": {
"acqReferenceId": "123456",
"baseAmount": 30,
"batch": 1,
"cardData": {
"aid": "a0000000031010",
"atc": "0001",
"cardholderName": "FULL FUNCTIONAL",
"maskedExpiry": "XX/XX",
"maskedPan": "XXXXXXXXXXXX0010",
"tc": "d77939976b89fde8",
"tsi": "e800",
"tvr": "0280881000"
},
"currency": "HKD",
"dateTime": "2019-06-25T08:34:38+0000",
"entryMode": "CHIP",
"mid": "112233",
"paymentBrand": "VISA",
"paymentInstrumentType": "CARD",
"posReferenceId": "message_67890",
"shopAddress": "Unit 1301-09 & 19-20, Tower II, Grand Century Place, 193 Prince Edward Road West, Kowloon, Hong Kong",
"shopEmail": "[email protected]",
"shopLogo": "data:image/svg+xml;charset=utf8,<svg viewBox=\" 0 0 384 70\" xmlns=\"http://www.w3.org/2000/svg\"><g fill-rule=\"evenodd\"><path d=\"m0.65304 68.413 27.707-65.77h17.445l27.801 65.77h-19.405l-4.6646-11.755h-25.282l-4.6646 11.755h-18.938zm28.92-25.842h14.647l-7.2767-18.472-7.37 18.472zm56.472 25.842v-65.304h28.081c16.419 0 27.054 8.4895 27.054 22.856v0.18658c0 15.486-11.848 23.603-27.987 23.603h-9.0492v18.658h-18.098zm18.098-32.838h8.6761c6.3438 0 10.355-3.4518 10.355-8.5828v-0.18658c0-5.5975-4.0115-8.4895-10.449-8.4895h-8.5828v17.259zm84.553 34.145c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958s35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /><polygon points=\"236.4 68.413 236.4 0.311 254.03 0.311 254.03 68.413\" /><polygon points=\"268.02 68.413 268.02 0.311 285.66 0.311 285.66 68.413\" /><path d=\"m333.17 69.72c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958 20.151 0 35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /></g></svg>",
"shopName": "SPECTRA Technologies",
"shopPhone": "2319 2918",
"tid": "112233",
"totalAmount": 30,
"trace": 32,
"transactionId": "ab375a7257abd482bc281c7db2cebf4c1516fed9",
"transactionStatus": "APPROVED",
"transactionType": "SALE"
}
}
{
"messageId": "message_67890",
"posId": "pos_12345",
"responseCode": 1000,
"responseResult": "SUCCESS",
"terminalTransactionId": "f5066b7fa8acc340a3f84a177e8b1b2e556fb80e",
"transactionPrintData": {
"acqReferenceId": "123456",
"baseAmount": 30,
"batch": 1,
"cardData": {
"cvmResult": "Signature",
"maskedExpiry": "XX/XX",
"maskedPan": "XXXXXXXXXXXX0689",
"signatureData": {
"data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.2\" baseProfile=\"tiny\" height=\"736\" width=\"672\"><g stroke-linejoin=\"round\" stroke-linecap=\"round\" fill=\"none\" stroke=\"black\"><path stroke-width=\"12\" d=\"M221,280c0,0 0,0 0,0 1,4 1,5 3,9 \"/><path stroke-width=\"8\" d=\"M224,289c4,9 4,9 9,19 \"/><path stroke-width=\"6\" d=\"M233,308c8,12 8,12 16,24 13,19 12,19 27,37 20,25 20,25 43,48 19,20 18,20 39,37 11,9 12,9 25,16 18,10 18,11 38,18 9,3 10,2 20,3 \"/><path stroke-width=\"7\" d=\"M441,491c5,0 5,1 10,0 \"/><path stroke-width=\"8\" d=\"M451,491c5,-1 7,0 10,-3 4,-4 3,-6 5,-12 \"/><path stroke-width=\"7\" d=\"M466,476c3,-14 3,-15 5,-29 \"/><path stroke-width=\"6\" d=\"M471,447c4,-21 4,-21 7,-42 2,-25 2,-25 3,-50 1,-25 1,-25 1,-50 0,-8 2,-8 0,-16 \"/><path stroke-width=\"7\" d=\"M482,289c-1,-5 -2,-6 -6,-10 \"/><path stroke-width=\"10\" d=\"M476,279c-1,-1 -1,-2 -2,-1 -12,5 -13,4 -23,12 \"/><path stroke-width=\"7\" d=\"M451,290c-21,16 -21,17 -41,35 \"/><path stroke-width=\"6\" d=\"M410,325c-15,13 -14,14 -28,27 -53,49 -53,50 -106,97 -37,32 -37,33 -76,63 -26,20 -26,20 -54,38 -20,12 -20,11 -41,22 -9,5 -9,6 -18,10 \"/><path stroke-width=\"8\" d=\"M87,582c-4,1 -4,0 -7,1 \"/></g></svg>",
"height": 736,
"type": "SVG",
"width": 672
}
},
"currency": "HKD",
"dateTime": "2019-06-25T08:35:11+0000",
"entryMode": "MAGSTRIPE",
"mid": "112233",
"paymentBrand": "MASTER",
"paymentInstrumentType": "CARD",
"posReferenceId": "message_67890",
"shopAddress": "Unit 1301-09 & 19-20, Tower II, Grand Century Place, 193 Prince Edward Road West, Kowloon, Hong Kong",
"shopEmail": "[email protected]",
"shopLogo": "data:image/svg+xml;charset=utf8,<svg viewBox=\" 0 0 384 70\" xmlns=\"http://www.w3.org/2000/svg\"><g fill-rule=\"evenodd\"><path d=\"m0.65304 68.413 27.707-65.77h17.445l27.801 65.77h-19.405l-4.6646-11.755h-25.282l-4.6646 11.755h-18.938zm28.92-25.842h14.647l-7.2767-18.472-7.37 18.472zm56.472 25.842v-65.304h28.081c16.419 0 27.054 8.4895 27.054 22.856v0.18658c0 15.486-11.848 23.603-27.987 23.603h-9.0492v18.658h-18.098zm18.098-32.838h8.6761c6.3438 0 10.355-3.4518 10.355-8.5828v-0.18658c0-5.5975-4.0115-8.4895-10.449-8.4895h-8.5828v17.259zm84.553 34.145c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958s35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /><polygon points=\"236.4 68.413 236.4 0.311 254.03 0.311 254.03 68.413\" /><polygon points=\"268.02 68.413 268.02 0.311 285.66 0.311 285.66 68.413\" /><path d=\"m333.17 69.72c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958 20.151 0 35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /></g></svg>",
"shopName": "SPECTRA Technologies",
"shopPhone": "2319 2918",
"tid": "112233",
"totalAmount": 30,
"trace": 33,
"transactionId": "f5066b7fa8acc340a3f84a177e8b1b2e556fb80e",
"transactionStatus": "APPROVED",
"transactionType": "SALE"
}
}
{
"messageId": "",
"posId": "pos_12345",
"responseCode": 3010,
"responseResult": "FAILED",
"terminalTransactionId": ""
}
錢包銷售
{
"posId": "pos1234",
"messageId": "message1234",
"transactionType": "SALE",
"originalTerminalTransactionId": "",
"requestAmount": 10.00,
"currency": "HKD",
"preferredEntryMode": "QR_SCAN"
}
{
"posId": "pos1234",
"messageId": "message1234",
"responseResult": "SUCCESS",
"terminalTransactionId": "2ffafb3c39b1bfe28656941af37a7b08949efb8b",
"transactionPrintData": {
"acqReferenceId": "2019042922001424291000119699",
"baseAmount": 10.00,
"batch": 1,
"currency": "HKD",
"dateTime": "2019-04-29T02:14:03+0000",
"entryMode": "QR_SCAN",
"mid": "000001",
"paymentBrand": "ALIPAY",
"paymentInstrumentType": "WALLET",
"posReferenceId": "message1234",
"shopAddress": "Detail Address here",
"shopEmail": "[email protected]",
"shopLogo": "data:image/svg+xml;charset\u003dutf8,\u003csvg viewBox\u003d\" 0 0 384 70\" xmlns\u003d\"http://www.w3.org/2000/svg\"\u003e\u003cg fill-rule\u003d\"evenodd\"\u003e\u003cpath d\u003d\"m0.65304 68.413 27.707-65.77h17.445l27.801 65.77h-19.405l-4.6646-11.755h-25.282l-4.6646 11.755h-18.938zm28.92-25.842h14.647l-7.2767-18.472-7.37 18.472zm56.472 25.842v-65.304h28.081c16.419 0 27.054 8.4895 27.054 22.856v0.18658c0 15.486-11.848 23.603-27.987 23.603h-9.0492v18.658h-18.098zm18.098-32.838h8.6761c6.3438 0 10.355-3.4518 10.355-8.5828v-0.18658c0-5.5975-4.0115-8.4895-10.449-8.4895h-8.5828v17.259zm84.553 34.145c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958s35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule\u003d\"nonzero\" /\u003e\u003cpolygon points\u003d\"236.4 68.413 236.4 0.311 254.03 0.311 254.03 68.413\" /\u003e\u003cpolygon points\u003d\"268.02 68.413 268.02 0.311 285.66 0.311 285.66 68.413\" /\u003e\u003cpath d\u003d\"m333.17 69.72c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958 20.151 0 35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule\u003d\"nonzero\" /\u003e\u003c/g\u003e\u003c/svg\u003e",
"shopName": "Shop Name here",
"shopPhone": "2234 1234",
"tid": "000001",
"tipAmount": 0,
"totalAmount": 10.00,
"trace": 8,
"transactionId": "2ffafb3c39b1bfe28656941af37a7b08949efb8b",
"transactionStatus": "APPROVED",
"transactionType": "SALE",
"walletData": {
"data": "walletdata"
}
}
}
現金銷售
{
"messageId": "message_67890",
"posId": "pos_12345",
"transactionType": "SALE",
"originalTerminalTransactionId": "",
"requestAmount": 30,
"currency": "HKD",
"preferredEntryMode": "CASH"
}
{
"messageId": "message_67890",
"posId": "pos_12345",
"responseCode": 0,
"responseResult": "SUCCESS",
"terminalTransactionId": "0f4cecd1b6673fb0c027e306bd228716fee122c4",
"transactionPrintData": {
"baseAmount": 30,
"batch": 1,
"cashData": {
"changeDue": 70,
"receivedAmount": 100
},
"currency": "HKD",
"dateTime": "2019-06-25T08:36:58+0000",
"entryMode": "UNKNOWN",
"mid": "000001",
"paymentBrand": "CASH",
"paymentInstrumentType": "CASH",
"posReferenceId": "message_67890",
"shopAddress": "Unit 1301-09 & 19-20, Tower II, Grand Century Place, 193 Prince Edward Road West, Kowloon, Hong Kong",
"shopEmail": "[email protected]",
"shopLogo": "data:image/svg+xml;charset=utf8,<svg viewBox=\" 0 0 384 70\" xmlns=\"http://www.w3.org/2000/svg\"><g fill-rule=\"evenodd\"><path d=\"m0.65304 68.413 27.707-65.77h17.445l27.801 65.77h-19.405l-4.6646-11.755h-25.282l-4.6646 11.755h-18.938zm28.92-25.842h14.647l-7.2767-18.472-7.37 18.472zm56.472 25.842v-65.304h28.081c16.419 0 27.054 8.4895 27.054 22.856v0.18658c0 15.486-11.848 23.603-27.987 23.603h-9.0492v18.658h-18.098zm18.098-32.838h8.6761c6.3438 0 10.355-3.4518 10.355-8.5828v-0.18658c0-5.5975-4.0115-8.4895-10.449-8.4895h-8.5828v17.259zm84.553 34.145c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958s35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /><polygon points=\"236.4 68.413 236.4 0.311 254.03 0.311 254.03 68.413\" /><polygon points=\"268.02 68.413 268.02 0.311 285.66 0.311 285.66 68.413\" /><path d=\"m333.17 69.72c-20.151 0-35.077-15.02-35.077-33.771v-0.18658c0-18.752 15.113-33.958 35.264-33.958 20.151 0 35.077 15.02 35.077 33.771v0.18658c0 18.752-15.113 33.958-35.264 33.958zm0.18658-16.326c9.8889 0 16.513-8.023 16.513-17.445v-0.18658c0-9.5157-6.717-17.632-16.699-17.632s-16.606 8.023-16.606 17.445v0.18658c0 9.4224 6.8102 17.632 16.792 17.632z\" fill-rule=\"nonzero\" /></g></svg>",
"shopName": "SPECTRA Technologies",
"shopPhone": "2319 2918",
"tid": "000001",
"totalAmount": 30,
"trace": 36,
"transactionId": "0f4cecd1b6673fb0c027e306bd228716fee122c4",
"transactionStatus": "APPROVED",
"transactionType": "SALE"
}
}