Open the widget for Payment Intents
If you have followed the guide up until now, you may notice that we have only specified one of the two accounts involved in a bank transfer (the recipient account). That's because the sender account gets determined on the frontend, using the widget.
The widget will probably also ask for MFA for the transfer. You can check here to see which MFA is enabled for which bank.
The configuration to open the widget should look like this:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Fintoc Demo</title>
<script src="https://js.fintoc.com/v1/"></script>
</head>
<body>
<script>
window.onload(() => {
const widget = Fintoc.create({
holderType: 'individual',
widgetToken: 'pi_XXXXXXXX_sec_YYYYYYYY',
product: 'payments',
publicKey: 'pk_live_0000000000',
onSuccess: () => {},
});
widget.open();
});
</script>
</body>
</html>
Here, the widgetToken
parameter corresponds to the token located inside the Payment Intent object returned by Fintoc just after its creation. You can read more about the widget and its configurations at the Widget documentation.
Mexico 🇲🇽
For the widget to show Mexican banks, you need to add the country
parameter:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Fintoc Demo</title>
<script src="https://js.fintoc.com/v1/"></script>
</head>
<body>
<script>
window.onload(() => {
const widget = Fintoc.create({
holderType: 'individual',
widgetToken: 'pi_XXXXXXXX_sec_YYYYYYYY',
product: 'payments',
country: 'mx',
publicKey: 'pk_live_0000000000',
onSuccess: () => {},
});
widget.open();
});
</script>
</body>
</html>
Updated 3 months ago