Beignet API reference
    Preparing search index...

    Type Alias CreatePaymentWebhookRouteOptions<Ctx>

    Options for creating a payment webhook route.

    type CreatePaymentWebhookRouteOptions<Ctx extends PaymentWebhookRouteContext> = {
        handle?: (
            args: PaymentWebhookRouteHandlerArgs<Ctx>,
        ) =>
            | Promise<PaymentWebhookRouteHandlerResult>
            | PaymentWebhookRouteHandlerResult;
        headers?: HeadersInit | ((req: Request) => HeadersInit | undefined);
        pipeline?: {
            metadata?: RawRouteInit["metadata"];
            name?: string;
            path?: string;
        };
        server: ServerSource<NextRouteServer<Ctx>>;
        signatureHeader?: string;
    }

    Type Parameters

    • Ctx extends PaymentWebhookRouteContext
    Index

    App-owned fulfillment handler. The webhook is verified before this runs.

    Omit to acknowledge verified events with { ok: true }.

    headers?: HeadersInit | ((req: Request) => HeadersInit | undefined)

    Additional response headers.

    pipeline?: { metadata?: RawRouteInit["metadata"]; name?: string; path?: string }

    Identity and metadata for the hooks pipeline when the server exposes rawRoute(...). metadata feeds metadata-driven hooks such as rate limiting and idempotency; name and path identify the route to hooks, instrumentation, and devtools.

    server: ServerSource<NextRouteServer<Ctx>>

    Beignet server that owns app context and ports.

    Any object exposing createRequestContext works: a NextServer, a core ServerInstance, or a test fake driven from a standard test runner.

    signatureHeader?: string

    Provider signature header. Stripe uses stripe-signature.

    "stripe-signature"