Quick Start – Your First Transaction

This quick start guide walks you through performing your first test payment using Get Central. By the end of this tutorial, you will have:
  • initialized the middleware,
  • executed a payment operation using PAGO, and
  • validated the transaction result using the XML response.
This guide focuses strictly on the minimal happy path, without covering advanced scenarios such as refunds, pre-authorizations, or recurring payments.

Requirements

Before you begin, ensure the following prerequisites are met:

  • Get Central middleware installed on a supported workstation
  • PIN Pad hardware connected and recognized by the operating system
  • Test credentials (cComercio, cTerminal, cClaveFirma) provided by your acquiring entity
information icon
Note: Some installations support simulation or test environments. Availability depends on the credentials and configuration supplied by the acquiring entity.

First Transaction Process

The first transaction consists of three mandatory steps:

  1. Initialize the middleware
  2. Execute a payment operation (PAGO)
  3. Validate the transaction result

Step 1: Initialize the Middleware

Initialization must be performed once per application lifecycle before executing any operation. A successful initialization prepares communication with the PIN Pad and enables payment execution.
ParameterTypeRequiredDescription
cComercioStringYesMerchant identifier assigned by the acquiring entity.
cTerminalStringYesTerminal identifier associated with the PIN Pad.
cClaveFirmaStringYesSignature key assigned to the merchant and terminal.
cConfPuertoStringNoCommunication port. If empty, the value is loaded from local configuration.
cVersionStringNoProtocol version. If empty, the default configured version is used.

Here's an example of how to initialize the middleware:

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

if (result != 0)
{
    // Initialization failed. Do not proceed.
}
A return value of 0 indicates that the middleware is ready for operations. Any other value indicates a technical error.

Step 2: Execute a Test Payment (PAGO)

Once initialization succeeds, you can execute a payment operation using cTipoOper = "PAGO". This operation performs a standard card-present payment and captures the funds immediately.
ParameterTypeRequiredDescription
cImporteStringYesTransaction amount in decimal format XXXXXXXXX.XX (for example, 1.00).
cFacturaStringYesUnique merchant reference for the transaction.
cTipoOperStringYesMust be set to PAGO.
information icon
Important: The currency is determined by the terminal configuration and is not passed as a parameter in card-present payment operations.

Here's an example of how to execute a payment operation:

StringBuilder xmlResponse = new StringBuilder(8192);

int result = fnDllOperPinPad(
    "1.00",        // cImporte
    "TEST0001",    // cFactura
    "PAGO",        // cTipoOper
    xmlResponse,
    xmlResponse.Capacity
);

if (result != 0)
{
    // Execution failed. Handle technical error.
}

When the operation starts, the PIN Pad prompts the cardholder to insert, swipe, or tap the card. Once the operation completes, the XML response buffer is populated.


Step 3: Validate the Transaction Result

After execution, the XML response must be parsed to determine whether the payment was authorized.

XML TagTypeDescription
<estado>StringExecution state. Finalized operations use value F.
<resultado>StringFinancial result (Autorizada or Denegada).
<codigoRespuesta>StringAuthorization or response code returned by the host.
<pedido>StringMerchant reference (cFactura).
The transaction must be considered AUTHORIZED only if the XML contains:
<estado>F</estado>
<resultado>Autorizada</resultado>
Any other combination must be treated as DENIED or FAILED, even if the execution return code was 0.

Persist the merchant reference and authorization data, as they are required for refunds, queries, and reconciliation.