Boyasa Docs

Webhooks

Receiver-ready, dispatch not yet live

The contract below — event names, payload shape, and HMAC signature scheme — is what the official WooCommerce plugin already implements and verifies on its receiving end. The Boyasa API does not yet send these events; there is no outbound webhook dispatcher implemented server-side. If you're integrating today, poll GET /packages/:id for status changes instead.

Event types

EventFired when
delivery.assignedA driver/rider is assigned to the order
delivery.picked_upThe driver has picked up the package
delivery.in_transitThe driver has started the delivery
delivery.deliveredThe package has been delivered
delivery.failedThe delivery attempt failed
delivery.cancelledThe order was cancelled

Payload

POST https://your-site.com/wp-json/boyasa/v1/webhook
{
  "event": "delivery.delivered",
  "delivery_id": "ord_9f8c2b1a",
  "status": "DELIVERED",
  "timestamp": "2026-07-06T21:32:00Z"
}

Verifying the signature

Every request is signed with HMAC-SHA256 using your webhook secret, sent in the X-Boyasa-Signature header:

PHP
$expected = hash_hmac('sha256', $raw_request_body, $webhook_secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_BOYASA_SIGNATURE'] ?? '')) {
    http_response_code(401);
    exit;
}