Transaction status query
The merchant's application must perform a status query when some issue occurs with the transaction status receiving.
Flow
To perform the query, the merchant must make a POST in the following address:
https://esitef-homologacao.softwareexpress.com.br/e-sitef-hml/consultarTransacao.se?nit=XXXXX
Where "XXXXX" is the NIT sent by e-SiTef on the transaction creation. The response will be "OK" if the NIT is correct and the communication ended properly.
After this, e-SiTef will send a POST/HTTPS to the status notification URL registered on e-SiTef, sending as parameter the status code of the transaction. The merchant must be prepared to handle these statuses and the HTTPS (SSL/TLS) calls to the registered status notification URL.
e-SiTef's POST/HTTPS may not be immediate, as it will be asynchronous. The delay may vary according to the server load and the internet. If a problem occurs on sending, e-SiTef will try to resend the message after a certain time range, up to 3 times.
The merchant must accept the POST/HTTPS via SSL/TLS with a valid certificate. But still, importing the certificate on e-SiTef may be necessary.
Another relevant point is that e-SiTef always awaits a 200 ("OK") response from the status notification URL, and doesn't accept a redirection (302) to another URL or another web site.
Note:
The e-SiTef transaction status query service DO NOT makes a transaction status check in acquirer / authorizer. This service only returns the transaction status in e-SiTef database.
Example: If a payment transaction is confirmed in e-SiTef, but is reversed via telephone directly to the acquirer / authorizer, this reversal will not necessarily be reflected in the e-SiTef transaction status query service.
When to use the status query?
If somehow the merchant application exceeds the timeout and does not receive the status notification from e-SiTef due to some infrastructure problem or some issue with the server that has blocked the receiving of the response, the merchant's application must perform a Status Query. In this query, the merchant's application receives all the transaction parameters that it should have received if the status notification had worked properly. Thus, the merchant can avoid sending the same payment twice.
It is extremely important that the merchant application knows the transaction status on e-SiTef before performing any other transaction handling, so that it's possible to prevent that the customer performs a new attempt of payment of a same order, without knowing the result of the payment requested previously.
Example:
If the registered merchant status notification URL is:
https://www.storetest.com.br/status.php
The merchant will receive a POST on:
https://www.storetest.com.br/status.php
With the parameters:
pedido = 1234
nsu = 123
status = CON
Note:
Do not overuse the status notification function. If overuses are identified, e-SiTef can ignore future calls.