Webhooks

    Webhooks allow you to receive notifications whenever certain events occur on your account—such as transaction status changes, recurring billing updates or deposit events. Unlike the Query API, which requires your application to pull data on demand, webhooks push data to your endpoint in near real time.

    Overview

    A webhook is essentially an HTTP POST that the gateway sends to a URL you define. When a qualifying event occurs—such as a transaction settling or a subscription renewing—the gateway packages relevant details into a JSON or form‑encoded payload and posts it to your endpoint. Your system can then process the payload to update order statuses, trigger emails or sync data with other systems.

    How It Works

    To set up webhooks:

    1. Create a publicly accessible URL on your server that can accept POST requests. Ensure it uses HTTPS to secure data in transit.
    2. Configure your webhook subscriptions via your partner portal or API. Specify the types of events you want to receive and provide your endpoint URL.
    3. Implement logic to parse the incoming payload and respond with a 200 OK status. It’s good practice to log the data and verify the signature or authentication token supplied by the gateway.
    4. Handle retries gracefully. Webhooks may be resent multiple times if your server does not respond promptly. Ensure your endpoint is idempotent so that duplicate notifications do not create duplicate records.

    Use Cases

    Common use cases for webhooks include updating order statuses when transactions settle, pausing or resuming recurring subscriptions, synchronising ledger entries when deposits occur and sending transactional emails or SMS messages. By reacting to events in real time, you can build a responsive system that keeps your customers informed without polling the gateway repeatedly.