Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plaid web hook not firing

I'm trying to integrate Plaid transaction webhooks into an api, and seem to have trouble getting any webhooks to fire. I used the plaid quickstart code and added the webhook parameter:

Plaid.create({
    apiVersion: "v2",
    clientName: "Plaid Walkthrough Demo",
    env: "<%= PLAID_ENV %>",
    product: ["transactions", "auth"],
    webhook: "http://localhost:3000/api/plaid/webhook",
    key: "<%= PLAID_PUBLIC_KEY %>",//...

On the receiving end I'm just logging the req.body to see if webhook fired:

  app.post("/api/plaid/webhook", (req, res) => {
  console.log("WEBHOOK FIRED");
  console.log(JSON.stringify(req.body));
});

When I tested the route in Postman, the req.body was logged as expected, but when creating a new PLAID Item it's not working. I'm currently working in Sandbox mode

like image 271
Michael Avatar asked Nov 26 '25 18:11

Michael


2 Answers

Wrote to Plaid support and the reason it didn't work is because localhost:3000 is not a valid URL. Once i tried it on an actual server it worked.

like image 102
Michael Avatar answered Nov 29 '25 08:11

Michael


As you already found out yourself, localhost:3000 won't work since it's not public (visible to Plaid).

When I want to test webhooks locally, I typically user services like:

https://postb.in

https://webhook.site

like image 37
chris hyun ho kim Avatar answered Nov 29 '25 07:11

chris hyun ho kim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!