Run onEvent after the response is sent. Pass Next's after (from "next/server"), or
ctx.waitUntil on other runtimes. The provider gets 200 as soon as the signature is valid,
so a failure in onEvent is only logged: use it to enqueue work, not to do it.
Default: run onEvent first, and answer 500 if it throws so the provider retries.
Optionallogger
logger?:Logger
Optionalparam
param?:string
Dynamic segment holding the provider id. Default "provider". Ignored when provider is set.
Optionalprovider
provider?:ProviderId
Fixed provider for this route, e.g. for app/api/webhooks/paymob/route.ts.
Run
onEventafter the response is sent. Pass Next'safter(from "next/server"), orctx.waitUntilon other runtimes. The provider gets 200 as soon as the signature is valid, so a failure inonEventis only logged: use it to enqueue work, not to do it. Default: runonEventfirst, and answer 500 if it throws so the provider retries.