Querying transactions pending confirmation on the terminal

In the event of a power outage, situations may occur in which the automation needs to consult transactions that are pending confirmation. That is, transactions that need to be confirmed (or not) via FinalizaoSiTefInterativo Function.

5.1 Number of transactions pending confirmation on the terminal#

This function is used by the terminal to know how many transactions were carried out in the event of a power outage and that are pending an automation action, via the FinalizaFuncaoSiTefInterativo function call.

int ObtemQuantidadeTransacoesPendentes (DateFiscal, CouponFiscal)

ASCII interface#

GetQuantidadeTransacoesPendentesA (Result, Tax Date, Tax Coupon)
Interface Type ParameterdefaultInterfaceASCIIDescription
ResultOutput, by valueNot usedFixed 6Contains the result of the response to the routine call.
Fiscal DateInput,by valuechar *Fixed 8Fiscal Date in YYYYMMDD format
Tax CouponEntry, by valuechar *Max 20Tax Coupon number corresponding to the sale

The routine returns the number of pending transactions for the informed tax document, or -13 if the tax document was not found.

5.2 Querying pending transactions on the terminal#

It is possible to consult all pending confirmation information from the terminal.

This functionality is initiated through the IniciaFuncaoSiTefInterativo function with the Function parameter (first input parameter of the routine) assuming the value 130 and the other parameters with their usual values.

In particular, this function will disregard parameters relating to the tax document.


IMPORTANT: This routine only starts the request process. If the return is 10000, the process must continue through the ContinuaFuncaoSiTefInterativo routine until it returns a final result other than 10000.


The following fields will be returned for automation.

FieldTypeDescription
210Total number of pending issues, listed in the data blocks below
160Tax Coupon
161Payment Coupon Identification Number
163Tax Date
164Tax Time
211Original “Function” Code
1319Original transaction amount

5.3 Querying pending transactions in a specific tax document#

In a similar way to the previous item, it is possible to consult the data referring to a single tax document.

To do so, use the IniciaFuncaoSiTefInterativo function, passing the value 131 in the Function parameter and the other parameters with their usual values. In this case, the parameters relating to the tax document will be considered.

The fields returned are identical to the previous item.