Beignet API reference
    Preparing search index...

    Function createWebhookRoute

    • Create a Next.js POST handler for generic verified inbound webhooks.

      The route reads the raw request body as text, normalizes request headers, builds app context from the real request through server.createRequestContext(...), verifies the event through the webhook definition or a context-aware verifier, validates the matching event payload schema, and delegates fulfillment to app code.

      Type Parameters

      Returns { POST: (req: Request) => Promise<Response> }