seamapi / Exports / SeamWebhook
Parse and verify webhook payloads.
• new SeamWebhook(secret
)
Create a new instance of SeamWebhook.
Name | Type | Description |
---|---|---|
secret |
string |
your webhook secret from the dashboard |
• Private
wh: Webhook
▸ verify(payload
, headers
): SeamWebhookEvent
Verify a payload received from a webhook and return the typed event.
Name | Type | Description |
---|---|---|
payload |
string |
must be a string (should not be the parsed JSON object) |
headers |
Record <string , string > |
request headers (used to verify against the secret) |
event