Use the TIM API standard interface to integrate an ECR application with Worldline terminals. This guide introduces the API, explains how to configure a terminal connection and guides, and shows how to configure settings outside your application.
The TIM API supports requirements across several markets. This guide is for ECR integrators who need to implement TIM API functionality in their products. It also describes synchronous and asynchronous modes, functions, notifiers, and data elements, and provides implementation examples. When an example differs from the description of a function or data element, use the description as the authoritative source.
Available SDKs
Native C implementation for embedded and system-level integration
Java implementation for cross-platform applications
.NET implementation for Windows applications
Swift implementation for iOS and macOS applications
JavaScript implementation for web and Node.js applications
Platform Requirements
Before choosing an SDK, check the Compatibility & OS Support page for minimum platform versions and supported operating systems.
Integration Steps
Before starting integration, complete the following steps:
Step 1: Configure terminal settings
Create and configure a TerminalSettings instance before creating a Terminal instance. Changes made to TerminalSettings after terminal initialization are ignored. Language-specific TerminalSettings and Terminal implementation are provided below.
Step 2: Create terminal instance
Create Terminal instance using the created TerminalSettings
Step 3: Select a network connection
Select the communication method for connecting to the terminal. Supported connection options differ between programming languages.
Broadcast mode
Use this mode when you know the terminal ID (TID). The TIM API broadcasts on the default interface and connects to the matching terminal using the connection information that the terminal sends.
Direct connect
Use this mode when you know the terminal’s IP address. The TIM API connects directly to that address.
| Language | Communication protocol | Broadcast Mode (TID) | Direct Connect (IP address) | Bluetooth |
|---|---|---|---|---|
| Java | TCP/IP (Port 7784) | Yes | Yes | Yes (mobile devices) |
| .NET | TCP/IP (Port 7784) | Yes | Yes | No |
| Swift | TCP/IP (Port 7784) | Yes | Yes | Yes (mobile devices) |
| C | TCP/IP (Port 7784) | Yes | Yes | No |
| JavaScript | WebSockets (Port 80/8080) | No | Yes | No |
Important: JavaScript uses WebSockets and requires the terminal IP address to be configured in TerminalSettings.
Step 4: Configure guides
Guides support different use cases. The Retail guide is the basic guide and is active by default. Add guides to the Guides list member to configure them.
The following example creates a terminal and adds the Hospitality and Gastro guides:
using SIX.TimApi;
// Create settings with Terminal-ID of terminal to connect to
TerminalSettings settings = new TerminalSettings();
settings.TerminalId = "12345678";
// add wanted guides
settings.Guides.Add(Constants.Guides.Hospitality);
settings.Guides.Add(Constants.Guides.Gastro);
// Create terminal
Terminal terminal = new Terminal(settings);
//...
// Disconnect from terminal and clean up properly
terminal.dispose();
// Before exiting your application make sure to clean up all resources.
// It is not required to call TimApiDispose() for disposing individual
// terminal instances. It is just required before exiting the application
Terminal.TimApiDispose();
Step 5: Configure settings in a file
Use the TimApi.cfg configuration file to set TerminalSettings outside your application. To configure multiple Terminal instances, add separate INI sections and assign each section a DeviceId. Use the same DeviceId when you create the TerminalSettings instance to apply that section’s settings. If you do not specify a DeviceId, the global INI section applies.
The configuration is applied in this order:
- The TIM API reads
TimApi.cfgwhen it creates a TerminalSettings object. - You can override settings from the file by using the TerminalSettings setter methods.
Configuration file parameters
For detailed information about these parameters, refer to the API Reference page for your programming language.
| Parameter | Description |
|---|---|
| LogDir | Directory where log files are generated |
| LogTerminal | Logging level of terminal logs, defines how much information will be logged. For detailed values see Logging / LogLevel |
| LogStateMachineTerminal | Logging level of state-machine logs, defines how much information will be logged. For detailed values see Logging / LogLevel |
| LogBackend | Logging level of backend logs, defines how much information will be logged. For detailed values see Logging / LogLevel |
| LogComm | Logging level of comm logs, defines how much information will be logged. For detailed values see Logging / LogLevel |
| LogRetainArchiveCount | Defines how many log files will be kept before deleting (or archiving) the oldest. |
| TerminalId | Terminal ID to be broadcasted in case of ConnectionMode Broadcast |
| ConnectionMode | Connection mode used between ECR and EFT. For more information see ConnectionMode |
| ConnectionIPString | IP address of the EFT terminal in case of ConnectionMode OnFixIP and Websockets. |
| ConnectionIPPort | Listening Port of the EFT terminal in case of ConnectionMode OnFixIP and Websockets. |
| SerialPort | Serial port to be used for serial connection in case of ConnectionMode Serial. |
| SerialBaudrate | Baudrate used in case of ConnectionMode Serial. |
| ProtocolType | Protocol type. For detailed values see ProtocolType. |
| FetchBrands | Automatically retrieves application information during logging in. Default is on (value “On” or “Off”) |
| AutoCommit | After executing the Transaction- function the API commits the transaction automatically. Default is on (value “On” or “Off”) |
| RequestRepetition | Defines how many times a Commit or Rollback request is sent repeatedly, if the original request has been lost. (Default = 0, means disabled = no repetition) |
| EnableKeepAlive | Defines if KeepAlive functionality shall be enabled or not. Default is on (value “On” or “Off”). |
| SecuredConnection | Defines if the TCP/IP or Websocket connection shall be secured using TLS. Default is off (value “On” or “Off”). |
Place TimApi.cfg in one of these locations:
- The working directory used to launch the application. Set the application’s working directory so the TIM API can find the file.
- The directory that contains
TimApi.dll.
The TIM API uses the first TimApi.cfg file it finds.
Example configuration file
The following example contains a global INI section and two sections for specific DeviceIds:
[global]
ProtocolType = SIXml
TerminalId = 21001234
LogDir = var/log
[MyDeviceId]
ProtocolType = SIXml
TerminalId = 12345678
LogDir = var/otherLog
[MySecondDeviceId]
ProtocolType = SIXml
TerminalId = 87654321
LogDir = var/yetAnotherLog
ConnectionMode = OnFixIp
ConnectionIPString = 192.168.1.13