Skip to content

signWebhookPayload

function signWebhookPayload(
payload: string,
secret: string,
timestamp?: string): WebhookSignature;

Defined in: src/mft/webhooks.ts:82

Computes the HMAC-SHA256 signature for a webhook payload.

ParameterTypeDescription
payloadstringRaw JSON string of the webhook body.
secretstringShared secret.
timestampstringOptional fixed timestamp. Defaults to new Date().toISOString().

WebhookSignature

The signature parts that should be included on the request.