Xilnex Event Hub Webhook Receiver Guide

Xilnex Event Hub Webhook Receiver Guide

Introduction

A webhook receiver is the endpoint on your system that accepts event notifications sent by Xilnex Event Hub. This guide explains how to build a receiver that is secure, reliable, and fast enough to avoid retries.

It covers payload versioning, signature validation, duplicate prevention, and response timing requirements.

Note: Your receiver must respond to each webhook call within 10 seconds. Otherwise, Xilnex treats the call as timed out and starts retries.

Terminology

TermDescription
Webhook receiverThe endpoint on your system that listens for and processes webhook calls from Xilnex Event Hub. Also called the webhook listener.
Shared secretA key you configure in the Xilnex Portal when you manage the webhook configuration. Your receiver uses it to validate request signatures.
SignatureA hash of the request body, sent in the xilnex-webhook-signature header. It proves the call came from a trusted source.
HMAC SHA-256The hashing algorithm used to create and validate the signature.
Webhook job IDAn identifier sent in the xilnex-webhook-webhookjobid header. It stays the same across retries, so your receiver uses it to detect duplicate calls.

Request Headers

Each webhook call from Xilnex includes the following headers that your receiver must read.

NameData TypeRequiredDescription
xilnex-webhook-signatureString (hex-encoded)YesThe HMAC SHA-256 hash of the raw request body, signed with the shared secret. Use it to validate the request.
xilnex-webhook-webhookjobidStringYesThe webhook job identifier. A retry carries the same value as the original call, so use it as an idempotency key.

Implementation Recommendations

Follow these recommendations when you build your webhook receiver.

Payload Versioning and Backward Compatibility

When the structure of the webhook payload changes, create a new endpoint on your receiver. This keeps existing integrations working on the old payload structure.

Request Authentication via Signature Validation

Validate the request signature on every call. This confirms the webhook call originates from a trusted source.

Use HMAC with SHA-256 to hash the request body with the shared secret. Then compare the result with the xilnex-webhook-signature header value, using a secure comparison function. See Validate the Request Signature below for the steps.

Duplicate Webhook Prevention

A retry carries the same xilnex-webhook-webhookjobid as the original call. Treat it as an idempotency key and check it on every call.

  • On a duplicate: return the same 2xx response as the original call, without re-executing any side effects. This covers the common case where your original 2xx response was lost in transit and Xilnex retried.
Note: Do not reject a duplicate with a non-2xx response. Xilnex treats any non-2xx response as a failure and keeps retrying until the job is marked as failed.

Response Timing Requirements

RequirementDetail
Initial responseRespond to each webhook call within 10 seconds to prevent an initial timeout.
RetriesIf the first call fails or times out, Xilnex retries up to 3 times. Each retry has a 100-second HTTP timeout. The wait between retries grows quadratically (attempt2): 1, 4, then 9 minutes. See the schedule below.
ProcessingProcess requests efficiently. Handle work asynchronously if needed, so the response is not delayed.
Success responseAny HTTP status code from 200 to 299 counts as a successful delivery. Any other status code counts as a failure and triggers a retry.

Retry schedule

AttemptWait Before AttemptHTTP Timeout
First callNone10 seconds
Retry 11 minute100 seconds
Retry 24 minutes100 seconds
Retry 39 minutes100 seconds

If the last retry also fails, Xilnex marks the webhook job as failed.


Validate the Request Signature

Warning: If your receiver skips signature validation, it cannot confirm that a call came from Xilnex. Keep the shared secret private and share it only with the team that maintains the receiver.
  1. Retrieve the signature from the xilnex-webhook-signature request header.
  2. Extract the raw request body.
  3. Hash the request body with the HMAC SHA-256 algorithm, using the shared secret as the key, and encode the result as a hex string.
  4. Compare the result with the signature from the header, using a secure comparison function.

If the values match, the request is valid. If they do not match, return 401 Unauthorized with a minimal response body.

If the Signature Does Not Match

You configure the signature secret in the Xilnex Portal. A mismatch usually means either the Portal secret or your receiver's local verification secret is wrong or out of date. Check both, and correct whichever is wrong.

Note: Xilnex computes the signature once, when it creates the webhook job, and reuses it on every retry. Where you make the fix decides whether in-flight retries recover.
Where You Fix the SecretEffect on In-Flight Retries
Receiver side (local verification secret updated to match the Portal)In-flight retries succeed.
Xilnex Portal (secret updated in the Portal)In-flight retries still fail, because they carry the signature generated from the old secret. They keep retrying until the job is marked as failed.
Info: You configure the shared secret in the Xilnex Portal when you manage the webhook configuration. For setup steps, see Integrating with Xilnex: Event Triggers & Webhook Configuration. 

    • Related Articles

    • Integrating with Xilnex: Event Triggers & Webhook Configuration

      Overview Xilnex Event Hub is an integration framework that enables your system to automatically dispatch real-time notifications to external applications whenever a defined business action occurs — such as completing a sale, creating a client, or ...
    • Xilnex Auth Integration Guide

      Introduction Xilnex Auth implements OAuth 2.0, a widely adopted authorization framework that enables secure access to protected resources by issuing access tokens to client applications. This document provides a comprehensive guide on how to use ...
    • Available Events: Xilnex Event Hub

      Last Updated: 02 Oct 2026 Sales # Event Name 1 Create Sales 2 Confirm Sales 3 Confirm Sales V2 4 Complete Sales 5 Complete Sales V2 6 Cancel Sales 7 Cancel Sales V2 8 Update Sales 9 Cancel Sales Order 10 Confirm Sales Order 11 Complete Sales Order 12 ...
    • Managing OAuth Client Credentials

      Overview Xilnex Auth implements the OAuth 2.0 protocol to govern service-to-service authorization. Client credentials serve as the authentication identity for backend services, enabling them to authorize, or be authorized by, other services within ...
    • OAuth Project & Client Permission Management

      Overview The OAuth Project & Client Permission module controls which roles can access, configure, and manage OAuth projects and client credentials within the system. Permissions are managed under System Configuration > User Roles Permission > All ...
    • Recent Articles

    • Updating Item Prices in Bulk with Price Modifier

      Overview Price Modifier is the Master Data function in ClassicPOS that changes item selling prices through a price change document. This article shows how to build that document from an Excel file and finalize it for your outlets. You export your ...
    • Sales Return Payment Type Check

      Purpose This permission controls whether a user can refund a sales return with a different payment method from the original sale. When a user picks a method the original sale did not use, a supervisor must approve it first. This keeps refunds ...
    • Store Order Receiving Deliveries with Auto-GRN: Scan, Check & Confirm

      This article applies to Xilnex Portal 3.0 and is written for staff who receive Purchase order from a plant, and for the staff who print the delivery notes. What this does, in plain terms Think of the label on a parcel at your door. One scan tells the ...
    • How to Enable Delivery Only for One Outlet in Classic POS

      Overview In the Xilnex Classic F&B POS, Delivery is an order type, just like Dine In and Take Away. This guide shows you how to offer Delivery at one outlet only, or how to hide it at one outlet while the others keep it. This is useful when only some ...
    • How to Set Up Multiple Selection Types for Others Payment in Cash Declaration

      Overview The Others payment method lets you take payments that are not cash or card. You can offer several choices under it, such as QR, Grab, Touch n Go or Bank Transfer. Each choice is tracked on its own line at Cash Declaration. This helps you see ...
    • Popular Articles

    • Basic - How to create a voucher-coupon

      Voucher and coupon definition Voucher can be generated in bulk and can be used once Coupon can only be created one at a time (reusable code) and can be use multiple times Pre-voucher / coupon setup There are 2 things need to be prepared before we can ...
    • Understanding DuitNow QR Payment in ClassicPOS

      Introduction This document introduces the DuitNow QR payment feature available in the Xilnex Retail POS, enabling merchants to accept payments conveniently through Malaysia's national QR payment standard. The integration of DuitNowQR simplifies the ...
    • Intermediate - How to Configure and Use Approval Settings in Purchase Orders (PO)

      1.0 What is approval setting In general, "approval setting" refers to the configuration or process by which a request, action, or change must be reviewed and approved before it proceeds. The term is often used in business, software applications, and ...
    • Buy 2 for Special Price Promotion

      Use Case: Stock clearance, seasonal offers, or spotlight products. From the sample screenshot above, this promotion requires 2 items to trigger. If only 1 Milk Tea is added to the sales list, no discount will apply since the condition of 2 items is ...
    • Creating Delivery Type for Sales in Classic POS

      How to Create Delivery Type 1. Access to the [System Configuration] 2. Select the [Sales] section 3. In the [All Outlets] tab, look for the 'Delivery Type' 4. Click on the [Configure] In the Delivery Type Setup form: 1. Enter the Delivery Type. 2. ...