WebhookEvent
in package
A webhook delivery whose `X-Axiam-Signature` has already been verified by {@see AxiamWebhooks::verify()} (CONTRACT.md §13). {@see self::$eventType} and {@see self::$deliveryId} are a best-effort parse of the verified body's `event`/`id` JSON fields — a non-JSON or differently-shaped body still verifies successfully (the MAC only covers the raw bytes, not their JSON shape), it simply leaves those two properties `null`. Callers that need the delivery id for at-least-once dedup (§13.3 rule 7) should prefer the `X-Axiam-Delivery` header over relying solely on this parse.
Table of Contents
Properties
- $body : string
- $deliveryId : string|null
- $eventType : string|null
- $timestamp : int
Methods
- __construct() : mixed
Properties
$body read-only
public
string
$body
$deliveryId read-only
public
string|null
$deliveryId
$eventType read-only
public
string|null
$eventType
$timestamp read-only
public
int
$timestamp
Methods
__construct()
public
__construct(int $timestamp, string $body, string|null $eventType, string|null $deliveryId) : mixed
Parameters
- $timestamp : int
-
The unix-seconds timestamp from the signature header's
t=field (already checked against the freshness tolerance). - $body : string
-
The exact raw body bytes that were verified.
- $eventType : string|null
-
The verified body's
"event"field, ornullif absent/not a string. - $deliveryId : string|null
-
The verified body's
"id"field, ornullif absent/not a string.