Skip to main content
Webhooks and Callbacks

Using Gaviti Core for Seamless Integration

Updated over a month ago

Webhooks are powerful tools that enable real-time communication between systems. In Gaviti Core, webhooks allow clients to receive notifications when specific events occur within their account receivables workflows, enabling them to integrate seamlessly with third-party systems or workflow automation tools.

This article provides an overview of how regular webhooks work, what is required from the client side, and how Gaviti facilitates the process. We'll also explore examples of how webhooks can enhance account receivables processes.


What Are Webhooks?

Webhooks are automated callbacks triggered by events in a system.
When an event occurs (e.g., a new dispute is opened on an invoice), Gaviti sends an HTTP POST request to a predefined URL (the "callback URL") specified by the client. This request contains detailed information about the event, formatted as a payload (usually in JSON).

The client’s system processes this payload and performs actions like updating records, notifying users, or triggering workflows.


How Regular Webhooks Work

  1. Event Occurs in Gaviti Core
    A specific event (e.g., "new dispute opened" or "promise to pay made") happens in the Gaviti system.

  2. Gaviti Sends a Request
    Gaviti sends an HTTP POST request to the client’s designated callback URL. This request includes event data.

  3. Client System Processes the Request
    The client’s server receives the request, validates it, and processes the data (e.g., storing it in a database or triggering an action).

  4. Response Sent Back
    The client’s system responds to Gaviti (usually with a 200 OK status) to acknowledge successful processing.


Requirements From the Client Side

To use webhooks, clients need to prepare the following:

  1. Callback URL
    A publicly accessible URL (over HTTPS) to which Gaviti can send webhook payloads.

  2. Endpoint Configuration
    The client must ensure their server can:

    • Accept and parse HTTP POST requests.

    • Handle JSON-formatted payloads.

    • Validate requests (e.g., using HMAC signatures for security).

  3. Response Handling
    The endpoint should return an HTTP status code (e.g., 200 OK) to confirm successful processing. Non-2xx responses indicate a failure, prompting Gaviti to retry.

  4. Security Measures
    Implement authentication mechanisms like validating shared secrets or IP whitelisting to verify requests originate from Gaviti.


What Gaviti Provides

From the Gaviti side, we ensure a seamless webhook experience by providing:

  1. Event Configuration
    Clients can select specific events they want to track, such as:

    • New Dispute Opened: Triggered when a dispute is logged for an invoice.

    • Promise to Pay: Triggered when a customer promises to pay outstanding invoices.
      And many more...

  2. Payload Structure
    Gaviti sends payloads with well-defined structures (adjustable). For example:


    Example Payload: New Dispute Opened

    { "event": "dispute_opened", "invoiceId": "INV12345", "customerId": "CUST789", "disputeReason": "Product defect", "disputeDate": "2024-12-09T10:00:00Z" }


    Example Payload: Promise to Pay

    { "event": "promiseToPay", "invoiceId": "INV67890", "customerId": "CUST456", "paymentDate": "2024-12-15" }

  3. Retry Mechanism
    If the client’s system does not acknowledge the webhook (non-2xx response), Gaviti retries sending the request several times based on a defined schedule.


Example Use Cases in Account Receivables

  1. New Dispute Notification
    Event: A dispute is raised for an invoice.
    Use Case: Notify the dispute resolution team or log the dispute in a CRM system.

  2. Promise to Pay Notification
    Event: A customer promises to pay specific invoices by a certain date.
    Use Case: Update payment tracking systems and forecast cash flow more accurately.

    A many more, depend on the client requirements.


Screenshots

Conclusion

Webhooks in Gaviti Core enable real-time notifications and streamlined integration with external systems. By configuring webhooks for critical events like disputes or payment promises, data change clients can enhance automation and ensure their workflows stay up-to-date. With proper setup on both the client and Gaviti sides, webhooks can significantly improve operational efficiency in account receivables.

For more details or assistance, reach out to Gaviti support!

Did this answer your question?