export interface WebhookDelivery { /** The event type this delivery carried, for example `payment.succeeded`. */ event: string | null; /** Unique identifier for this delivery attempt. Pass it to the replay endpoint to re-send this exact payload. */ id: string; /** The id of the delivery attempt this one replayed. `null` for an original delivery. */ replayed_from: string | null; /** The JSON event payload sent to the webhook endpoint. */ request_body: Record; /** ID of the resource that triggered the webhook. */ resource_id: string; /** The endpoint's JSON response. A non-JSON response is stored as `{ error, raw_body }` with the first 100 bytes. */ response_body: Record | null; /** HTTP response code received from the webhook endpoint. */ response_code: number; /** When the webhook was sent, as an ISO 8601 timestamp. */ sent_at: string; /** Outcome of this delivery attempt: `success` when the endpoint returned a 2xx response, `error` otherwise. */ status: WebhookDelivery.Status; /** Whether the endpoint acknowledged this attempt with a 2xx response. */ success: boolean; /** Total time taken to send the webhook request, in seconds. */ total_time: number; } export declare namespace WebhookDelivery { /** Outcome of this delivery attempt: `success` when the endpoint returned a 2xx response, `error` otherwise. */ const Status: { readonly Success: "success"; readonly Error: "error"; }; type Status = (typeof Status)[keyof typeof Status]; }