Read on adding funding accounts in safe and secure way
You will need to use our widget with the type "CARD" to add a card or "BANK" to add a bank as a funding account. A particular user can only have 2 active bank and 2 active card accounts.
To initialize the widget, you will need to first generate a Widget Token, which will only be valid for a certain time period. You will need to pass this token along with the Sender ID to widget initialization snippets.
<script>
var widget = new MachnetWidget({
elementId: "widget-root",
userId: "{{userId}}",
width: "100%",
height: "200px",
type: "card",
locale: "en",
appScheme:'myapp://myapp', // For oAuth flows. Add deep link for android or iOs app. Not recommended for web browsers.
userId: '{{userId}}',
stylesheet: "https://example.com/mystyle.css",
token: "{{token}}",
bankId: {{funding_souce_id}}, // Required only when funding source is in LOGIN_REQUIRED status and user needs to re-login to their bank account
});
widget.init();
</script>