Virtual Account Services
    Virtual Account Services
    • Introduction
    • Terminologies
    • Webhooks
    • Authentication
    • Account
      • Create Account
        POST
      • Rename Account
        POST
      • Balance Inquiry
        GET
      • Create Bulk Accounts
        POST
      • List Accounts
        GET
    • Transaction
      • Credit Account
        POST
      • Debit Account
        POST
      • Credit Account [Agency Banking]
        POST
      • Debit Account [Agency Banking]
        POST
      • Transaction Query
        GET
      • Transaction Details
        GET
      • Transaction History
        GET
    • Transfer
      • Get Institutions
        GET
      • Name Inquiry
        POST
      • Interbank Transfer
        POST
      • Interbank Transfer [Sync]
        POST
      • Transfer Query
        GET
      • Transfer Enquiry
        GET
      • Virtual Account Intrabank Transfer
        POST
      • Core Banking Intrabank Transfer
        POST
      • Collection Accounts Intrabank Transfer
        POST
    • Invoice
      • Create Invoice
        POST
      • Get Invoice Detail
        GET
      • List Merchant Invoices
        GET
    • Refunds
      • Initiate Refund
      • Get Refund Status
      • Get Refunds
    • Notifications
      • Notification
      • Send Notification
    • Merchant
      • Account
        • Get Account
        • Activate Sub Ledger For Merchant
        • Get SubLedger Callback Urls
        • Set SubLedger Callback Urls
        • Get Collection Accounts
      • Transfer
        • Get Transfer History
        • Get Subledger transfers
        • Get Transfer Details
        • Name Inquiry
      • Refund
        • Refund Details
    • Admin
      • Accounting
        • Get GL Accounts
        • Get Classification Codes
      • Dashboard
        • Dashboard Summary
        • Dashboard Transactions
        • Dashboard Transaction Details
      • Group Codes
        • Get Group Codes
        • Set Collection Account
        • Create Group Code
      • Reporting
        • Get Report Types
        • Get Report Parameters
        • Create Report
        • Get Reports
        • Get Reports Details

    Webhooks

    What is a Webhook?#

    A webhook is a mechanism that allows real-time communication between two systems by sending an HTTP request (usually a POST request) from one application to another when a specific event occurs. Unlike traditional polling, where a system repeatedly checks for updates, webhooks push data automatically, reducing latency and improving efficiency.
    In simple terms, webhooks act as event-driven notifications that alert an external system when something happens.

    How Webhooks Work#

    1.
    Event Trigger – A specific event occurs in the source system (e.g., a bank transaction is processed).
    2.
    Webhook URL – The system that needs to be notified (the receiver) provides a URL where the event data should be sent.
    3.
    HTTP Request – The source system sends an HTTP POST request to the webhook URL, containing the event details in JSON or XML format.
    4.
    Processing the Data – The receiving system extracts and processes the event data, taking appropriate action (e.g., updating records, notifying customers).
    5.
    Acknowledgment & Retry Mechanism – The receiver responds with an HTTP status code (200 OK for success). If the request fails, the sender may retry to ensure reliable delivery.

    Example of a Webhook Flow in Banking#

    Scenario: A Real-Time Payment Notification Webhook#

    Imagine a bank provides an API that allows businesses to receive real-time notifications when a customer makes a payment.
    1.
    A merchant registers a webhook URL with the bank’s API to receive payment updates.
    Example: https://merchant.com/webhook/payment
    2.
    A customer makes a payment, and the bank’s system processes the transaction.
    3.
    The bank’s system triggers a webhook event for the payment success.
    4.
    An HTTP POST request is sent to the merchant's webhook URL with payment details:
    {
      "event": "payment.success",
      "transaction_id": "TXN123456789",
      "amount": 5000,
      "currency": "NGN",
      "customer": {
        "name": "John Doe",
        "email": "john.doe@example.com"
      },
      "status": "successful",
      "timestamp": "2025-04-03T14:30:00Z"
    }
    For more information on the payload view the Notification Page

    Webhook vs. API Polling: Why Webhooks Are Better?#

    Webhooks and API polling are two different methods for retrieving data from a system, but webhooks are generally more efficient and preferred for real-time communication.

    1. Webhooks (Push Mechanism)#

    Webhooks send data automatically when an event occurs.
    No need for the client to continuously check for updates.
    Uses minimal server resources and bandwidth.

    2. API Polling (Pull Mechanism)#

    The client must repeatedly send requests at intervals to check for updates.
    Can cause high server load and increased bandwidth usage.
    May lead to delays in receiving critical updates.

    Comparison Table#

    FeatureWebhooksAPI Polling
    Data DeliveryInstant (push)Delayed (pull)
    EfficiencyHighLow
    Server LoadLowHigh (frequent requests)
    Bandwidth UsageMinimalHigh
    Real-time UpdatesYesNo
    ReliabilityRequires proper handling of retriesCan miss updates if polling interval is too long
    ComplexityRequires webhook endpoint setupSimpler but inefficient for frequent updates

    When to Use Webhooks vs. API Polling#

    ✅ Use Webhooks when:
    You need real-time notifications (e.g., transaction updates, payment confirmations).
    You want to reduce server load and improve efficiency.
    You are integrating with event-driven systems.
    ✅ Use API Polling when:
    The system does not support webhooks.
    You need historical data or scheduled updates (e.g., daily reports).
    The update frequency is low and does not require real-time notifications.
    Modified at 2025-04-03 21:21:17
    Previous
    Terminologies
    Next
    Authentication
    Built with