Create a Next.js POST handler for provider-verified payment webhooks.
The route checks the provider signature header and bounds the raw request
body before resolving the server, then builds app context from a rehydrated
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.
Create a Next.js POST handler for provider-verified payment webhooks.
The route checks the provider signature header and bounds the raw request body before resolving the server, then builds app context from a rehydrated request through
server.createRequestContext(...), verifies the event throughctx.ports.payments, and then delegates fulfillment to app code. This is the canonical helper for Beignet billing flows backed byPaymentsPort. Keep this route on the Node.js runtime when your provider SDK requires Node APIs.