Getnet DocsGetnet Docs

Request Parameters

This reference lists the public functions and parameters the TpvpcImplantado library exposes, with their exact parameter names and signatures.

This guide applies to TpvpcImplantado.

The tables below reflect the real invocation model used by the library. Parameters are listed exactly as they must appear in code, without aliases, translations, or inferred fields.

Initialization and Lifecycle Functions

These are the functions that are used to initialize and manage the TPVPC lifecycle.

fnDllIniTpvpcLatente

Initializes the TPVPC and opens communication with the PIN pad. This function must be called once when the application starts.

Function signature (C#):

int fnDllIniTpvpcLatente(string cComercio, string cTerminal, string cClaveFirma, string cConfPuerto, string cVersion);

ParameterTypeRequiredDescription
cComercioStringYesMerchant identifier (FUC) provided by the acquirer.
cTerminalStringYesTerminal identifier assigned to the PIN pad.
cClaveFirmaStringYesSignature key associated with the merchant and terminal.
cConfPuertoStringNoPort configuration. If empty or null, the value is loaded from local TPVPC configuration.
cVersionStringNoProtocol version ("5.1", "6.1", "8.1"). If empty, the configured default is used.

Return value: 0 if initialization succeeds. Any other value indicates a library-level error.

fnDllParaTpvpcLatente

Stops communication and releases all internal resources.

Function signature:

int fnDllParaTpvpcLatente();

This function has no input parameters.


Payment and Financial Operations

All financial operations are executed through exported functions that receive typed parameters and return an XML response buffer. A return value of 0 only indicates that the operation was processed; authorization must always be validated from the XML.

fnDllOperPinPad

Executes a PAGO or PREAUTORIZACION using a physical PIN pad.

Function signature:

int fnDllOperPinPad(string cImporte, string cFactura, string cTipoOper, StringBuilder cXMLResp, int iTamMaxResp);

ParameterTypeRequiredDescription
cImporteStringYesAmount in format XXXXXXXXX.XX.
cFacturaStringYesMerchant operation reference.
cTipoOperStringYesOperation type: "PAGO" or "PREAUTORIZACION".
cXMLRespStringBufferYesOutput buffer that receives the XML response.
iTamMaxRespIntegerYesMaximum buffer size (recommended: at least 8192).

fnDllOperManualExt

Executes a PAGO or PREAUTORIZACION using manual card data entry.

Function signature:

int fnDllOperManualExt(string cTarjeta, string cCaducidad, string cCVC2, string cImporte, string cFactura, string cTipoOper, StringBuilder cXMLResp, int iTamMaxResp);

ParameterTypeRequiredDescription
cTarjetaStringYesCard number (15–19 digits).
cCaducidadStringYesExpiration date in AAMM format.
cCVC2StringConditionalSecurity code, required depending on merchant configuration.
cImporteStringYesAmount in format XXXXXXXXX.XX.
cFacturaStringYesMerchant operation reference.
cTipoOperStringYes"PAGO" or "PREAUTORIZACION".
cXMLRespStringBufferYesOutput XML buffer.
iTamMaxRespIntegerYesMaximum buffer size.

Confirmation and Refund Operations

A confirmation captures a previously authorized pre-authorization; a refund returns funds. Both travel through the same family of functions, and which one you call depends on where the card and the original reference come from.

FunctionUse it whenParameters
fnDllOperComContableYou have the original pedido. Serves both operations through cTipoOper.cNumPedido, cRTSOriginal, cImporte, cFactura, cTipoOper, cXMLResp, iTamMaxResp
fnDllComContableTrjThe card is read again on the PIN pad.cImporte, cFactura, cNumPedido, cRTSOriginal, cXMLResp, iTamMaxResp
fnDllDevSinOrigTrjRefund with no original reference, card read on the PIN pad.cImporte, cFactura, cXMLResp, iTamMaxResp
fnDllOperDevSinOrigRefund with no original reference, card entered manually.cTarjeta, cCaducidad, cImporte, cFactura, cXMLResp, iTamMaxResp
fnDllOperComContableTerminalThe operation was made on a different terminal.cNumTerminal, cNumPedido, cRTSOriginal, cImporte, cFactura, cTipoOper, cXMLResp, iTamMaxResp

cTipoOper appears only in the two ComContable functions that serve both operations, and takes DEVOLUCION or CONFIRMACION. The others carry the operation in their own name.

ParameterTypeDescription
cNumPedidoStringOrder number of the original operation. The pedido field appears in every TPVPC operation response. Mandatory in Transparent mode.
cRTSOriginalStringRTS identifier of the original transaction, from the identificadorRTS field. Optional; recommended in Transparent mode.
cImporteStringAmount to refund or confirm, in XXXXXXXXX.XX format.
cFacturaStringValue the merchant supplies to label the operation. The TPVPC performs no validation on it.
cTipoOperStringDEVOLUCION or CONFIRMACION.
cTarjeta / cCaducidadStringCard number and expiry, for the manual-entry refund only.
cNumTerminalStringTerminal that ran the original operation, for the cross-terminal variant only.
cXMLRespBufferBuffer that receives the XML result.
iTamMaxRespIntegerMaximum size of the response buffer.

Recurring Payments

Recurring mode is a session switch, not a parameter. Two functions toggle it, and neither takes arguments:

FunctionSignatureEffect
fnDllActivaRecurrentevoid fnDllActivaRecurrente()Every operation run from here on carries a recurring token.
fnDllDesActivaRecurrentevoid fnDllDesActivaRecurrente()Operations go back to being ordinary payments.

fnDllIniTpvpcLatente deactivates recurring mode, so activate it again after every initialization.

The token itself comes back in the <token> element of the payment’s XML response.

fnDllOperRecurrente

Charges a token obtained earlier. Recurring mode does not have to be active to call it.

Function signature:

int fnDllOperRecurrente(LPCTSTR cTokenRec, LPCTSTR cImporte, LPCTSTR cFactura, LPTSTR cXMLResp, int iTamMaxResp);

ParameterTypeRequiredDescription
cTokenRecStringYesToken obtained in the original card payment.
cImporteStringYesAmount to charge. It may differ from the original amount.
cFacturaStringYesPurchase reference for this charge.
cXMLRespBufferYesOutput buffer that receives the XML response.
iTamMaxRespIntegerYesMaximum size of the response buffer.

The response is analogous to that of a card payment.


Receipt Generation

fnDllGenerateReceipt

Builds a receipt from a completed operation and returns it encoded in base64.

Function signature:

int fnDllGenerateReceipt(string cXMLResp, StringBuilder base64Receipt, int iTamMaxbase64Receipt, string nombreComercio, bool bIsClient);

ParameterTypeRequiredDescription
cXMLRespStringYesThe XML the original operation returned.
base64ReceiptBufferYesOutput buffer that receives the receipt, base64-encoded.
iTamMaxbase64ReceiptIntegerYesMaximum size of the output buffer.
nombreComercioStringYesMerchant name to print on the receipt.
bIsClientBooleanYestrue for the cardholder copy, false for the merchant copy.

Authorization Validation

All financial operations are considered AUTHORIZED only if the XML response contains:

<estado>F</estado>
<resultado>Autorizada</resultado>

Any other combination must be treated as DENIED, regardless of numeric codes or library return values.