@zippypay/checkout 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,265 @@
1
+ type ZippyEnvironment = 'production' | 'staging' | 'development';
2
+ /** API origin per environment. Paths such as `/api/v1/...` are appended by the SDK client. */
3
+ declare const ZIPPY_API_BASE_URLS: Record<ZippyEnvironment, string>;
4
+ declare const ZIPPY_API_PATH_PREFIX = "/api/v1";
5
+ declare function isZippyEnvironment(value: string): value is ZippyEnvironment;
6
+ declare function resolveApiBaseUrl(environment: ZippyEnvironment): string;
7
+ declare function parseZippyEnvironment(value: string): ZippyEnvironment;
8
+
9
+ type PaymentSessionStatus = 'CREATED' | 'AWAITING_PAYMENT' | 'COMPLETED' | 'EXPIRED' | 'CANCELLED' | 'FAILED';
10
+ type PaymentSessionPhase = 'IDLE' | 'PAYING';
11
+ /** Server checkout method — locks after checkout start. */
12
+ type ApiCheckoutMethod = 'QR' | 'MANUAL';
13
+ type PaymentSessionPayer = {
14
+ paymentId: string;
15
+ displayName: string;
16
+ profileImage: string | null;
17
+ };
18
+ type PaymentSession = {
19
+ sessionId: string;
20
+ amount: string;
21
+ currency: 'USD';
22
+ status: PaymentSessionStatus;
23
+ successUrl: string | null;
24
+ failureUrl: string | null;
25
+ businessName: string;
26
+ transactionId: string | null;
27
+ transactionStatus: string | null;
28
+ payer: PaymentSessionPayer | null;
29
+ /** Idle shelf — customer must start checkout before this. */
30
+ expiresAt: string;
31
+ /** Hard max — session + client token expire here. */
32
+ absoluteExpiresAt: string;
33
+ phase: PaymentSessionPhase;
34
+ checkoutMethod: ApiCheckoutMethod | null;
35
+ paymentStartAt: string | null;
36
+ /** Pay window countdown — only meaningful when phase is PAYING. */
37
+ paymentExpiryAt: string | null;
38
+ createdAt: string;
39
+ };
40
+ type VerifyPayerResponse = PaymentSessionPayer;
41
+ type ProblemJson = {
42
+ type?: string;
43
+ title?: string;
44
+ status?: number;
45
+ detail?: string;
46
+ instance?: string;
47
+ code?: string;
48
+ correlationId?: string;
49
+ errors?: Record<string, string[]>;
50
+ };
51
+
52
+ type ZippyTheme = {
53
+ primary?: string;
54
+ primaryForeground?: string;
55
+ background?: string;
56
+ surface?: string;
57
+ text?: string;
58
+ textMuted?: string;
59
+ border?: string;
60
+ error?: string;
61
+ success?: string;
62
+ borderRadius?: string;
63
+ fontFamily?: string;
64
+ mode?: 'light' | 'dark' | 'auto';
65
+ };
66
+ type EmbedMode = 'inline' | 'modal';
67
+ type ZippyPayConfig = {
68
+ environment: ZippyEnvironment;
69
+ sessionId: string;
70
+ clientToken: string;
71
+ mode?: EmbedMode;
72
+ container?: HTMLElement | string;
73
+ theme?: ZippyTheme;
74
+ locale?: 'en';
75
+ redirectOnComplete?: boolean;
76
+ redirectOnFailure?: boolean;
77
+ closeOnBackdropClick?: boolean;
78
+ closeOnEscape?: boolean;
79
+ onReady?: (session: PaymentSession) => void;
80
+ onSessionUpdate?: (session: PaymentSession) => void;
81
+ onComplete?: (session: PaymentSession) => void;
82
+ onExpired?: (session: PaymentSession) => void;
83
+ onError?: (error: ZippyPayError) => void;
84
+ onClose?: () => void;
85
+ };
86
+ type CheckoutMethod = 'qr' | 'manual';
87
+ type CheckoutPhase = 'loading' | 'choose-method' | 'qr-active' | 'manual-entry' | 'manual-confirm' | 'awaiting' | 'success' | 'expired' | 'cancelled' | 'declined' | 'failed' | 'error' | 'invalid-session';
88
+ declare const TERMINAL_STATUSES: readonly PaymentSessionStatus[];
89
+ declare const POLLABLE_STATUSES: readonly PaymentSessionStatus[];
90
+ declare class ZippyPayError extends Error {
91
+ readonly code: string;
92
+ readonly status: number;
93
+ readonly detail: string;
94
+ readonly correlationId?: string;
95
+ constructor(problem: ProblemJson);
96
+ }
97
+ type ZippyPayCheckoutInstance = {
98
+ open(): void;
99
+ close(): void;
100
+ destroy(): void;
101
+ };
102
+
103
+ type ApiClientConfig = {
104
+ baseUrl: string;
105
+ sessionId: string;
106
+ clientToken: string;
107
+ };
108
+ declare class PaymentSessionClient {
109
+ private readonly baseUrl;
110
+ private readonly sessionId;
111
+ private readonly clientToken;
112
+ constructor(config: ApiClientConfig);
113
+ getSession(): Promise<PaymentSession>;
114
+ verifyPayer(paymentId: string): Promise<VerifyPayerResponse>;
115
+ attachPayer(paymentId: string): Promise<PaymentSession>;
116
+ startCheckout(method: ApiCheckoutMethod): Promise<PaymentSession>;
117
+ startQrCheckout(): Promise<PaymentSession>;
118
+ startManualCheckout(): Promise<PaymentSession>;
119
+ private sessionPath;
120
+ private headers;
121
+ private request;
122
+ private parseError;
123
+ }
124
+ declare function attachPayerWithRetry(client: PaymentSessionClient, paymentId: string): Promise<PaymentSession>;
125
+
126
+ type PollerOptions = {
127
+ intervalMs?: number;
128
+ hiddenIntervalMs?: number;
129
+ onUpdate: (session: PaymentSession) => void;
130
+ onError?: (error: unknown) => void;
131
+ shouldPoll?: (session: PaymentSession) => boolean;
132
+ };
133
+ declare class SessionPoller {
134
+ private readonly fetchSession;
135
+ private readonly options;
136
+ private timer;
137
+ private running;
138
+ private stopped;
139
+ constructor(fetchSession: () => Promise<PaymentSession>, options: PollerOptions);
140
+ start(initialSession?: PaymentSession): void;
141
+ stop(): void;
142
+ private shouldContinue;
143
+ private intervalMs;
144
+ private scheduleNext;
145
+ private tick;
146
+ }
147
+ declare function isTerminalStatus(status: PaymentSessionStatus): boolean;
148
+ declare function phaseFromSession(status: PaymentSessionStatus): CheckoutPhase;
149
+
150
+ /** Pay countdown target — only after checkout has started. */
151
+ declare function getCountdownTarget(session: PaymentSession): string | null;
152
+ /** Whether the checkout UI should show the pay-window progress bar. */
153
+ declare function shouldShowPayProgress(session: PaymentSession | null, phase: CheckoutPhase): boolean;
154
+ /** Remaining pay-window ratio (1 = full time left, 0 = expired). */
155
+ declare function getPayWindowRemainingRatio(session: PaymentSession): number | null;
156
+ /** Idle shelf deadline — show soft hint only, not a pay countdown. */
157
+ declare function getSoftIdleHint(session: PaymentSession): string | null;
158
+ declare function msUntil(iso: string): number;
159
+
160
+ declare class CheckoutController implements ZippyPayCheckoutInstance {
161
+ private readonly config;
162
+ private readonly client;
163
+ private readonly embed;
164
+ private readonly poller;
165
+ private ui;
166
+ private session;
167
+ private paymentId;
168
+ private verifiedPayer;
169
+ private committedMethod;
170
+ private phase;
171
+ private errorMessage;
172
+ private loading;
173
+ private destroyed;
174
+ private modalOpen;
175
+ private exitMode;
176
+ private terminalFailureReason;
177
+ constructor(config: ZippyPayConfig);
178
+ open(): void;
179
+ close(): void;
180
+ destroy(): void;
181
+ private snapshotUiState;
182
+ private syncUi;
183
+ private bootstrap;
184
+ private applySession;
185
+ private resolveActivePhase;
186
+ private handleSessionUpdate;
187
+ private handleFailure;
188
+ private handleSuccess;
189
+ private executeTerminalExit;
190
+ private resolveExitMode;
191
+ private failurePhaseFromReason;
192
+ private teardownView;
193
+ private handleBootstrapError;
194
+ private handleError;
195
+ private chooseMethod;
196
+ private verify;
197
+ private attach;
198
+ private handleFlowError;
199
+ private refreshAfterConflict;
200
+ }
201
+ declare function createCheckout(config: ZippyPayConfig): ZippyPayCheckoutInstance;
202
+
203
+ declare const ELEMENT_TAG = "zippy-pay-checkout";
204
+ declare class ZippyPayCheckoutElement extends HTMLElement {
205
+ private instance;
206
+ static get observedAttributes(): string[];
207
+ connectedCallback(): void;
208
+ disconnectedCallback(): void;
209
+ attributeChangedCallback(): void;
210
+ set clientToken(value: string);
211
+ get clientToken(): string;
212
+ private mount;
213
+ private unmount;
214
+ private readConfig;
215
+ private dispatch;
216
+ open(): void;
217
+ close(): void;
218
+ destroy(): void;
219
+ }
220
+ declare function defineZippyPayCheckoutElement(): void;
221
+
222
+ declare global {
223
+ interface HTMLElementTagNameMap {
224
+ 'zippy-pay-checkout': ZippyPayCheckoutElement;
225
+ }
226
+ }
227
+
228
+ /** Personal Zippy handles: 3–20 chars, optional single dot, no leading/trailing dot. */
229
+ declare const PAYMENT_ID_PATTERN: RegExp;
230
+ declare function normalizePaymentId(value: string): string;
231
+ declare function isValidPaymentId(value: string): boolean;
232
+ declare function paymentIdValidationMessage(): string;
233
+ declare function formatAmount(amount: string, currency: string): string;
234
+
235
+ /** Deep link scanned by the Zippy app — sessionId only, never clientToken. */
236
+ declare function buildPaymentQrPayload(sessionId: string): string;
237
+ type QrErrorCorrection = 'L' | 'M' | 'Q' | 'H';
238
+ /** Renders a QR code as an SVG string for embedding in the checkout UI. */
239
+ declare function renderQrSvg(payload: string, cellSize?: number, errorCorrection?: QrErrorCorrection, margin?: number): string;
240
+ declare function renderPaymentQrSvg(sessionId: string, cellSize?: number, errorCorrection?: QrErrorCorrection): string;
241
+ /** Branded QR SVG with centred Zippy mark — matches merchant dashboard rendering. */
242
+ declare function renderBrandedPaymentQrSvg(sessionId: string, cellSize?: number): string;
243
+ /** QR markup wrapper for the checkout UI. */
244
+ declare function renderPaymentQrMarkup(sessionId: string, cellSize?: number): string;
245
+
246
+ /** Aligned with zippy-kyc-web-sdk `src/styles/tokens.css` */
247
+ declare const DEFAULT_THEME: Required<Omit<ZippyTheme, 'mode'>> & {
248
+ mode: ZippyTheme['mode'];
249
+ primaryGradientEnd: string;
250
+ primaryHover: string;
251
+ primarySoft: string;
252
+ surfaceMuted: string;
253
+ radiusButton: string;
254
+ radiusInput: string;
255
+ radiusCard: string;
256
+ };
257
+ type ResolvedTheme = typeof DEFAULT_THEME;
258
+ declare function resolveTheme(theme?: ZippyTheme): ResolvedTheme;
259
+ declare function applyThemeToHost(host: HTMLElement, theme?: ZippyTheme): void;
260
+
261
+ declare const ZippyPay: {
262
+ create(config: ZippyPayConfig): ZippyPayCheckoutInstance;
263
+ };
264
+
265
+ export { type ApiCheckoutMethod, CheckoutController, type CheckoutMethod, type CheckoutPhase, DEFAULT_THEME, ELEMENT_TAG, type EmbedMode, PAYMENT_ID_PATTERN, POLLABLE_STATUSES, type PaymentSession, PaymentSessionClient, type PaymentSessionPayer, type PaymentSessionPhase, type PaymentSessionStatus, type ProblemJson, SessionPoller, TERMINAL_STATUSES, type VerifyPayerResponse, ZIPPY_API_BASE_URLS, ZIPPY_API_PATH_PREFIX, type ZippyEnvironment, ZippyPay, ZippyPayCheckoutElement, type ZippyPayCheckoutInstance, type ZippyPayConfig, ZippyPayError, type ZippyTheme, applyThemeToHost, attachPayerWithRetry, buildPaymentQrPayload, createCheckout, ZippyPay as default, defineZippyPayCheckoutElement, formatAmount, getCountdownTarget, getPayWindowRemainingRatio, getSoftIdleHint, isTerminalStatus, isValidPaymentId, isZippyEnvironment, msUntil, normalizePaymentId, parseZippyEnvironment, paymentIdValidationMessage, phaseFromSession, renderBrandedPaymentQrSvg, renderPaymentQrMarkup, renderPaymentQrSvg, renderQrSvg, resolveApiBaseUrl, resolveTheme, shouldShowPayProgress };
@@ -0,0 +1,265 @@
1
+ type ZippyEnvironment = 'production' | 'staging' | 'development';
2
+ /** API origin per environment. Paths such as `/api/v1/...` are appended by the SDK client. */
3
+ declare const ZIPPY_API_BASE_URLS: Record<ZippyEnvironment, string>;
4
+ declare const ZIPPY_API_PATH_PREFIX = "/api/v1";
5
+ declare function isZippyEnvironment(value: string): value is ZippyEnvironment;
6
+ declare function resolveApiBaseUrl(environment: ZippyEnvironment): string;
7
+ declare function parseZippyEnvironment(value: string): ZippyEnvironment;
8
+
9
+ type PaymentSessionStatus = 'CREATED' | 'AWAITING_PAYMENT' | 'COMPLETED' | 'EXPIRED' | 'CANCELLED' | 'FAILED';
10
+ type PaymentSessionPhase = 'IDLE' | 'PAYING';
11
+ /** Server checkout method — locks after checkout start. */
12
+ type ApiCheckoutMethod = 'QR' | 'MANUAL';
13
+ type PaymentSessionPayer = {
14
+ paymentId: string;
15
+ displayName: string;
16
+ profileImage: string | null;
17
+ };
18
+ type PaymentSession = {
19
+ sessionId: string;
20
+ amount: string;
21
+ currency: 'USD';
22
+ status: PaymentSessionStatus;
23
+ successUrl: string | null;
24
+ failureUrl: string | null;
25
+ businessName: string;
26
+ transactionId: string | null;
27
+ transactionStatus: string | null;
28
+ payer: PaymentSessionPayer | null;
29
+ /** Idle shelf — customer must start checkout before this. */
30
+ expiresAt: string;
31
+ /** Hard max — session + client token expire here. */
32
+ absoluteExpiresAt: string;
33
+ phase: PaymentSessionPhase;
34
+ checkoutMethod: ApiCheckoutMethod | null;
35
+ paymentStartAt: string | null;
36
+ /** Pay window countdown — only meaningful when phase is PAYING. */
37
+ paymentExpiryAt: string | null;
38
+ createdAt: string;
39
+ };
40
+ type VerifyPayerResponse = PaymentSessionPayer;
41
+ type ProblemJson = {
42
+ type?: string;
43
+ title?: string;
44
+ status?: number;
45
+ detail?: string;
46
+ instance?: string;
47
+ code?: string;
48
+ correlationId?: string;
49
+ errors?: Record<string, string[]>;
50
+ };
51
+
52
+ type ZippyTheme = {
53
+ primary?: string;
54
+ primaryForeground?: string;
55
+ background?: string;
56
+ surface?: string;
57
+ text?: string;
58
+ textMuted?: string;
59
+ border?: string;
60
+ error?: string;
61
+ success?: string;
62
+ borderRadius?: string;
63
+ fontFamily?: string;
64
+ mode?: 'light' | 'dark' | 'auto';
65
+ };
66
+ type EmbedMode = 'inline' | 'modal';
67
+ type ZippyPayConfig = {
68
+ environment: ZippyEnvironment;
69
+ sessionId: string;
70
+ clientToken: string;
71
+ mode?: EmbedMode;
72
+ container?: HTMLElement | string;
73
+ theme?: ZippyTheme;
74
+ locale?: 'en';
75
+ redirectOnComplete?: boolean;
76
+ redirectOnFailure?: boolean;
77
+ closeOnBackdropClick?: boolean;
78
+ closeOnEscape?: boolean;
79
+ onReady?: (session: PaymentSession) => void;
80
+ onSessionUpdate?: (session: PaymentSession) => void;
81
+ onComplete?: (session: PaymentSession) => void;
82
+ onExpired?: (session: PaymentSession) => void;
83
+ onError?: (error: ZippyPayError) => void;
84
+ onClose?: () => void;
85
+ };
86
+ type CheckoutMethod = 'qr' | 'manual';
87
+ type CheckoutPhase = 'loading' | 'choose-method' | 'qr-active' | 'manual-entry' | 'manual-confirm' | 'awaiting' | 'success' | 'expired' | 'cancelled' | 'declined' | 'failed' | 'error' | 'invalid-session';
88
+ declare const TERMINAL_STATUSES: readonly PaymentSessionStatus[];
89
+ declare const POLLABLE_STATUSES: readonly PaymentSessionStatus[];
90
+ declare class ZippyPayError extends Error {
91
+ readonly code: string;
92
+ readonly status: number;
93
+ readonly detail: string;
94
+ readonly correlationId?: string;
95
+ constructor(problem: ProblemJson);
96
+ }
97
+ type ZippyPayCheckoutInstance = {
98
+ open(): void;
99
+ close(): void;
100
+ destroy(): void;
101
+ };
102
+
103
+ type ApiClientConfig = {
104
+ baseUrl: string;
105
+ sessionId: string;
106
+ clientToken: string;
107
+ };
108
+ declare class PaymentSessionClient {
109
+ private readonly baseUrl;
110
+ private readonly sessionId;
111
+ private readonly clientToken;
112
+ constructor(config: ApiClientConfig);
113
+ getSession(): Promise<PaymentSession>;
114
+ verifyPayer(paymentId: string): Promise<VerifyPayerResponse>;
115
+ attachPayer(paymentId: string): Promise<PaymentSession>;
116
+ startCheckout(method: ApiCheckoutMethod): Promise<PaymentSession>;
117
+ startQrCheckout(): Promise<PaymentSession>;
118
+ startManualCheckout(): Promise<PaymentSession>;
119
+ private sessionPath;
120
+ private headers;
121
+ private request;
122
+ private parseError;
123
+ }
124
+ declare function attachPayerWithRetry(client: PaymentSessionClient, paymentId: string): Promise<PaymentSession>;
125
+
126
+ type PollerOptions = {
127
+ intervalMs?: number;
128
+ hiddenIntervalMs?: number;
129
+ onUpdate: (session: PaymentSession) => void;
130
+ onError?: (error: unknown) => void;
131
+ shouldPoll?: (session: PaymentSession) => boolean;
132
+ };
133
+ declare class SessionPoller {
134
+ private readonly fetchSession;
135
+ private readonly options;
136
+ private timer;
137
+ private running;
138
+ private stopped;
139
+ constructor(fetchSession: () => Promise<PaymentSession>, options: PollerOptions);
140
+ start(initialSession?: PaymentSession): void;
141
+ stop(): void;
142
+ private shouldContinue;
143
+ private intervalMs;
144
+ private scheduleNext;
145
+ private tick;
146
+ }
147
+ declare function isTerminalStatus(status: PaymentSessionStatus): boolean;
148
+ declare function phaseFromSession(status: PaymentSessionStatus): CheckoutPhase;
149
+
150
+ /** Pay countdown target — only after checkout has started. */
151
+ declare function getCountdownTarget(session: PaymentSession): string | null;
152
+ /** Whether the checkout UI should show the pay-window progress bar. */
153
+ declare function shouldShowPayProgress(session: PaymentSession | null, phase: CheckoutPhase): boolean;
154
+ /** Remaining pay-window ratio (1 = full time left, 0 = expired). */
155
+ declare function getPayWindowRemainingRatio(session: PaymentSession): number | null;
156
+ /** Idle shelf deadline — show soft hint only, not a pay countdown. */
157
+ declare function getSoftIdleHint(session: PaymentSession): string | null;
158
+ declare function msUntil(iso: string): number;
159
+
160
+ declare class CheckoutController implements ZippyPayCheckoutInstance {
161
+ private readonly config;
162
+ private readonly client;
163
+ private readonly embed;
164
+ private readonly poller;
165
+ private ui;
166
+ private session;
167
+ private paymentId;
168
+ private verifiedPayer;
169
+ private committedMethod;
170
+ private phase;
171
+ private errorMessage;
172
+ private loading;
173
+ private destroyed;
174
+ private modalOpen;
175
+ private exitMode;
176
+ private terminalFailureReason;
177
+ constructor(config: ZippyPayConfig);
178
+ open(): void;
179
+ close(): void;
180
+ destroy(): void;
181
+ private snapshotUiState;
182
+ private syncUi;
183
+ private bootstrap;
184
+ private applySession;
185
+ private resolveActivePhase;
186
+ private handleSessionUpdate;
187
+ private handleFailure;
188
+ private handleSuccess;
189
+ private executeTerminalExit;
190
+ private resolveExitMode;
191
+ private failurePhaseFromReason;
192
+ private teardownView;
193
+ private handleBootstrapError;
194
+ private handleError;
195
+ private chooseMethod;
196
+ private verify;
197
+ private attach;
198
+ private handleFlowError;
199
+ private refreshAfterConflict;
200
+ }
201
+ declare function createCheckout(config: ZippyPayConfig): ZippyPayCheckoutInstance;
202
+
203
+ declare const ELEMENT_TAG = "zippy-pay-checkout";
204
+ declare class ZippyPayCheckoutElement extends HTMLElement {
205
+ private instance;
206
+ static get observedAttributes(): string[];
207
+ connectedCallback(): void;
208
+ disconnectedCallback(): void;
209
+ attributeChangedCallback(): void;
210
+ set clientToken(value: string);
211
+ get clientToken(): string;
212
+ private mount;
213
+ private unmount;
214
+ private readConfig;
215
+ private dispatch;
216
+ open(): void;
217
+ close(): void;
218
+ destroy(): void;
219
+ }
220
+ declare function defineZippyPayCheckoutElement(): void;
221
+
222
+ declare global {
223
+ interface HTMLElementTagNameMap {
224
+ 'zippy-pay-checkout': ZippyPayCheckoutElement;
225
+ }
226
+ }
227
+
228
+ /** Personal Zippy handles: 3–20 chars, optional single dot, no leading/trailing dot. */
229
+ declare const PAYMENT_ID_PATTERN: RegExp;
230
+ declare function normalizePaymentId(value: string): string;
231
+ declare function isValidPaymentId(value: string): boolean;
232
+ declare function paymentIdValidationMessage(): string;
233
+ declare function formatAmount(amount: string, currency: string): string;
234
+
235
+ /** Deep link scanned by the Zippy app — sessionId only, never clientToken. */
236
+ declare function buildPaymentQrPayload(sessionId: string): string;
237
+ type QrErrorCorrection = 'L' | 'M' | 'Q' | 'H';
238
+ /** Renders a QR code as an SVG string for embedding in the checkout UI. */
239
+ declare function renderQrSvg(payload: string, cellSize?: number, errorCorrection?: QrErrorCorrection, margin?: number): string;
240
+ declare function renderPaymentQrSvg(sessionId: string, cellSize?: number, errorCorrection?: QrErrorCorrection): string;
241
+ /** Branded QR SVG with centred Zippy mark — matches merchant dashboard rendering. */
242
+ declare function renderBrandedPaymentQrSvg(sessionId: string, cellSize?: number): string;
243
+ /** QR markup wrapper for the checkout UI. */
244
+ declare function renderPaymentQrMarkup(sessionId: string, cellSize?: number): string;
245
+
246
+ /** Aligned with zippy-kyc-web-sdk `src/styles/tokens.css` */
247
+ declare const DEFAULT_THEME: Required<Omit<ZippyTheme, 'mode'>> & {
248
+ mode: ZippyTheme['mode'];
249
+ primaryGradientEnd: string;
250
+ primaryHover: string;
251
+ primarySoft: string;
252
+ surfaceMuted: string;
253
+ radiusButton: string;
254
+ radiusInput: string;
255
+ radiusCard: string;
256
+ };
257
+ type ResolvedTheme = typeof DEFAULT_THEME;
258
+ declare function resolveTheme(theme?: ZippyTheme): ResolvedTheme;
259
+ declare function applyThemeToHost(host: HTMLElement, theme?: ZippyTheme): void;
260
+
261
+ declare const ZippyPay: {
262
+ create(config: ZippyPayConfig): ZippyPayCheckoutInstance;
263
+ };
264
+
265
+ export { type ApiCheckoutMethod, CheckoutController, type CheckoutMethod, type CheckoutPhase, DEFAULT_THEME, ELEMENT_TAG, type EmbedMode, PAYMENT_ID_PATTERN, POLLABLE_STATUSES, type PaymentSession, PaymentSessionClient, type PaymentSessionPayer, type PaymentSessionPhase, type PaymentSessionStatus, type ProblemJson, SessionPoller, TERMINAL_STATUSES, type VerifyPayerResponse, ZIPPY_API_BASE_URLS, ZIPPY_API_PATH_PREFIX, type ZippyEnvironment, ZippyPay, ZippyPayCheckoutElement, type ZippyPayCheckoutInstance, type ZippyPayConfig, ZippyPayError, type ZippyTheme, applyThemeToHost, attachPayerWithRetry, buildPaymentQrPayload, createCheckout, ZippyPay as default, defineZippyPayCheckoutElement, formatAmount, getCountdownTarget, getPayWindowRemainingRatio, getSoftIdleHint, isTerminalStatus, isValidPaymentId, isZippyEnvironment, msUntil, normalizePaymentId, parseZippyEnvironment, paymentIdValidationMessage, phaseFromSession, renderBrandedPaymentQrSvg, renderPaymentQrMarkup, renderPaymentQrSvg, renderQrSvg, resolveApiBaseUrl, resolveTheme, shouldShowPayProgress };