Skip to main content

Veritran Docs

[en] End of Flow

[en] 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.

[en] 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.

[en] 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> 

Aviso

[en] Verify the messages origin to avoid any security risk.