Webhooks

A webhook is a real-time push notification sent to the backend system as a JSON payload through HTTP requests. Paysafe uses webhooks to notify the system when the event happens an asynchronous notification of events such as chargebacks, returns, payments cleared, and payments completed.

Benefits

  1. Webhooks are more efficient than data polling.​
  2. Webhook Notification (including data points) will be delivered only when the event happen so the backend system will always be up to date.
  3. Partners subscribe to Webhooks events once and notifications are delivered as soon as the event occurs.

Webhooks do not replace reporting. Webhooks provides real-time information that allows Partners and Merchants to be updated with the transactions. Paysafe recommends that Webhooks are complemented with reports to gain access to the entire set of data and metadata.

Steps to receive Webhooks

  1. Login into Netbanx Portal.
  2. Go to Settings > Notifications > Direct Debit.
  3. Select the events you want to monitor.
  4. Provide your webhook endpoint (HTTP URL) of your local server.
  5. Test that your webhooks endpoint is working by hitting button Test connectivity.
  6. Secure your Webhooks; use HMAC Secret key to verify the webhook signature generated by Paysafe.
  7. Save the configuration

Webhook Signature

The webhook notification contains a signature header calculated using the following algorithm:

digest = HMAC_SHA256 (hmacKey, UTF 8 string containing the JSON webhook request body)

signature = base 64 (digest)

The code that received the webhook repeats this algorithm and compare the value generated with the value received in the header.

Example Header:

Signature: UMaQ4h635wUc4hp60Z5ASBC/5UtqKybAldOkLv6ngc0=

Webhook Payload

A Webhook payload contains information about the event that occurred. It is linked to the corresponding resource that triggered the event. The payload also includes attributes such as timestamp, events topic, and the id of the resources.

Did you find this page useful?