Get Started

Webhooks

Webhooks allow the system to push notifications to partners.

Mass Payments uses Partner-defined HTTP callbacks (AKA as webhooks) to notify Partner of a particular event happening within Mass Pay.

A Partner will be subscribed to a set of pre-defined event types, initially coordinating which events to subscribe to via conventional channels during Partner's onboarding process.

Up to three endpoints are supported for a Partner with one defined as 'primary' and others, if available as 'secondary'. Only the primary endpoint will be used to send notifications. If the primary endpoint is not reachable, an earliest added 'secondary' endpoint will be promoted to 'primary'.

When submitting new endpoints, the first submitted will be set as 'primary'. During adding or updating endpoints the Partner can set any of the submitted endpoint to primary. Primary endpoint can't be deleted unless it's the only endpoint defined for a Partner.

Callbacks will be asynchronous, the order of calls is not guaranteed and an event might be sent multiple times.

Events will be caused by changes in the state of a resource (like payment updated event) or could be triggered by a Partner (ping event).

When an event occurs, the registered endpoints will be called using HTTP POST method with the pre-defined JSON payload, based on the event type.

All calls will be using SSL and partner should be providing HTTPS endpoints.

In addition, each call will include access token, provided by a Partner together with an endpoint (or updated separately later on) as Authorization header:

Authorization: WUBS_API <Partner provided token>

Different authentication mechanisms could be supported based on Partner's preferences.