type alias SetupWebhookEndpoint

Set up a webhook endpoint for a provider. Some providers (e.g. Stripe) support programmatic creation; recreating any existing endpoint returns a fresh signing secret. Shared by the provider interface and each provider's own implementation so the signature can't drift.

Definition

(
secretKey: string,
webhookUrl: string,
existingEndpointId?: string | null,
) => Promise<WebhookSetupResult>

Usage

import { type SetupWebhookEndpoint } from "docs/payments.ts";