• Verifies and validates a Plain webhook payload.

    Parameters

    • payloadRaw: string
    • signature: string

      The value of the 'Plain-Request-Signature' header.

    • secret: string

      Your Plain webhook signing secret.

    • tolerance: number = 300

      (Optional) Maximum allowed difference in seconds between the timestamp and the current time. Defaults to 300 seconds. This is helpful to prevent replay attacks.

    Returns Result<WebhooksSchemaDefinition, PlainWebhookError>

    A Result object containing the validated payload or an error.

Generated using TypeDoc