data, null, 4)

        fetch("/api/success", {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json'
          },
          body: JSON.stringify(metadata)
        });
        // console.log('public_token: ' + public_token + ', metadata: ' + JSON.stringify(metadata));
      },
      onExit: function (err, metadata) {
        if (err != null) {
          // The user encountered a Plaid API error prior to exiting.
        }
      }
    });

    document.getElementById('