Lamha
Api Home
Home
Api Home
Home
  1. Webhook
  • lamha
    • Welcome 👋
    • Status Order
    • Payment Method
    • Webhook Order
    • Rate Limit
    • API
      • Order
        • Orders List
        • Order Create
        • Order Show
        • Order Activities
        • Order Edit
        • Delete Order
        • Cancel Order
        • Return Order
      • Country
        • Countries
        • City
      • Carrier
        • Carriers
        • Create Shippment
        • Cancel Shippment
        • Label Shipment
        • Carrier City Coverage
        • Carrier Coverage
      • Warehouses
        • All Warehouses
      • Webhook
        • Webhooks Events
        • List webhooks
          GET
        • Register a webhook
          POST
    • security
      • Webhook For Nginx
  • Schemas
    • Payload Webhook Order Update
  1. Webhook

Webhooks Events

Webhooks#

Webhooks let your integration receive real-time push notifications the moment something happens to an order, a shipment, or your wallet — without ever polling the API.
🔔
Instead of repeatedly asking the API "did anything change?", you register a public HTTPS endpoint once. Lamha then delivers a signed message to that endpoint automatically, every time an event you subscribed to occurs.

How it works#

The flow at a glance
1.
Subscribe — register your receiving URL for one or more events, with an optional shared secret.
2.
An event happens — an order is created, a status changes, a label becomes ready, and so on.
3.
Lamha delivers — a signed POST is pushed to your URL carrying the event name and its data.
4.
You verify & act — you validate the signature, acknowledge the delivery, then process it on your side.
Each subscription is tied to a single event type. You can register multiple webhooks — for different events, or even different destinations for the same event.

Available events#

Every webhook subscribes to exactly one of the following event types.
EventFires when
order.createdA new order is created.
order.status.changedAn order's status is updated.
order.shipment.createdA shipment is created for an order.
order.shipment.cancelledA shipment is cancelled.
order.national_address_statusThe national-address status changes.
shipment.label.readyThe shipping label (waybill) becomes ready.
balance.depositFunds are deposited into your wallet.
balance.lowYour wallet balance drops below the threshold.
automation.failedAn automation run fails.

Event conditions#

Some events can be narrowed down so you only receive the deliveries that matter to you.
::accordion-item{title="Filter order status changes"}
For order.status.changed, you can restrict delivery to a specific set of order statuses (for example: only picked, delivered, and returned). If you don't specify any, every status change is delivered.
::
::accordion-item{title="Filter low-balance alerts"}
For balance.low, you can set a numeric threshold so the event only fires once your wallet balance drops below that value.
::

What a delivery looks like#

When a subscribed event fires, Lamha pushes a signed message to your endpoint. Every delivery carries a small set of headers that describe and secure it:
HeaderMeaning
X-Webhook-SignatureAn HMAC-SHA256 signature of the message body, signed with your secret.
X-Webhook-EventThe event name (e.g. order.status.changed).
X-Webhook-IdA unique id for this delivery attempt — use it to avoid processing the same event twice.
X-Webhook-TimestampWhen the delivery was sent (ISO-8601).
The message body always contains three fields: the event name, its data, and a timestamp.
Acknowledge quickly
Return a 2xx response fast, then do any heavy work asynchronously. A non-2xx response is treated as a failure and the delivery is retried.

Security & verification#

Always verify the signature
Never trust an incoming payload before checking its signature. Recompute the HMAC-SHA256 of the received body using your stored secret and compare it against the X-Webhook-Signature header. If they don't match, reject the request.
About the secret
The shared secret is what makes deliveries verifiable. If you don't provide one when subscribing, Lamha generates a strong secret for you — but it is shown only once, so store it safely. It is never returned again afterwards.

Verification ping#

Automatic ownership check
As soon as you register an active webhook, Lamha sends a one-off verification delivery to confirm your endpoint is reachable and can validate signatures.
It arrives just like a normal delivery, but its event name ends with .verification and its data contains "verification": true. Treat it as a health check — acknowledge it with 2xx and don't process it as a real business event.
Modified at 2026-09-01 09:15:10
Previous
All Warehouses
Next
List webhooks
Built with