Getnet DocsGetnet Docs

Initialize the Library

Initialization is a mandatory requirement that must be performed exactly once when your application starts. This process configures the core TPVPC components, detects the connected PIN pad, and establishes the communication context required for all subsequent operations.

The fnDllIniTpvpcLatente Function

The entry point for any Get Central session is the fnDllIniTpvpcLatente function. This function initializes the communication layer and must be executed before any payment, pre-authorization, confirmation, or refund operation. If initialization succeeds, the library remains active for the lifetime of the application.

Initialization Parameters

The initialization call requires a fixed set of parameters. The table below lists the exact parameter names as defined by the library, without path prefixes, together with their purpose.

ParameterTypeRequiredDescription
cComercioStringYesMerchant number. The acquirer provides this value.
cTerminalStringYesTerminal number. The acquirer provides this value.
cClaveFirmaStringYesThe merchant’s signature key. The acquirer provides this value.
cConfPuertoStringNoOptional parameter giving the port configuration. For a serial PIN pad, COM<port>:,19200,N,8,1. For a USB PIN pad it depends on the model: i6280 uses USB,2816,25216,2,2; i6550 uses USB,2816,25936,2,2.
cVersionStringNoOptional parameter giving the protocol version to use. Possible values: 5.1, 6.1 or 8.1. It varies with the PIN pad’s software version.

The parameters cConfPuerto and cVersion are optional and should normally be left empty unless explicitly instructed by the acquirer.

Implementation Example

The example below shows a typical C# implementation of the initialization call. The application must verify that the return value is 0 before proceeding with any transaction.

int result = fnDllIniTpvpcLatente(
    "99999999",     // cComercio
    "00000001",     // cTerminal
    "CLAVE123456",  // cClaveFirma
    "",             // cConfPuerto
    ""              // cVersion
);

if (result == 0)
{
    // Library initialized successfully
}

Important Considerations

Initialization must only be performed once per application lifecycle. Repeating the initialization call without properly closing the library may result in communication errors or locked resources.

If the function returns a value other than 0, the library has not been initialized. The application must evaluate the returned error code and must not attempt any financial operation until initialization succeeds.

A -2 here means the configuration XML could not be loaded — not a communication failure. Check the values you passed and see the return codes per function in Result Codes and Errors.

Next Steps

After successful initialization, the application can begin executing financial operations:

  1. Process a Single-Step Payment
  2. Handle Result Codes and Errors