Webhook Setup Guide

Overview

Webhooks enable merchants to receive real-time updates about events occurring in our system. By configuring a webhook, your application can listen for specific event notifications and respond accordingly.

This document provides a detailed guide for setting up and managing webhooks for your merchant account.


Steps to Set Up Webhooks

1. Prerequisites

Before setting up a webhook, ensure you have the following:

  • A Merchant Account with active status.

  • Access to your Merchant Public Key (found in your dashboard).

  • A server endpoint URL ready to receive webhook requests.

2. Configure Your Webhook

To configure your webhook:

  1. Log in to your merchant dashboard.

  2. Navigate to the Webhook Settings section.

  3. Enter the following details:

    • Webhook URL: The endpoint where notifications will be sent.

    • Webhook Status: Enable or disable the webhook (set to Active for receiving events).

  4. Save your changes.

3. Secure Your Webhook

  • All webhook requests include an Authorization Header containing your Base64-encoded live_public_key.

  • You can verify the header to ensure that requests come from our system.

Example Header

Authorization: <base64_encoded_live_public_key>
Webhook-Code: <webhook_code>

4. Handle Webhook Events

Your endpoint should:

  • Parse the incoming request.

  • Validate the headers to ensure authenticity.

  • Respond with an HTTP status code 200 to acknowledge receipt.

Example of Webhook Response

Your server should return:

{
  "status": true,
  "message": "Event processed successfully.",
  "data":{
      .....
    }
}

Troubleshooting

Common Issues

  • No Webhook Received: Ensure the webhook status is set to Active and the URL is correct.

  • Invalid Signature: Verify the Authorization header matches your Base64-encoded public key.

  • Timeouts: Ensure your server responds within 10 seconds to prevent retries.

AVAILABLE CODES:
MANDATE_CHARGED: when an account has been debit 

Last updated