Skip to main content

Veritran Docs

End of Flow

At the end of the flow of the invoked web app, the container application regains control while also obtaining relevant information about the result of the operation performed.

The Veritran technology allows the use of the same communication mechanisms described for the integration. By default, these mechanisms enable data transmission between applications, and support can also be added for the browser's postMessage() method, which facilitates communication between the iframe and the container application.

You can set an events listener for messages sent from the iframe. To listen for messages sent via postMessage(), the following code can be used as a reference:

<!DOCTYPE html> 
<html lang="es"> 
    <head> 
        <meta charset="UTF-8"> 
    </head> 
    <body> 
        <iframe id="my-feature" src="https://veritran.com/api/deeplink?featureCode=OnBoarding&UserCode=0000" 
            sandbox="allow-scripts allow-same-origin"> 
        </iframe> 

        <script> 
            window.addEventListener('message', function (event) { 
                if (event.origin !== "https://veritran.com") return; 
                console.log('Mensaje recibido del iframe:', event.data); 
            }); 
        </script> 
    </body> 
</html> 

Warning

Verify the messages origin to avoid any security risk.