/** * lomi. Payment Elements * * Client-side payment form components for lomi. payments. * Fully white-labeled - no third-party branding exposed. * * @example * ```ts * import { loadLomi } from '@lomi./sdk'; * import type { Lomi, LomiElements } from '@lomi./sdk'; * * const lomi: Lomi = await loadLomi('lomi_pk_...'); * const elements: LomiElements = lomi.elements({ clientSecret }); * const paymentElement = elements.create('payment'); * paymentElement.mount('#payment-element'); * ``` */ import type { Stripe, StripeElements, StripeElementsOptions, StripePaymentElement, StripePaymentElementOptions, PaymentIntentResult, SetupIntentResult, ConfirmPaymentData } from '@stripe/stripe-js'; /** White-labeled Stripe instance for card / Payment Element flows. */ export type Lomi = Stripe; export type LomiElements = StripeElements; export type LomiElementsOptions = StripeElementsOptions; export type LomiPaymentResult = PaymentIntentResult; export type LomiSetupResult = SetupIntentResult; export type LomiConfirmPaymentData = ConfirmPaymentData; export type LomiPaymentElement = StripePaymentElement; export type LomiPaymentElementCreateOptions = StripePaymentElementOptions; export type LomiPaymentElementTheme = 'light' | 'dark' | 'flat' | 'stripe' | 'night'; export type LomiBillingAddressCollection = 'auto' | 'never'; export interface CreateLomiElementsOptions { clientSecret: string; theme?: LomiPaymentElementTheme; borderRadiusPx?: number; } export interface CreateLomiPaymentElementOptions { billingAddress?: LomiBillingAddressCollection; } /** * Load and initialize lomi. for payment processing. * * @param publishableKey - Your lomi. publishable key (lomi_pk_...) * @returns Promise resolving to lomi. instance * * @example * ```ts * import { loadLomi } from '@lomi./sdk'; * import type { Lomi, LomiElements } from '@lomi./sdk'; * * const lomi: Lomi | null = await loadLomi('lomi_pk_your_key'); * * if (lomi) { * // Create elements with client secret from your server * const elements: LomiElements = lomi.elements({ * clientSecret: 'pi_xxx_secret_xxx' * }); * * // Create and mount payment element * const paymentElement = elements.create('payment'); * paymentElement.mount('#payment-element'); * * // Handle form submission * const { error } = await lomi.confirmPayment({ * elements, * confirmParams: { return_url: 'https://yoursite.com/success' } * }); * } * ``` */ export declare function loadLomi(publishableKey: string): Promise; /** * Creates a Lomi elements instance with normalized light/dark/flat theme naming. */ export declare function createLomiElements(lomi: Lomi, options: CreateLomiElementsOptions): LomiElements; /** * Creates a Payment Element with optional billing-address collection override. * Use `billingAddress: 'never'` to hide country/address selector in UI. */ export declare function createLomiPaymentElement(elements: LomiElements, options?: CreateLomiPaymentElementOptions): LomiPaymentElement; /** * Namespace export for alternative import style */ export declare const lomi: { load: typeof loadLomi; createElements: typeof createLomiElements; createPaymentElement: typeof createLomiPaymentElement; }; export default loadLomi; //# sourceMappingURL=elements.d.ts.map