@redwoodjs-stripe/api
Version:
API-side code for RedwoodJS-Stripe projects
16 lines (15 loc) • 556 B
TypeScript
import type { APIGatewayEvent, Context } from "aws-lambda";
import type { Stripe } from "stripe";
type Webhook = (event: Stripe.Event, context: Context) => unknown | Promise<unknown>;
type Webhooks = Record<Stripe.Event["type"], Webhook>;
interface HandleStripeWebhooksProps {
event: APIGatewayEvent;
context: Context;
webhooks?: Webhooks;
secure?: boolean;
}
export declare const handleStripeWebhooks: ({ event, context, webhooks, secure, }: HandleStripeWebhooksProps) => Promise<{
statusCode: number;
results: any;
}>;
export {};