Our POS solution is aimed at the restaurant, counter top and unattended retail space. With a range of devices and development languages supported you’ll find a solution that fits!
First step in getting started is to pick your POS device from the following list of manufacturers. If you haven’t already, follow the links below to see details about your device.
Our Websockets solution lets you install our standalone local websockets service. This service provides a flexible API layer that let’s you control all aspects of the POS flow using your choice of programming language.
ws-setup
and follow the
instructions.start.bat
(Windows) or
start.sh
(Linux) to start the service.Once started, follow the below steps to get your first transaction processed!
Use the code shown to send an initialization request to the server. This will authenticate with the PayconexPlus gateway and retrieve settings required for operation.
{
"type": "REQ_INIT_WITH_CONFIGURATION",
"data": {
"terminalId": "136007",
"secret": "someSecretPhrase"
}
}
{
"type": "RES_ON_SETTINGS_RETRIEVED",
"data": {
"settings": {
"currencySymbol": "$",
"currency": "USD",
"features": {
"allowMsrFallback": true,
...
},
"merchantDetails": {
"name": "Merchant",
"city": "Dublin",
"address1": "11 MyChoiceMerchant",
"address2": "SomePlace",
...
}
}
},
"responseType": "RESPONSE_OK"
}
Once the service has returned a successful authentication you can now initialize the device. Use this code and wait for the device to connect.
{
"type": "REQ_INIT_DEVICE",
"data": {
"device": "IDTECH",
"connectionType": "USB",
"inputMethod": "SWIPE_OR_INSERT"
}
}
{
"type": "RES_ON_DEVICE_CONNECTED",
"data": {
"deviceType": "Idtech",
"deviceInfo": {
"serialNumber": "824T844193",
"kernelVersion": "EMV Common L2 V1.10.037",
"firmwareVersion": "ID TECH Augusta USB-HID V1.03",
"connectionType": "USB"
}
},
"responseType": "RESPONSE_OK"
}
Once the device has connected, simply send the amount to the Websockets that you wish to process for and the device should prompt for a card. Presenting a valid card should result in an online message being sent to the bank and your first transaction processed!
{
"type": "REQ_PROCESS_SALE",
"data": {
"amount": "12.50",
}
}
{
"type": "RES_ON_SALE_RESPONSE",
"data": {
"saleResponse": {
"cardHolderName": "Test Card 12 Uat Usa",
"cardNumber": "374245*****1006",
"expiryDate": "0120",
"authorizedAmount": 12.5,
"currency": "USD",
"uniqueRef": "EX3QVJ56L6",
"dateTime": "2019-11-08T11:19:30.794Z",
"description": "APPROVAL",
"code": "A",
"cardType": "American Express",
"emvTags": [],
"orderId": "KQK9Z8",
...
}
},
"responseType": "RESPONSE_OK"
}
Setup the SDK using the initialize
command.
There are 2 ways to use this method.
CoreAPIListener
interface. (the this
in the code sample)register*Listener
to register callbacks in different locations depending on the structure of your application. CoreAPIListener
this will lead to duplicate callbacks firing.
initWithConfiguration
call will authenticate with the PayconexPlus gateway and retrieve settings required for operation.
The onSettingsRetrieved
callback will fire on success. At this point we know that we have successful credentials and the SDK is ready to connect a device.
JavaTerminal.getInstance().initialize(this);
JavaTerminal.getInstance().setMode(CoreMode.TEST);
JavaTerminal.getInstance().initWithConfiguration(MainActivity.this, TERMINAL_ID, SECRET);
Terminal.Instance.Initialize(this);
Terminal.Instance.SetMode(CoreMode.TEST);
Terminal.Instance.InitWithConfiguration(TERMINAL_ID, SECRET);
You can now initialize the device. Use this code and wait for the device to connect. Change the device name and connection method to match your needs.
The onDeviceConnected
callback will fire on success. Once this fires the SDK and device are ready to use!
JavaTerminal.getInstance().initDevice(DeviceEnum.IDTECH, DeviceConnectionType.USB, null);
Terminal.Instance.InitDevice(DeviceEnum.IDTECH, DeviceConnectionType.USB, null);
Once the device is connected send the amount required via a ProcessSale
call and the device should prompt for a card. Presenting a valid card should result in an online authentication being sent to the bank and the SDK processes the response.
The onSaleResponse
callback will fire on success. Here is where you can display receipts or do any other post transaction processing.
CoreSale sale = new CoreSale(BigDecimal.valueOf(Double.parseDouble(2.22)));
JavaTerminal.getInstance().processSale(sale);
CoreSale sale = new CoreSale(Math.Round(12.3, 2, MidpointRounding.ToEven));
Terminal.Instance.ProcessSale(sale);