3

I'm building a application that enables ACH payments, and will need to use webhooks to be notified when debits have transitioned between different statuses. I understand I can create a callback either programmatically or via the dashboard, which will set the URL at which the payload will be posted (or via whatever HTTP method is set).

Is it possible to register callbacks for specific events only (ex. POST to /foo with only debit.failed events)?

Or by registering a callback, am I setting it so that all events are sent to that URL, at which point I parse the payload and handle each event separately?

s1ack3rhack3r
  • 319
  • 2
  • 12
  • You'll probably want to read up on [communication endpoints](http://en.wikipedia.org/wiki/Communication_endpoint) - these are used in API's to handle different types of data / request. For a Rails-specific endpoints, I think it would be more pertinent to look at how your ACH provider sends data -- surely they'd allow you to send data to specific endpoints, allowing you to determine which path to send different requests to? – Richard Peck May 06 '14 at 09:27
  • This is the assumption I've made as well. I believe I'm familiar enough with the concepts of what I want to do, and my question is more based on how to do it with Balanced - specifically what the payload looks like and how to subscribe to specific events, rather than just a general event handler that dispatches each event that comes in. – s1ack3rhack3r May 06 '14 at 16:37

1 Answers1

1

You may only create one callback URL and that's where all Balanced events will be sent. In your event handler, just listen for the event types you care about and disregard the others.

Remear
  • 1,927
  • 12
  • 19