@bates-solutions/stripe API Reference - v2.2.1
    Preparing search index...

    Function parseAndVerifyWebhook

    • Verify and parse a webhook request.

      Parameters

      • rawBody: string

        The raw request body string

      • signature: string

        The stripe-signature header value

      • signingSecret: string

        Your webhook signing secret

      • Optionaloptions: VerifyOptions

        Verification options

      Returns Promise<ParsedWebhookRequest>

      The parsed and verified webhook request

      Error if verification or parsing fails

      const { event } = parseAndVerifyWebhook(
      rawBody,
      signature,
      process.env.STRIPE_WEBHOOK_SECRET!
      );