Skip to main content

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

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:

Configure terminal settings
Create terminal instance
Select a network connection
Configure guides
Configure settings in a file

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.

LanguageCommunication protocolBroadcast Mode (TID)Direct Connect (IP address)Bluetooth
JavaTCP/IP (Port 7784)YesYesYes (mobile devices)
.NETTCP/IP (Port 7784)YesYesNo
SwiftTCP/IP (Port 7784)YesYesYes (mobile devices)
CTCP/IP (Port 7784)YesYesNo
JavaScriptWebSockets (Port 80/8080)NoYesNo

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:

  1. The TIM API reads TimApi.cfg when it creates a TerminalSettings object.
  2. 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.

ParameterDescription
LogDirDirectory where log files are generated
LogTerminalLogging level of terminal logs, defines how much information will be logged. For detailed values see Logging / LogLevel
LogStateMachineTerminalLogging level of state-machine logs, defines how much information will be logged. For detailed values see Logging / LogLevel
LogBackendLogging level of backend logs, defines how much information will be logged. For detailed values see Logging / LogLevel
LogCommLogging level of comm logs, defines how much information will be logged. For detailed values see Logging / LogLevel
LogRetainArchiveCountDefines how many log files will be kept before deleting (or archiving) the oldest.
TerminalIdTerminal ID to be broadcasted in case of ConnectionMode Broadcast
ConnectionModeConnection mode used between ECR and EFT. For more information see ConnectionMode
ConnectionIPStringIP address of the EFT terminal in case of ConnectionMode OnFixIP and Websockets.
ConnectionIPPortListening Port of the EFT terminal in case of ConnectionMode OnFixIP and Websockets.
SerialPortSerial port to be used for serial connection in case of ConnectionMode Serial.
SerialBaudrateBaudrate used in case of ConnectionMode Serial.
ProtocolTypeProtocol type. For detailed values see ProtocolType.
FetchBrandsAutomatically retrieves application information during logging in. Default is on (value “On” or “Off”)
AutoCommitAfter executing the Transaction- function the API commits the transaction automatically. Default is on (value “On” or “Off”)
RequestRepetitionDefines how many times a Commit or Rollback request is sent repeatedly, if the original request has been lost. (Default = 0, means disabled = no repetition)
EnableKeepAliveDefines if KeepAlive functionality shall be enabled or not. Default is on (value “On” or “Off”).
SecuredConnectionDefines 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