Beignet API reference
    Preparing search index...

    Function createPaymentWebhookRoute

    • Create a Next.js POST handler for provider-verified payment webhooks.

      The route extracts the provider signature header, reads the raw request body as text, builds app context from the real request through server.createRequestContext(...), verifies the event through ctx.ports.payments, and then delegates fulfillment to app code. This is the canonical helper for Beignet billing flows backed by PaymentsPort. Keep this route on the Node.js runtime when your provider SDK requires Node APIs.

      Type Parameters

      • Ctx extends PaymentWebhookRouteContext

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