4

I'm using plaid-ruby, try to add user with webhook:

Plaid.add_user 'connect',
               params['username'],
               params['password'],
               params['bank_type'],
               params['pin'],
               {
                 list: params['list'],
                 login_only: true,
                 webhook: 'http://requestb.in/rrd6zbrr'
               }

But with no luck, don't get any requests to requestbin.

Does Plaid support webhooks in development mode? Or maybe requestb.in is blocked ?

toddg
  • 2,863
  • 2
  • 18
  • 33
fazibear
  • 137
  • 8
  • 1
    Have a look at http://putsreq.com/, you could also simulate a validate expected response: "The response will contain a corresponding success message and code..." – Pablo Cantero Nov 23 '15 at 01:30
  • I have reached out to Plaid support. Will let you know if/when I receive a response. – toddg Nov 25 '15 at 16:19

1 Answers1

5

Plaid test environment does support webhooks. I reached out to Plaid support to ask specifically about Plaid Link since that is what I am using in my iOS app. Here is the response I received from Plaid:

Plaid Link does support webooks. Below is some sample code to illustrate:

<button id='linkButton'>Open Plaid Link</button>
<script src="https://cdn.plaid.com/link/stable/link-initialize.js"></script>
<script>
var linkHandler = Plaid.create({
  env: 'tartan',
  clientName: 'Test',
  key: 'test_key',
  product: 'connect',
  webhook: '[WEBHOOK URL]',
  onSuccess: function(public_token, metadata) {
    // Send your public_token to your app server here.
  },
});

// Trigger the Link UI
document.getElementById('linkButton').onclick = function() {
  linkHandler.open();
};
</script>

Note that the product must be “connect” and that you must provide a webhook URL.

I was able to get webhooks working in my own environment (iOS client app, with Parse/Heroku backend), but I didn't use the test credentials - I used a real account. FYI, it took about 10 minutes between when I added the user and received a webhook back.

Community
  • 1
  • 1
toddg
  • 2,863
  • 2
  • 18
  • 33
  • I had the issue where I originally created an invalid webhook when the user was "connected". Despite issuing subsequent patch user requests to update the webhook ( and gettiing a code 4 ack ), I never would receive any future webhook status updates for the user. To resolve I had to delete the user and re-connect with corrected webhook. This should not be how it works. – Eric G Feb 21 '16 at 15:42