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:

<head>
  <script src="https://js.fintoc.com/v1/"></script>
</head>

<body>
  <script>
    const widget = Fintoc.create({
      widgetToken: 'pi_XXXXXXXX_sec_YYYYYYYY',
      publicKey: 'pk_live_0000000000',
      holderType: 'individual',
      product: 'payments',
      onSuccess: () => { console.log('Payment Finished'); },
      onExit: () => { console.log('Payment Failed or Canceled'); },
    })
    </script>
</body>

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.

Para ver más detalles sobre el widget y su configuración puedes ir a la sección del Widget.


Did this page help you?