// Node.js/Express example
app.post('/initiate-3ds', async (req, res) => {
const enrollmentResponse = await fetch('https://api-sbx.globalgetnet.com/dpm/security-gwproxy/v2/enrolments-initial', {
// ... request configuration
});
const data = await enrollmentResponse.json();
if (data.status === 'Pending Challenge') {
// Send the HTML template directly to the browser
res.send(data.redirect_html_template);
}
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Node.js/Express example
app.post('/initiate-3ds', async (req, res) => {
const enrollmentResponse = await fetch('https://api-sbx.globalgetnet.com/dpm/security-gwproxy/v2/enrolments-initial', {
// ... request configuration
});
const data = await enrollmentResponse.json();
if (data.status === 'Pending Challenge') {
// Send the HTML template directly to the browser
res.send(data.redirect_html_template);
}
});
html
<div id="transition-ui">
<p>Please wait while we redirect you to your bank for secure authentication...</p>
</div>
<form id="acs-direct-form" method="POST" action="https://acs-issuer.com/challenge">
<input type="hidden" name="creq" value="eyJ0aHJlZURTU2VydmVyVFJBSUQiOiI..." />
<input type="hidden" name="threeDSSessionData" value="NmQyZTQzODAtZDhhMy00Y2Ni..." />
</form>
<script>
// Delay submission slightly to allow the transition UI to be seen
setTimeout(() => {
document.getElementById('acs-direct-form').submit();
}, 1000);
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
html
<div id="transition-ui">
<p>Please wait while we redirect you to your bank for secure authentication...</p>
</div>
<form id="acs-direct-form" method="POST" action="https://acs-issuer.com/challenge">
<input type="hidden" name="creq" value="eyJ0aHJlZURTU2VydmVyVFJBSUQiOiI..." />
<input type="hidden" name="threeDSSessionData" value="NmQyZTQzODAtZDhhMy00Y2Ni..." />
</form>
<script>
// Delay submission slightly to allow the transition UI to be seen
setTimeout(() => {
document.getElementById('acs-direct-form').submit();
}, 1000);
</script>