Webhook
SIPESAN sends real-time HTTP POST callbacks to your server when a message status changes (delivery status), and also receives inbound webhooks from messaging channels.
Delivery Status Webhook
Receive a callback whenever a message status changes. Configure your webhook endpoint URL in the business dashboard.
Payload Structure
| Field | Type | Description |
|---|---|---|
messageid |
string | The unique identifier of the message. |
status |
string | Current status: sent, delivered, read, undelivered, or failed. |
reason |
string|null | Error description when undelivered. For the WhatsApp Web (QR) channel: account_banned (the number was banned by WhatsApp), channel_disconnected_timeout (channel stayed disconnected past the timeout), opted_out (the customer replied STOP/BERHENTI), channel_missing (channel not found). |
datetime |
string | ISO-8601 timestamp of the event. |
signature |
string | MD5 hash for verifying payload authenticity. |
Example Payload
{
"messageid": "e145f8a2-...",
"status": "delivered",
"reason": null,
"datetime": "2026-06-05T12:00:00+07:00",
"signature": "9b2c1f3a4d5e6f7a8b9c0d1e2f3a4b5c"
}
Signature Verification
To verify the webhook originated from our servers, compute the MD5 hash of the concatenated string: {channelId}{messageId}{status}{datetime}, then compare it to the signature field.
PHP Example
<?php
$channelId = '8d7c0b1e-...'; // Channel ID Anda
$payload = json_decode(file_get_contents('php://input'));
$signatureRaw = $channelId
. $payload->messageid
. $payload->status
. $payload->datetime;
$expectedSignature = md5($signatureRaw);
if (hash_equals($expectedSignature, $payload->signature)) {
// Signature valid — proses webhook di sini.
}
Inbound Channel Webhooks
Endpoints the messaging platforms call on SIPESAN. You do not call these yourself — just connect the channel in the business panel.
| Method | Path | Verification | Notes |
|---|---|---|---|
| GET / POST | /webhooks/whatsapp/{identifier} |
GET with hub.challenge for Meta verification; POST for incoming messages. | Verify token is configured per channel in the business panel. |
| POST | /telegram/webhook/{webhookId} |
POST for Telegram updates. | webhook_id is the Telegram channel ID in SIPESAN. |
| GET / POST | /webhooks/instagram |
GET with hub.challenge for Meta verification; POST for incoming messages. | Verify token is configured per Instagram channel. |