Beignet API reference
    Preparing search index...

    Function createWebhookRoute

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

      The route bounds and reads the raw request body before resolving the server, then normalizes request headers and builds app context from a rehydrated 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> }