import { f as ProviderFactory, n as ChargeRequest, u as ProviderEvent, v as RefundRequest } from "./index-Qle7altp.js";
import Stripe from "stripe";
//#region src/stripe.d.ts
type StripeCreds = {
  secretKey: string;
  webhookSecret: string;
  stripe?: Stripe;
  apiVersion?: string;
  /** Host authority for a requested Connect destination + fee tuple. */
  authorizeConnectSplit?: (chargeKey: string, extras: StripeChargeExtras) => boolean | Promise<boolean>;
  /** Host-owned authoritative lookup for every refund target. */
  resolvePaymentIntentId?: (chargeKey: string) => string | Promise<string>;
};
/** Stripe refund calls need the original PaymentIntent id (pi_…). */
type StripeRefundRequest = RefundRequest & {
  paymentIntentId?: string;
};
/**
 * Structured, charge-time-only Stripe Connect inputs. These MONEY-ROUTING
 * fields ride a TYPED request extension — NEVER `metadata` (spec floor #6 /
 * request-extension pattern). `metadata` is a caller-supplied
 * `Record<string,string>`; reading `transfer_data.destination` from it let any
 * caller who could set a metadata key REDIRECT the payout to an arbitrary
 * Connect account (a funds-redirect authorization hole). The adapter now reads
 * the destination/fee ONLY from this typed field and IGNORES the metadata path.
 */
type StripeChargeExtras = {
  /** Connect account that receives the transfer (acct_…). Routes money → typed, never metadata. */
  connectDestination?: string;
  /** Platform application fee in minor units, retained on the platform. */
  applicationFeeAmount?: number;
};
type StripeChargeRequest = ChargeRequest & {
  stripe?: StripeChargeExtras;
};
declare function classifyStripeEvent(event: Stripe.Event, client: Stripe): Promise<ProviderEvent>;
declare const stripe: ProviderFactory;
//#endregion
export { StripeChargeExtras, StripeChargeRequest, StripeCreds, StripeRefundRequest, classifyStripeEvent, stripe };