@directcryptopay/sdk 0.2.3 → 0.3.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.
Files changed (127) hide show
  1. package/README.md +51 -87
  2. package/dist/core/config.d.ts +9 -46
  3. package/dist/core/iframe.d.ts +16 -0
  4. package/dist/dcp-sdk.umd.js +1 -12811
  5. package/dist/dcp.d.ts +12 -5
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +219 -2
  8. package/dist/types.d.ts +26 -164
  9. package/package.json +3 -13
  10. package/dist/ExchangeController-CPMQq6Q-.js +0 -217
  11. package/dist/HelpersUtil-DfMFC7Bf.js +0 -120
  12. package/dist/NavigationUtil-kj9LEOOd.js +0 -8
  13. package/dist/PhArrowCircleDown-lsK25DCk.js +0 -73
  14. package/dist/PhArrowClockwise-NeKHZ1co.js +0 -73
  15. package/dist/PhArrowDown-C9AkNvLs.js +0 -73
  16. package/dist/PhArrowLeft-RNfIQP1X.js +0 -73
  17. package/dist/PhArrowRight-DM1tna0G.js +0 -73
  18. package/dist/PhArrowSquareOut-S5XYbAZj.js +0 -73
  19. package/dist/PhArrowUp-DmktzOWy.js +0 -73
  20. package/dist/PhArrowUpRight-BkNeW_5i.js +0 -73
  21. package/dist/PhArrowsClockwise-CQ4pG76b.js +0 -73
  22. package/dist/PhArrowsDownUp-H6gxaNM6.js +0 -73
  23. package/dist/PhArrowsLeftRight-DZSsfMR6.js +0 -73
  24. package/dist/PhBank-4_9QzqIB.js +0 -73
  25. package/dist/PhBrowser-B-JSznId.js +0 -73
  26. package/dist/PhCaretDown-vV5oHMNi.js +0 -73
  27. package/dist/PhCaretLeft-BLo6Y_f4.js +0 -73
  28. package/dist/PhCaretRight-CqQN4TT3.js +0 -73
  29. package/dist/PhCaretUp-Df7UCAHy.js +0 -73
  30. package/dist/PhCheck-gtpfK4ed.js +0 -73
  31. package/dist/PhCircleHalf-Uq7dwDYw.js +0 -73
  32. package/dist/PhClock-SDCW-NmF.js +0 -73
  33. package/dist/PhCompass-B7hgtdx-.js +0 -73
  34. package/dist/PhCopy-BcnhyXCy.js +0 -73
  35. package/dist/PhCreditCard-BJjByVgu.js +0 -73
  36. package/dist/PhCurrencyDollar-B7ZXqXBy.js +0 -73
  37. package/dist/PhDesktop-B3VKPuJx.js +0 -73
  38. package/dist/PhDeviceMobile-Bnd0TYEH.js +0 -73
  39. package/dist/PhDotsThree-yyMWyZ-R.js +0 -73
  40. package/dist/PhEnvelope-67uzHbI9.js +0 -73
  41. package/dist/PhFunnelSimple-B-DCsloI.js +0 -73
  42. package/dist/PhGlobe-TMm_6qGk.js +0 -73
  43. package/dist/PhIdentificationCard-CePPD2xc.js +0 -73
  44. package/dist/PhImage-gY96WtHR.js +0 -73
  45. package/dist/PhInfo-DRQM_ZDP.js +0 -73
  46. package/dist/PhLightbulb-B0TxPfZ1.js +0 -73
  47. package/dist/PhMagnifyingGlass-B8si5_6W.js +0 -73
  48. package/dist/PhPaperPlaneRight-DVu5PLYd.js +0 -73
  49. package/dist/PhPlus-BfTsQnUz.js +0 -73
  50. package/dist/PhPower-CxYUGOWn.js +0 -73
  51. package/dist/PhPuzzlePiece-CQ4wh0gV.js +0 -73
  52. package/dist/PhQrCode-BuJ97NYJ.js +0 -73
  53. package/dist/PhQuestion-kJoP8Mja.js +0 -73
  54. package/dist/PhQuestionMark-C46ZkFpu.js +0 -73
  55. package/dist/PhSealCheck-Eh8jVqSN.js +0 -73
  56. package/dist/PhSignOut-jk97OSVt.js +0 -73
  57. package/dist/PhSpinner-CiYOhwMg.js +0 -73
  58. package/dist/PhTrash-pxerMqzd.js +0 -73
  59. package/dist/PhUser-BMg0VV4A.js +0 -73
  60. package/dist/PhVault-DYQvx5A-.js +0 -73
  61. package/dist/PhWarning-NLC5Mj87.js +0 -73
  62. package/dist/PhWarningCircle-Ch2jU9fA.js +0 -73
  63. package/dist/PhX-Bx4wpwm3.js +0 -73
  64. package/dist/SwapController-Cti0Cyxa.js +0 -457
  65. package/dist/ccip-CKZd2XJ7.js +0 -150
  66. package/dist/core/api.d.ts +0 -39
  67. package/dist/core/logic.d.ts +0 -2
  68. package/dist/core/wallet.d.ts +0 -55
  69. package/dist/data-capture-7D5CL385.js +0 -490
  70. package/dist/email-AmK0INbZ.js +0 -344
  71. package/dist/embedded-wallet-Pn0I_XLn.js +0 -820
  72. package/dist/features-x8XNprEe.js +0 -274
  73. package/dist/hashTypedData-B50-z0AA.js +0 -197
  74. package/dist/if-defined-CdZSZ6UL.js +0 -10
  75. package/dist/index-4ewUtPPp.js +0 -7981
  76. package/dist/index-51l86yqx.js +0 -276
  77. package/dist/index-B6K56LF_.js +0 -85
  78. package/dist/index-BAmv9PxJ.js +0 -257
  79. package/dist/index-BEswjY9r.js +0 -117
  80. package/dist/index-BSKRq56S.js +0 -355
  81. package/dist/index-BaygXQxx.js +0 -172
  82. package/dist/index-BcPxaHr5.js +0 -118
  83. package/dist/index-Bjt7nGaJ.js +0 -199
  84. package/dist/index-BkTSyAJb.js +0 -21991
  85. package/dist/index-Bmnl7l2U.js +0 -555
  86. package/dist/index-BvPvouSq.js +0 -56
  87. package/dist/index-C-6iznUO.js +0 -174
  88. package/dist/index-C1QEJL-2.js +0 -572
  89. package/dist/index-C4M5s_AM.js +0 -228
  90. package/dist/index-CEqcN8QP.js +0 -1175
  91. package/dist/index-CM3YaYca.js +0 -8189
  92. package/dist/index-CclBLA5r.js +0 -517
  93. package/dist/index-ChTxJOiF.js +0 -46
  94. package/dist/index-CmAv0Tzr.js +0 -86
  95. package/dist/index-CmvoKY4x.js +0 -125
  96. package/dist/index-D7PmdQ9B.js +0 -1750
  97. package/dist/index-D7k2Pc4e.js +0 -1083
  98. package/dist/index-D7lmgqUR.js +0 -153
  99. package/dist/index-DG_-qYze.js +0 -107
  100. package/dist/index-DHot9Fdb.js +0 -218
  101. package/dist/index-DV2LrPtU.js +0 -123
  102. package/dist/index-DYBaJQ2W.js +0 -65
  103. package/dist/index-D_8VUmn1.js +0 -41543
  104. package/dist/index-D_gLn3rT.js +0 -100
  105. package/dist/index-DqcVUSC9.js +0 -62
  106. package/dist/index-I7VDqINw.js +0 -128
  107. package/dist/index-Oz72I9VP.js +0 -209
  108. package/dist/index-UclsHkJ0.js +0 -118
  109. package/dist/index-X8zir_1j.js +0 -110
  110. package/dist/index-XvlWKGCu.js +0 -1281
  111. package/dist/index-dO97xPlt.js +0 -171
  112. package/dist/index-uBeF6OAB.js +0 -387
  113. package/dist/index-zeA_RiCV.js +0 -159
  114. package/dist/localBatchGatewayRequest-BUZHGdjw.js +0 -91
  115. package/dist/onramp-CdnBuF0r.js +0 -855
  116. package/dist/parseSignature-CcyTNGr4.js +0 -3304
  117. package/dist/pay-with-exchange-CSM6WCOV.js +0 -525
  118. package/dist/property-Bd8U3_QP.js +0 -618
  119. package/dist/receive-DooMu4Dx.js +0 -232
  120. package/dist/ref-CpgjXAw7.js +0 -107
  121. package/dist/send-3T7CyYic.js +0 -1166
  122. package/dist/socials-Dt-iHL17.js +0 -620
  123. package/dist/swaps-CjA9Es42.js +0 -1760
  124. package/dist/transactions-nRm9DVzn.js +0 -37
  125. package/dist/ui/Modal.d.ts +0 -9
  126. package/dist/ui/index.d.ts +0 -6
  127. package/dist/w3m-modal-NV25AXhM.js +0 -1706
package/README.md CHANGED
@@ -6,8 +6,8 @@ Official SDK for DirectCryptoPay — accept crypto payments directly to your wal
6
6
 
7
7
  - **Non-custodial** — Funds go directly from customer wallet to yours
8
8
  - **Multi-chain** — Ethereum, Polygon, BNB Chain, Base, Arbitrum, Optimism (mainnet + testnet)
9
- - **Shadow DOM isolation** — Payment modal won't interfere with your app's styles or state
10
- - **WalletConnect support** — MetaMask, Rabby, WalletConnect, and 300+ wallets via Reown AppKit
9
+ - **Lightweight** — ~5 KB bundle, opens checkout in an iframe overlay (like Stripe Checkout)
10
+ - **WalletConnect support** — MetaMask, Rabby, WalletConnect, and 300+ wallets
11
11
  - **Two payment modes** — Tool-based (pre-configured) or Integration-based (dynamic amounts)
12
12
  - **TypeScript-first** — Full type safety with exported types
13
13
 
@@ -25,13 +25,14 @@ yarn add @directcryptopay/sdk
25
25
 
26
26
  ### 1. Initialize the SDK
27
27
 
28
- Call `DCP.init()` once when your app loads. You need a [Reown project ID](https://cloud.reown.com) (free) for WalletConnect support.
28
+ Call `DCP.init()` once when your app loads.
29
29
 
30
30
  ```typescript
31
31
  import { DCP } from '@directcryptopay/sdk';
32
32
 
33
33
  DCP.init({
34
- projectId: 'your-reown-project-id', // Free at cloud.reown.com
34
+ // Optional: defaults to 'https://directcryptopay.com'
35
+ // checkoutUrl: 'https://preview.directcryptopay.com',
35
36
  });
36
37
  ```
37
38
 
@@ -44,7 +45,7 @@ DCP.pay({
44
45
  toolId: 'your-tool-id', // From Dashboard > Payment Tools > Get Code
45
46
  callbacks: {
46
47
  onSuccess: (data) => {
47
- console.log('Payment confirmed:', data);
48
+ console.log('Payment confirmed:', data.txHash);
48
49
  },
49
50
  onError: (error) => {
50
51
  console.error('Payment failed:', error);
@@ -75,87 +76,61 @@ Initialize the SDK. Must be called once before `pay()` or `Payment()`.
75
76
 
76
77
  ```typescript
77
78
  DCP.init({
78
- projectId: string; // Required — Reown/WalletConnect project ID
79
- apiUrl?: string; // Default: 'https://api.directcryptopay.com'
80
- defaultChainId?: number; // Default chain for wallet connection
81
- gasWarningThreshold?: number; // Gas warning % threshold (default: 15)
82
- env?: 'test' | 'prod'; // Environment hint
79
+ checkoutUrl?: string; // Default: 'https://directcryptopay.com'
80
+ projectId?: string; // Deprecated — no longer needed
81
+ env?: 'test' | 'prod';
83
82
  });
84
83
  ```
85
84
 
86
85
  ### `DCP.pay(options)`
87
86
 
88
- Open the payment modal for a pre-configured Payment Tool. The tool defines the amount, accepted tokens, and target chain.
87
+ Open the checkout iframe for a pre-configured Payment Tool.
89
88
 
90
89
  ```typescript
91
90
  DCP.pay({
92
- toolId: string; // Required — Payment Tool ID
93
- amountUsd?: number; // Override USD amount (for donations)
94
- token?: string; // Pre-select token symbol
95
- chainId?: number; // Pre-select chain
96
- metadata?: Record<string, string>; // Custom metadata
97
- callbacks?: PaymentCallbacks; // Event handlers
91
+ toolId: string; // Required — Payment Tool ID
92
+ amountUsd?: number; // Override USD amount (for donations)
93
+ callbacks?: PaymentCallbacks;
98
94
  });
99
95
  ```
100
96
 
101
97
  ### `DCP.Payment(options)`
102
98
 
103
- Open the payment modal for an Integration-based payment. Use this for dynamic amounts (carts, subscriptions, per-user pricing).
99
+ Open the checkout iframe for an Integration-based payment.
104
100
 
105
101
  ```typescript
106
102
  DCP.Payment({
107
103
  integrationId: string; // Required — Integration public ID
108
104
  amount_usd?: string; // Amount in USD (e.g., '49.99')
109
105
  amount?: string | number; // OR amount in token units (not both)
110
- currency?: string; // Pre-select token (skips selector if set)
106
+ currency?: string; // Pre-select token (skips selector)
111
107
  chainId?: number; // Pre-select chain
112
108
  metadata?: Record<string, any>; // Custom metadata
113
- callbacks?: PaymentCallbacks; // Event handlers
109
+ callbacks?: PaymentCallbacks;
114
110
  });
115
111
  ```
116
112
 
117
113
  > **Note:** Provide either `amount_usd` or `amount`, not both.
118
114
 
115
+ ### `DCP.close()`
116
+
117
+ Programmatically close the checkout iframe.
118
+
119
119
  ### Callbacks
120
120
 
121
121
  All callbacks are optional.
122
122
 
123
123
  ```typescript
124
124
  interface PaymentCallbacks {
125
- onOpen?: () => void; // Modal opened
126
- onClose?: () => void; // Modal closed
127
- onStatus?: (status: PaymentStatus) => void; // Status updates
128
- onTxSubmitted?: (txHash: string) => void; // Transaction sent to chain
129
- onSuccess?: (data: any) => void; // Payment confirmed
130
- onCancel?: () => void; // User cancelled
131
- onError?: (error: Error) => void; // Error occurred
125
+ onOpen?: () => void; // Iframe opened
126
+ onClose?: () => void; // Iframe closed
127
+ onTxSubmitted?: (txHash: string) => void; // Transaction sent
128
+ onSuccess?: (data: { txHash: string; intentId?: string }) => void; // Payment confirmed
129
+ onCancel?: () => void; // User cancelled
130
+ onError?: (error: Error) => void; // Error occurred
132
131
  }
133
132
  ```
134
133
 
135
- ### Payment Status
136
-
137
- Real-time status updates via `onStatus`:
138
-
139
- ```typescript
140
- type PaymentStatus =
141
- | { type: 'fetching_tool_data' }
142
- | { type: 'fetching_token_balances' }
143
- | { type: 'awaiting_token_selection' }
144
- | { type: 'creating_payment_intent' }
145
- | { type: 'estimating_gas' }
146
- | { type: 'gas_estimated'; estimate: GasEstimate }
147
- | { type: 'awaiting_wallet_connection' }
148
- | { type: 'wallet_connected'; address: string }
149
- | { type: 'awaiting_signature' }
150
- | { type: 'transaction_submitted'; txHash: string }
151
- | { type: 'confirming'; txHash: string; confirmations: number }
152
- | { type: 'verifying'; txHash: string; paymentId: string }
153
- | { type: 'confirmed'; txHash: string; paymentId?: string }
154
- | { type: 'failed'; error: Error }
155
- | { type: 'rejected' }
156
- | { type: 'cancelled' };
157
- ```
158
-
159
134
  ## Framework Examples
160
135
 
161
136
  ### Next.js (App Router)
@@ -167,12 +142,11 @@ type PaymentStatus =
167
142
  'use client';
168
143
 
169
144
  import { useEffect } from 'react';
170
- import { DCP } from '@directcryptopay/sdk';
171
145
 
172
146
  export function DCPProvider({ children }: { children: React.ReactNode }) {
173
147
  useEffect(() => {
174
- DCP.init({
175
- projectId: 'your-reown-project-id'
148
+ import('@directcryptopay/sdk').then(({ DCP }) => {
149
+ DCP.init({});
176
150
  });
177
151
  }, []);
178
152
 
@@ -204,7 +178,6 @@ export default function RootLayout({ children }: { children: React.ReactNode })
204
178
  'use client';
205
179
 
206
180
  import { useState } from 'react';
207
- import { DCP } from '@directcryptopay/sdk';
208
181
 
209
182
  export function PayButton({ toolId, label = 'Pay with Crypto' }: {
210
183
  toolId: string;
@@ -212,19 +185,14 @@ export function PayButton({ toolId, label = 'Pay with Crypto' }: {
212
185
  }) {
213
186
  const [status, setStatus] = useState<string | null>(null);
214
187
 
215
- const handlePay = () => {
188
+ const handlePay = async () => {
216
189
  setStatus('pending');
190
+ const { DCP } = await import('@directcryptopay/sdk');
217
191
  DCP.pay({
218
192
  toolId,
219
193
  callbacks: {
220
- onSuccess: (data) => {
221
- setStatus('confirmed');
222
- console.log('Payment confirmed:', data);
223
- },
224
- onError: (error) => {
225
- setStatus('failed');
226
- console.error('Payment failed:', error);
227
- },
194
+ onSuccess: () => setStatus('confirmed'),
195
+ onError: () => setStatus('failed'),
228
196
  onClose: () => setStatus(null),
229
197
  }
230
198
  });
@@ -245,7 +213,7 @@ export function PayButton({ toolId, label = 'Pay with Crypto' }: {
245
213
  <script type="module">
246
214
  import { DCP } from 'https://unpkg.com/@directcryptopay/sdk/dist/index.js';
247
215
 
248
- DCP.init({ projectId: 'your-reown-project-id' });
216
+ DCP.init({});
249
217
 
250
218
  document.getElementById('pay-btn').addEventListener('click', () => {
251
219
  DCP.pay({
@@ -259,35 +227,32 @@ export function PayButton({ toolId, label = 'Pay with Crypto' }: {
259
227
  </script>
260
228
  ```
261
229
 
262
- ## Supported Networks
263
-
264
- | Network | Chain ID | Type |
265
- |---------|----------|------|
266
- | Ethereum | 1 | Mainnet |
267
- | Polygon | 137 | Mainnet |
268
- | BNB Chain | 56 | Mainnet |
269
- | Base | 8453 | Mainnet |
270
- | Arbitrum One | 42161 | Mainnet |
271
- | Optimism | 10 | Mainnet |
272
- | Sepolia | 11155111 | Testnet |
273
- | Polygon Amoy | 80002 | Testnet |
274
- | BNB Testnet | 97 | Testnet |
275
- | Base Sepolia | 84532 | Testnet |
276
- | Arbitrum Sepolia | 421614 | Testnet |
277
- | Optimism Sepolia | 11155420 | Testnet |
230
+ ## How It Works
231
+
232
+ When `DCP.pay()` or `DCP.Payment()` is called, the SDK opens an iframe overlay pointing to the DirectCryptoPay checkout page. The checkout page handles:
233
+
234
+ 1. Wallet connection (MetaMask, Rabby, WalletConnect, etc.)
235
+ 2. Smart token detection and balance display
236
+ 3. Network switching
237
+ 4. Transaction signing and submission
238
+ 5. On-chain verification
239
+
240
+ The SDK communicates with the iframe via `postMessage` and maps events to your callbacks. This architecture keeps the SDK lightweight (~5 KB) while providing the full checkout experience.
278
241
 
279
242
  ## Security
280
243
 
281
- The frontend callbacks (`onSuccess`, `onError`) are for **UX purposes only** — updating your UI when a payment completes. For production apps, always verify payments server-side using [webhooks](https://docs.directcryptopay.com).
244
+ The frontend callbacks (`onSuccess`, `onError`) are for **UX purposes only**. For production apps, always verify payments server-side using [webhooks](https://docs.directcryptopay.com).
282
245
 
283
246
  DirectCryptoPay is non-custodial: transactions go directly from the customer's wallet to your wallet address. No funds are held by DirectCryptoPay at any point.
284
247
 
285
- ## Testing
248
+ ## Migrating from v0.2.x
286
249
 
287
- Both testnet and mainnet are available on every account from day one. Test with:
250
+ v0.3.0 is a major refactor. The public API is the same, but:
288
251
 
289
- - **Sepolia ETH:** [sepoliafaucet.com](https://sepoliafaucet.com)
290
- - **Sepolia USDC:** [faucet.circle.com](https://faucet.circle.com)
252
+ - `DCP.init({ projectId })` — `projectId` is no longer required (can be omitted)
253
+ - `DCP.init({ checkoutUrl })` — new option to customize checkout URL
254
+ - `onStatus` callback removed — use `onTxSubmitted` and `onSuccess` instead
255
+ - Bundle size reduced from ~3 MB to ~5 KB
291
256
 
292
257
  ## Links
293
258
 
@@ -295,7 +260,6 @@ Both testnet and mainnet are available on every account from day one. Test with:
295
260
  - **Dashboard:** [directcryptopay.com/dashboard](https://directcryptopay.com/dashboard)
296
261
  - **Documentation:** [docs.directcryptopay.com](https://docs.directcryptopay.com)
297
262
  - **API Docs:** [api.directcryptopay.com/api/docs](https://api.directcryptopay.com/api/docs)
298
- - **Discord:** [discord.com/invite/PPdJNkXh](https://discord.com/invite/PPdJNkXh)
299
263
  - **GitHub:** [github.com/directcryptopay](https://github.com/directcryptopay)
300
264
 
301
265
  ## License
@@ -1,59 +1,22 @@
1
- export interface NetworkConfig {
2
- chainId: number;
3
- name: string;
4
- currency: string;
5
- isTestnet: boolean;
6
- rpcUrl: string;
7
- explorerUrl: string;
8
- }
9
1
  export interface DCPInitConfig {
2
+ /** Checkout page base URL. Default: 'https://directcryptopay.com' */
3
+ checkoutUrl?: string;
4
+ /** @deprecated No longer needed — wallet connection happens inside iframe */
5
+ projectId?: string;
6
+ /** @deprecated Use checkoutUrl instead */
10
7
  apiUrl?: string;
8
+ /** @deprecated Use checkoutUrl instead */
11
9
  widgetUrl?: string;
12
- projectId: string;
13
10
  env?: 'test' | 'prod';
14
- defaultChainId?: number;
15
- gasWarningThreshold?: number;
16
11
  }
17
- export interface DCPConfig extends DCPInitConfig {
18
- apiUrl: string;
19
- widgetUrl: string;
20
- gasWarningThreshold: number;
12
+ export interface DCPConfig {
13
+ checkoutUrl: string;
21
14
  }
22
15
  declare class Config {
23
16
  private config;
24
- init(config: DCPInitConfig): void;
17
+ init(userConfig: DCPInitConfig): void;
25
18
  get(): DCPConfig;
26
19
  isInitialized(): boolean;
27
20
  }
28
21
  export declare const config: Config;
29
- export declare const NETWORKS: Record<number, NetworkConfig>;
30
- export declare function getNetwork(chainId: number): NetworkConfig;
31
- export declare const ERC20_ABI: readonly [{
32
- readonly constant: false;
33
- readonly inputs: readonly [{
34
- readonly name: "_to";
35
- readonly type: "address";
36
- }, {
37
- readonly name: "_value";
38
- readonly type: "uint256";
39
- }];
40
- readonly name: "transfer";
41
- readonly outputs: readonly [{
42
- readonly name: "";
43
- readonly type: "bool";
44
- }];
45
- readonly type: "function";
46
- }, {
47
- readonly constant: true;
48
- readonly inputs: readonly [{
49
- readonly name: "_owner";
50
- readonly type: "address";
51
- }];
52
- readonly name: "balanceOf";
53
- readonly outputs: readonly [{
54
- readonly name: "balance";
55
- readonly type: "uint256";
56
- }];
57
- readonly type: "function";
58
- }];
59
22
  export {};
@@ -0,0 +1,16 @@
1
+ export interface IframeCallbacks {
2
+ onReady?: () => void;
3
+ onTxSubmitted?: (txHash: string) => void;
4
+ onSuccess?: (data: {
5
+ txHash: string;
6
+ intentId?: string;
7
+ }) => void;
8
+ onError?: (error: string) => void;
9
+ onClose?: () => void;
10
+ onCancel?: () => void;
11
+ }
12
+ /**
13
+ * Opens the DirectCryptoPay checkout page in an iframe overlay.
14
+ * Returns a cleanup function to programmatically close the overlay.
15
+ */
16
+ export declare function openCheckoutIframe(url: string, callbacks?: IframeCallbacks): () => void;