export type Styles = { [property in `--bolt-${string}`]: string; }; export declare const validationErrorMap: Map; export interface TokenResult { token?: string; last4?: string; bin?: string; expiration?: string; postal_code?: string; network?: string; } export type EventCallback = ((e: string) => void) | (() => void); export type EventType = 'error' | 'valid' | 'blur' | 'focus'; export interface EventListeners { blur: EventCallback; error: EventCallback; focus: EventCallback; valid: EventCallback; } export type CreditCardId = { id: string; expiration: string; }; export type CreditCardInfo = CreditCardId | TokenResult; export declare const threeDSErrorMap: Map; export declare class ThreeDSError extends Error { code: number; constructor(code: number); } export interface ThreeDSConfig { referenceID: string; jwtPayload: string; stepUpUrl: string; } export interface ThreeDSResult { success: boolean; error?: ThreeDSError; } /** * Approved Apple Pay button label variants per Apple's Human Interface * Guidelines. Maps to PKPaymentButtonType values. */ export type ApplePayButtonType = 'plain' | 'buy' | 'setUp' | 'inStore' | 'donate' | 'checkout' | 'book' | 'subscribe' | 'reload' | 'addMoney' | 'topUp' | 'order' | 'rent' | 'support' | 'contribute' | 'tip'; /** * Approved Google Pay button label variants per Google's brand guidelines. */ export type GooglePayButtonType = 'plain' | 'buy' | 'pay' | 'checkout' | 'subscribe' | 'donate' | 'order' | 'book'; /** * Google Pay button color theme. Maps to ButtonConstants.ButtonTheme on Android. */ export type GooglePayButtonTheme = 'dark' | 'light'; export interface ApplePayResult { token: string; bin?: string; /** * Only populated in webview mode. Native mode tokenizes via * @boltpay/tokenizer, whose decrypted PassKit payload only carries the * DPAN and never surfaces last4. */ last4?: string; network?: string; expiration?: string; billingContact?: ApplePayBillingContact; /** * Bolt reference string, only populated in webview mode. Native mode * tokenizes via @boltpay/tokenizer and does not surface a reference. Left * optional on the shared result shape so consumers can read it * conditionally without narrowing on mode. */ boltReference?: string; } export interface ApplePayBillingContact { givenName?: string; familyName?: string; emailAddress?: string; phoneNumber?: string; postalAddress?: { street?: string; city?: string; state?: string; postalCode?: string; country?: string; }; } export interface ApplePayConfig { merchantId?: string; countryCode: string; currencyCode: string; supportedNetworks?: string[]; total: { label: string; amount: string; }; } export interface GooglePayResult { token: string; bin?: string; last4?: string; network?: string; expiration?: string; email?: string; billingAddress?: GooglePayBillingAddress; /** * @deprecated Not populated by the JS tokenizer flow introduced in 0.9.x. * Retained for backwards-compatible typing so consumers reading * `result.boltReference` still compile. Will be removed in the next major * version. */ boltReference?: string; } export interface GooglePayBillingAddress { name?: string; address1?: string; address2?: string; locality?: string; administrativeArea?: string; postalCode?: string; countryCode?: string; phoneNumber?: string; } /** * Configuration for the Google Pay button. Merchant/gateway config is * automatically fetched from Bolt's `/v1/apm_config/googlepay` endpoint * using the publishable key — you only need to provide presentation options. */ export interface GooglePayConfig { /** Billing address collection: "full" collects all fields, "none" skips. Defaults to "full". */ billingAddressCollectionFormat?: 'full' | 'none'; /** ISO 4217 currency code. Defaults to "USD". */ currencyCode?: string; /** Label shown in the Google Pay sheet (e.g. "Store card for future charges"). */ label?: string; /** Total price as a string (e.g. "10.00"). Defaults to "0.00". */ amount?: string; } /** Shape returned by GET /v1/apm_config/googlepay */ export interface GooglePayAPMConfigResponse { merchant_config?: GooglePayAPMConfig; bolt_config: GooglePayAPMConfig; } export interface GooglePayAPMConfig { credit_card_processor: string; tokenization_specification: { type: string; parameters: Record; }; merchant_id: string; merchant_name: string; } //# sourceMappingURL=types.d.ts.map