import type { Surface } from '@funkit/connect-core'; import type { SurfaceAdapter } from './adapter'; import type { StripeOnrampClient } from './stripeOnramp'; interface StripeCheckoutParams { action: 'PERFORM_CHECKOUT'; sessionId: string; callbackEndpoint: string; callbackIdField: string; } /** Fetches one `client_secret` for a single Stripe checkout attempt. */ export type CheckoutClientSecretRequest = (params: { callbackEndpoint: string; callbackIdField: string; }) => Promise; export declare function matchStripeCheckoutParams(surface: Surface): StripeCheckoutParams | undefined; /** * Stripe's checkout loop, which is the only thing that finalises a purchase. * * The charge is not settled by our backend's checkout endpoint returning a * client secret — Stripe treats the transaction as final only once * `performCheckout` resolves, because it owns the next actions (3DS) between * attempts. So the callback endpoint is never called outside this callback, * and the surface stays mounted for the whole loop rather than reporting on * the first secret it receives. */ export declare function stripeCheckoutAdapter(stripe: StripeOnrampClient, requestClientSecret: CheckoutClientSecretRequest): SurfaceAdapter; export {}; //# sourceMappingURL=stripeCheckout.d.ts.map