Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Latest commit

 

History

History
72 lines (39 loc) · 1.42 KB

SeamWebhook.md

File metadata and controls

72 lines (39 loc) · 1.42 KB

seamapi / Exports / SeamWebhook

Class: SeamWebhook

Parse and verify webhook payloads.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SeamWebhook(secret)

Create a new instance of SeamWebhook.

Parameters

Name Type Description
secret string your webhook secret from the dashboard

Defined in

src/webhooks.ts:14

Properties

wh

Private wh: Webhook

Defined in

src/webhooks.ts:8

Methods

verify

verify(payload, headers): SeamWebhookEvent

Verify a payload received from a webhook and return the typed event.

Parameters

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)

Returns

SeamWebhookEvent

event

Defined in

src/webhooks.ts:24