Refund a Payment
DEVOLUCION) allow merchants to return funds to a cardholder after a successful payment. Get Central supports multiple refund flows depending on whether the original transaction data and/or the physical card are available at the time of the refund.DEVOLUCION operation.Requirements
Before initiating a refund, ensure the following conditions are met:
- Get Central middleware initialized and operational
- Refund capability enabled for the merchant and terminal
- Original transaction data available, especially the TPVPC order number (
pedido)
Refunds may be full or partial, depending on configuration and issuer rules.
Refund Models
Get Central supports the following refund scenarios:
- Refund using the original transaction identifiers
- Refund or confirmation from another terminal
- Refund with card present, where the original card is read again on the PIN Pad
- Refund without original, if enabled in the merchant configuration
DEVOLUCION.Refund Process
The standard refund flow is performed by invoking the refund/confirmation function with the original transaction identifiers. The middleware returns an XML response that must be validated to determine whether the refund was authorized.
Step 1: Execute a DEVOLUCION Operation
To execute a refund using the original transaction data, use:
fnDllOperComContable
The following parameters are required:
| Parameter | Type | Required | Description |
|---|---|---|---|
cNumPedido | String | Yes | Order number (pedido) of the original transaction. |
cRTSOriginal | String | No | RTS identifier of the original transaction. Recommended when available. |
cImporte | String | Yes | Refund amount in decimal format XXXXXXXXX.XX. |
cFactura | String | Yes | Merchant reference for the refund operation. |
cTipoOper | String | Yes | Must be set to DEVOLUCION. |
cXMLResp | Buffer | Yes | Output buffer that will receive the XML response. |
iTamMaxResp | Integer | Yes | Maximum size of the response buffer. Minimum recommended value: 8192. |
The refund amount must be less than or equal to the original captured amount.
Here is an example of a referenced refund in C#:
StringBuilder xmlResponse = new StringBuilder(8192);
int result = fnDllOperComContable(
"123456", // cNumPedido
"070001070319164116378278", // cRTSOriginal
"5.00", // cImporte
"REF-2024-001", // cFactura
"DEVOLUCION", // cTipoOper
xmlResponse,
xmlResponse.Capacity
);StringBuilder xmlResponse = new StringBuilder(8192);
int result = fnDllOperComContable(
"123456", // cNumPedido
"070001070319164116378278", // cRTSOriginal
"5.00", // cImporte
"REF-2024-001", // cFactura
"DEVOLUCION", // cTipoOper
xmlResponse,
xmlResponse.Capacity
);execFnDll, passing the original function name and arguments to the local TPVPC service.0 indicates that the operation was processed correctly at a technical level. It does not confirm authorization.If the function returns-2, perform a query for the last operation to verify whether the refund was ultimately authorized.
Step 2: Validate the Refund Result
<estado>F</estado>
<resultado>Autorizada</resultado><estado>F</estado>
<resultado>Autorizada</resultado>Here is an example of an authorized refund:
<resultadoOperacion>
<tipoPago>DEVOLUCION</tipoPago>
<importe>5.00</importe>
<moneda>978</moneda>
<pedido>REF-2024-001</pedido>
<estado>F</estado>
<resultado>Autorizada</resultado>
</resultadoOperacion><resultadoOperacion>
<tipoPago>DEVOLUCION</tipoPago>
<importe>5.00</importe>
<moneda>978</moneda>
<pedido>REF-2024-001</pedido>
<estado>F</estado>
<resultado>Autorizada</resultado>
</resultadoOperacion>Persistence Requirements
For reconciliation and auditing purposes, store at least:
- Refund reference (
cFactura) - Original transaction order number (
pedido) - Original RTS identifier, when available
- Authorization result and response codes
Additional Refund Scenarios
The TPVPC Implantado documentation also includes additional refund flows, including:
- refunds or confirmations from another terminal
- refunds with the original card read again on the PIN Pad
- refunds without original transaction data
Use these flows only when they match your operational scenario.
Next Steps
After processing a refund, you can proceed with further reconciliation and management tasks:
- For details on creating and printing compliant tickets for the cardholder, see the Generate and Print Receipts documentation.
- To learn more about standard point-of-sale payments, refer to the Create a Single-Step Payment guide.
- For a complete catalog of transaction statuses and host error codes, see the Result Codes and Errors documentation.
On this page