@moneydevkit/nextjs 0.1.23 → 0.2.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 (124) hide show
  1. package/dist/components/Checkout.d.ts +6 -4
  2. package/dist/components/Checkout.js +134 -2
  3. package/dist/components/Checkout.js.map +1 -1
  4. package/dist/components/checkout/ExpiredCheckout.d.ts +11 -0
  5. package/dist/components/checkout/ExpiredCheckout.js +25 -0
  6. package/dist/components/checkout/ExpiredCheckout.js.map +1 -0
  7. package/dist/components/checkout/PaymentReceivedCheckout.d.ts +6 -0
  8. package/dist/components/checkout/PaymentReceivedCheckout.js +22 -0
  9. package/dist/components/checkout/PaymentReceivedCheckout.js.map +1 -0
  10. package/dist/components/checkout/PendingPaymentCheckout.d.ts +9 -0
  11. package/dist/components/checkout/PendingPaymentCheckout.js +63 -0
  12. package/dist/components/checkout/PendingPaymentCheckout.js.map +1 -0
  13. package/dist/components/checkout/UnconfirmedCheckout.d.ts +9 -0
  14. package/dist/components/checkout/UnconfirmedCheckout.js +54 -0
  15. package/dist/components/checkout/UnconfirmedCheckout.js.map +1 -0
  16. package/dist/components/ui/button.d.ts +10 -0
  17. package/dist/components/ui/button.js +32 -0
  18. package/dist/components/ui/button.js.map +1 -0
  19. package/dist/components/ui/card.d.ts +9 -0
  20. package/dist/components/ui/card.js +25 -0
  21. package/dist/components/ui/card.js.map +1 -0
  22. package/dist/components/ui/collapsible.d.ts +5 -0
  23. package/dist/components/ui/collapsible.js +14 -0
  24. package/dist/components/ui/collapsible.js.map +1 -0
  25. package/dist/components/ui/dialog.d.ts +15 -0
  26. package/dist/components/ui/dialog.js +37 -0
  27. package/dist/components/ui/dialog.js.map +1 -0
  28. package/dist/components/ui/drawer.d.ts +13 -0
  29. package/dist/components/ui/drawer.js +36 -0
  30. package/dist/components/ui/drawer.js.map +1 -0
  31. package/dist/components/ui/form.d.ts +24 -0
  32. package/dist/components/ui/form.js +60 -0
  33. package/dist/components/ui/form.js.map +1 -0
  34. package/dist/components/ui/input.d.ts +3 -0
  35. package/dist/components/ui/input.js +7 -0
  36. package/dist/components/ui/input.js.map +1 -0
  37. package/dist/components/ui/label.d.ts +4 -0
  38. package/dist/components/ui/label.js +9 -0
  39. package/dist/components/ui/label.js.map +1 -0
  40. package/dist/components/ui/select.d.ts +15 -0
  41. package/dist/components/ui/select.js +39 -0
  42. package/dist/components/ui/select.js.map +1 -0
  43. package/dist/components/ui/textarea.d.ts +3 -0
  44. package/dist/components/ui/textarea.js +7 -0
  45. package/dist/components/ui/textarea.js.map +1 -0
  46. package/dist/constants.d.ts +1 -0
  47. package/dist/constants.js +2 -0
  48. package/dist/constants.js.map +1 -0
  49. package/dist/hooks/useCheckout.d.ts +5 -1
  50. package/dist/hooks/useCheckout.js +25 -1
  51. package/dist/hooks/useCheckout.js.map +1 -1
  52. package/dist/hooks/useCheckoutSuccess.d.ts +5 -1
  53. package/dist/hooks/useCheckoutSuccess.js +63 -1
  54. package/dist/hooks/useCheckoutSuccess.js.map +1 -1
  55. package/dist/index.d.ts +2 -0
  56. package/dist/index.js +1 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/lib/utils.d.ts +2 -0
  59. package/dist/lib/utils.js +6 -0
  60. package/dist/lib/utils.js.map +1 -0
  61. package/dist/providers.d.ts +7 -0
  62. package/dist/providers.js +17 -0
  63. package/dist/providers.js.map +1 -0
  64. package/dist/server/actions.d.ts +2510 -0
  65. package/dist/server/actions.js +78 -0
  66. package/dist/server/actions.js.map +1 -0
  67. package/dist/server/handlers/balance.d.ts +1 -0
  68. package/dist/server/handlers/balance.js +19 -0
  69. package/dist/server/handlers/balance.js.map +1 -0
  70. package/dist/server/handlers/list_channels.d.ts +1 -0
  71. package/dist/server/handlers/list_channels.js +15 -0
  72. package/dist/server/handlers/list_channels.js.map +1 -0
  73. package/dist/server/handlers/pay_bolt_11.d.ts +1 -0
  74. package/dist/server/handlers/pay_bolt_11.js +19 -0
  75. package/dist/server/handlers/pay_bolt_11.js.map +1 -0
  76. package/dist/server/handlers/pay_bolt_12.d.ts +1 -0
  77. package/dist/server/handlers/pay_bolt_12.js +25 -0
  78. package/dist/server/handlers/pay_bolt_12.js.map +1 -0
  79. package/dist/server/handlers/pay_ln_url.d.ts +1 -0
  80. package/dist/server/handlers/pay_ln_url.js +25 -0
  81. package/dist/server/handlers/pay_ln_url.js.map +1 -0
  82. package/dist/server/handlers/ping.d.ts +1 -0
  83. package/dist/server/handlers/ping.js +13 -0
  84. package/dist/server/handlers/ping.js.map +1 -0
  85. package/dist/server/handlers/webhooks.d.ts +1 -0
  86. package/dist/server/handlers/webhooks.js +46 -0
  87. package/dist/server/handlers/webhooks.js.map +1 -0
  88. package/dist/server/index.d.ts +2501 -0
  89. package/dist/server/index.js +15 -0
  90. package/dist/server/index.js.map +1 -0
  91. package/dist/server/lightning-logs.d.ts +5 -0
  92. package/dist/server/lightning-logs.js +170 -0
  93. package/dist/server/lightning-logs.js.map +1 -0
  94. package/dist/server/lightning-node.d.ts +42 -0
  95. package/dist/server/lightning-node.js +141 -0
  96. package/dist/server/lightning-node.js.map +1 -0
  97. package/dist/server/logging.d.ts +3 -0
  98. package/dist/server/logging.js +17 -0
  99. package/dist/server/logging.js.map +1 -0
  100. package/dist/server/mdk-client.d.ts +3341 -0
  101. package/dist/server/mdk-client.js +39 -0
  102. package/dist/server/mdk-client.js.map +1 -0
  103. package/dist/server/mdk-config.d.ts +18 -0
  104. package/dist/server/mdk-config.js +19 -0
  105. package/dist/server/mdk-config.js.map +1 -0
  106. package/dist/server/mdk.d.ts +6 -0
  107. package/dist/server/mdk.js +69 -0
  108. package/dist/server/mdk.js.map +1 -0
  109. package/dist/server/money-dev-kit.d.ts +11 -0
  110. package/dist/server/money-dev-kit.js +3 -0
  111. package/dist/server/money-dev-kit.js.map +1 -0
  112. package/dist/server/payment-state.d.ts +3 -0
  113. package/dist/server/payment-state.js +32 -0
  114. package/dist/server/payment-state.js.map +1 -0
  115. package/dist/server/route.d.ts +8 -1
  116. package/dist/server/route.js +103 -1
  117. package/dist/server/route.js.map +1 -1
  118. package/dist/server/runtime.d.ts +3 -0
  119. package/dist/server/runtime.js +4 -0
  120. package/dist/server/runtime.js.map +1 -0
  121. package/dist/server/undici-dispatcher.d.ts +4 -0
  122. package/dist/server/undici-dispatcher.js +13 -0
  123. package/dist/server/undici-dispatcher.js.map +1 -0
  124. package/package.json +17 -4
@@ -0,0 +1,2510 @@
1
+ import type { ConfirmCheckout } from '@moneydevkit/api-contract';
2
+ export declare function getCheckout(checkoutId: string): Promise<{
3
+ currency: string;
4
+ type: "PRODUCTS";
5
+ status: "UNCONFIRMED";
6
+ products: [{
7
+ id: string;
8
+ name: string;
9
+ description: string | null;
10
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
11
+ prices: {
12
+ priceAmount: number | null;
13
+ id: string;
14
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
15
+ minimumAmount: number | null;
16
+ maximumAmount: number | null;
17
+ presetAmount: number | null;
18
+ unitAmount: number | null;
19
+ capAmount: number | null;
20
+ meterId: string | null;
21
+ }[];
22
+ }, ...{
23
+ id: string;
24
+ name: string;
25
+ description: string | null;
26
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
27
+ prices: {
28
+ priceAmount: number | null;
29
+ id: string;
30
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
31
+ minimumAmount: number | null;
32
+ maximumAmount: number | null;
33
+ presetAmount: number | null;
34
+ unitAmount: number | null;
35
+ capAmount: number | null;
36
+ meterId: string | null;
37
+ }[];
38
+ }[]];
39
+ successUrl: string | null;
40
+ allowDiscountCodes: boolean;
41
+ customerName: string | null;
42
+ customerEmail: string | null;
43
+ customerIpAddress: string | null;
44
+ customerExternalId: string | null;
45
+ requireCustomerFields: {
46
+ customerName?: boolean | undefined;
47
+ customerEmail?: boolean | undefined;
48
+ } | null;
49
+ invoice: {
50
+ currency: string;
51
+ invoice: string;
52
+ paymentHash: string;
53
+ amountSats: number | null;
54
+ expiresAt: Date;
55
+ btcPrice: number | null;
56
+ amountSatsReceived: number | null;
57
+ fiatAmount: number | null;
58
+ } | null;
59
+ id: string;
60
+ createdAt: Date;
61
+ clientSecret: string;
62
+ organizationId: string;
63
+ expiresAt: Date;
64
+ userMetadata: Record<string, any> | null;
65
+ customFieldData: Record<string, any> | null;
66
+ customerMetadata: Record<string, any> | null;
67
+ customerId: string | null;
68
+ customerBillingAddress: Record<string, any> | null;
69
+ providedAmount: number | null;
70
+ totalAmount: number | null;
71
+ discountAmount: number | null;
72
+ netAmount: number | null;
73
+ taxAmount: number | null;
74
+ invoiceAmountSats: number | null;
75
+ invoiceScid: string | null;
76
+ btcPrice: number | null;
77
+ } | {
78
+ currency: string;
79
+ type: "AMOUNT";
80
+ status: "UNCONFIRMED";
81
+ products: {
82
+ id: string;
83
+ name: string;
84
+ description: string | null;
85
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
86
+ prices: {
87
+ priceAmount: number | null;
88
+ id: string;
89
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
90
+ minimumAmount: number | null;
91
+ maximumAmount: number | null;
92
+ presetAmount: number | null;
93
+ unitAmount: number | null;
94
+ capAmount: number | null;
95
+ meterId: string | null;
96
+ }[];
97
+ }[] | null;
98
+ successUrl: string | null;
99
+ allowDiscountCodes: boolean;
100
+ customerName: string | null;
101
+ customerEmail: string | null;
102
+ customerIpAddress: string | null;
103
+ customerExternalId: string | null;
104
+ requireCustomerFields: {
105
+ customerName?: boolean | undefined;
106
+ customerEmail?: boolean | undefined;
107
+ } | null;
108
+ invoice: {
109
+ currency: string;
110
+ invoice: string;
111
+ paymentHash: string;
112
+ amountSats: number | null;
113
+ expiresAt: Date;
114
+ btcPrice: number | null;
115
+ amountSatsReceived: number | null;
116
+ fiatAmount: number | null;
117
+ } | null;
118
+ id: string;
119
+ createdAt: Date;
120
+ clientSecret: string;
121
+ organizationId: string;
122
+ expiresAt: Date;
123
+ userMetadata: Record<string, any> | null;
124
+ customFieldData: Record<string, any> | null;
125
+ customerMetadata: Record<string, any> | null;
126
+ customerId: string | null;
127
+ customerBillingAddress: Record<string, any> | null;
128
+ providedAmount: number;
129
+ totalAmount: number | null;
130
+ discountAmount: number | null;
131
+ netAmount: number | null;
132
+ taxAmount: number | null;
133
+ invoiceAmountSats: number | null;
134
+ invoiceScid: string | null;
135
+ btcPrice: number | null;
136
+ } | {
137
+ currency: string;
138
+ type: "TOP_UP";
139
+ status: "UNCONFIRMED";
140
+ products: {
141
+ id: string;
142
+ name: string;
143
+ description: string | null;
144
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
145
+ prices: {
146
+ priceAmount: number | null;
147
+ id: string;
148
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
149
+ minimumAmount: number | null;
150
+ maximumAmount: number | null;
151
+ presetAmount: number | null;
152
+ unitAmount: number | null;
153
+ capAmount: number | null;
154
+ meterId: string | null;
155
+ }[];
156
+ }[] | null;
157
+ successUrl: string | null;
158
+ allowDiscountCodes: boolean;
159
+ customerName: string | null;
160
+ customerEmail: string | null;
161
+ customerIpAddress: string | null;
162
+ customerExternalId: string | null;
163
+ requireCustomerFields: {
164
+ customerName?: boolean | undefined;
165
+ customerEmail?: boolean | undefined;
166
+ } | null;
167
+ invoice: {
168
+ currency: string;
169
+ invoice: string;
170
+ paymentHash: string;
171
+ amountSats: number | null;
172
+ expiresAt: Date;
173
+ btcPrice: number | null;
174
+ amountSatsReceived: number | null;
175
+ fiatAmount: number | null;
176
+ } | null;
177
+ id: string;
178
+ createdAt: Date;
179
+ clientSecret: string;
180
+ organizationId: string;
181
+ expiresAt: Date;
182
+ userMetadata: Record<string, any> | null;
183
+ customFieldData: Record<string, any> | null;
184
+ customerMetadata: Record<string, any> | null;
185
+ customerId: string | null;
186
+ customerBillingAddress: Record<string, any> | null;
187
+ providedAmount: number | null;
188
+ totalAmount: number | null;
189
+ discountAmount: number | null;
190
+ netAmount: number | null;
191
+ taxAmount: number | null;
192
+ invoiceAmountSats: number | null;
193
+ invoiceScid: string | null;
194
+ btcPrice: number | null;
195
+ } | {
196
+ currency: string;
197
+ type: "PRODUCTS";
198
+ status: "CONFIRMED";
199
+ products: [{
200
+ id: string;
201
+ name: string;
202
+ description: string | null;
203
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
204
+ prices: {
205
+ priceAmount: number | null;
206
+ id: string;
207
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
208
+ minimumAmount: number | null;
209
+ maximumAmount: number | null;
210
+ presetAmount: number | null;
211
+ unitAmount: number | null;
212
+ capAmount: number | null;
213
+ meterId: string | null;
214
+ }[];
215
+ }, ...{
216
+ id: string;
217
+ name: string;
218
+ description: string | null;
219
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
220
+ prices: {
221
+ priceAmount: number | null;
222
+ id: string;
223
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
224
+ minimumAmount: number | null;
225
+ maximumAmount: number | null;
226
+ presetAmount: number | null;
227
+ unitAmount: number | null;
228
+ capAmount: number | null;
229
+ meterId: string | null;
230
+ }[];
231
+ }[]];
232
+ successUrl: string | null;
233
+ allowDiscountCodes: boolean;
234
+ customerName: string | null;
235
+ customerEmail: string | null;
236
+ customerIpAddress: string | null;
237
+ customerExternalId: string | null;
238
+ requireCustomerFields: {
239
+ customerName?: boolean | undefined;
240
+ customerEmail?: boolean | undefined;
241
+ } | null;
242
+ invoice: {
243
+ currency: string;
244
+ invoice: string;
245
+ paymentHash: string;
246
+ amountSats: number | null;
247
+ expiresAt: Date;
248
+ btcPrice: number | null;
249
+ amountSatsReceived: number | null;
250
+ fiatAmount: number | null;
251
+ } | null;
252
+ id: string;
253
+ createdAt: Date;
254
+ clientSecret: string;
255
+ organizationId: string;
256
+ expiresAt: Date;
257
+ userMetadata: Record<string, any> | null;
258
+ customFieldData: Record<string, any> | null;
259
+ customerMetadata: Record<string, any> | null;
260
+ customerId: string | null;
261
+ customerBillingAddress: Record<string, any> | null;
262
+ providedAmount: number | null;
263
+ totalAmount: number;
264
+ discountAmount: number;
265
+ netAmount: number;
266
+ taxAmount: number;
267
+ invoiceAmountSats: number;
268
+ invoiceScid: string | null;
269
+ btcPrice: number;
270
+ } | {
271
+ currency: string;
272
+ type: "AMOUNT";
273
+ status: "CONFIRMED";
274
+ products: {
275
+ id: string;
276
+ name: string;
277
+ description: string | null;
278
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
279
+ prices: {
280
+ priceAmount: number | null;
281
+ id: string;
282
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
283
+ minimumAmount: number | null;
284
+ maximumAmount: number | null;
285
+ presetAmount: number | null;
286
+ unitAmount: number | null;
287
+ capAmount: number | null;
288
+ meterId: string | null;
289
+ }[];
290
+ }[] | null;
291
+ successUrl: string | null;
292
+ allowDiscountCodes: boolean;
293
+ customerName: string | null;
294
+ customerEmail: string | null;
295
+ customerIpAddress: string | null;
296
+ customerExternalId: string | null;
297
+ requireCustomerFields: {
298
+ customerName?: boolean | undefined;
299
+ customerEmail?: boolean | undefined;
300
+ } | null;
301
+ invoice: {
302
+ currency: string;
303
+ invoice: string;
304
+ paymentHash: string;
305
+ amountSats: number | null;
306
+ expiresAt: Date;
307
+ btcPrice: number | null;
308
+ amountSatsReceived: number | null;
309
+ fiatAmount: number | null;
310
+ } | null;
311
+ id: string;
312
+ createdAt: Date;
313
+ clientSecret: string;
314
+ organizationId: string;
315
+ expiresAt: Date;
316
+ userMetadata: Record<string, any> | null;
317
+ customFieldData: Record<string, any> | null;
318
+ customerMetadata: Record<string, any> | null;
319
+ customerId: string | null;
320
+ customerBillingAddress: Record<string, any> | null;
321
+ providedAmount: number;
322
+ totalAmount: number;
323
+ discountAmount: number;
324
+ netAmount: number;
325
+ taxAmount: number;
326
+ invoiceAmountSats: number;
327
+ invoiceScid: string | null;
328
+ btcPrice: number;
329
+ } | {
330
+ currency: string;
331
+ type: "TOP_UP";
332
+ status: "CONFIRMED";
333
+ products: {
334
+ id: string;
335
+ name: string;
336
+ description: string | null;
337
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
338
+ prices: {
339
+ priceAmount: number | null;
340
+ id: string;
341
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
342
+ minimumAmount: number | null;
343
+ maximumAmount: number | null;
344
+ presetAmount: number | null;
345
+ unitAmount: number | null;
346
+ capAmount: number | null;
347
+ meterId: string | null;
348
+ }[];
349
+ }[] | null;
350
+ successUrl: string | null;
351
+ allowDiscountCodes: boolean;
352
+ customerName: string | null;
353
+ customerEmail: string | null;
354
+ customerIpAddress: string | null;
355
+ customerExternalId: string | null;
356
+ requireCustomerFields: {
357
+ customerName?: boolean | undefined;
358
+ customerEmail?: boolean | undefined;
359
+ } | null;
360
+ invoice: {
361
+ currency: string;
362
+ invoice: string;
363
+ paymentHash: string;
364
+ amountSats: number | null;
365
+ expiresAt: Date;
366
+ btcPrice: number | null;
367
+ amountSatsReceived: number | null;
368
+ fiatAmount: number | null;
369
+ } | null;
370
+ id: string;
371
+ createdAt: Date;
372
+ clientSecret: string;
373
+ organizationId: string;
374
+ expiresAt: Date;
375
+ userMetadata: Record<string, any> | null;
376
+ customFieldData: Record<string, any> | null;
377
+ customerMetadata: Record<string, any> | null;
378
+ customerId: string | null;
379
+ customerBillingAddress: Record<string, any> | null;
380
+ providedAmount: number | null;
381
+ totalAmount: number | null;
382
+ discountAmount: number | null;
383
+ netAmount: number | null;
384
+ taxAmount: number | null;
385
+ invoiceAmountSats: number | null;
386
+ invoiceScid: string | null;
387
+ btcPrice: number | null;
388
+ } | {
389
+ currency: string;
390
+ type: "PRODUCTS";
391
+ status: "PENDING_PAYMENT";
392
+ products: [{
393
+ id: string;
394
+ name: string;
395
+ description: string | null;
396
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
397
+ prices: {
398
+ priceAmount: number | null;
399
+ id: string;
400
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
401
+ minimumAmount: number | null;
402
+ maximumAmount: number | null;
403
+ presetAmount: number | null;
404
+ unitAmount: number | null;
405
+ capAmount: number | null;
406
+ meterId: string | null;
407
+ }[];
408
+ }, ...{
409
+ id: string;
410
+ name: string;
411
+ description: string | null;
412
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
413
+ prices: {
414
+ priceAmount: number | null;
415
+ id: string;
416
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
417
+ minimumAmount: number | null;
418
+ maximumAmount: number | null;
419
+ presetAmount: number | null;
420
+ unitAmount: number | null;
421
+ capAmount: number | null;
422
+ meterId: string | null;
423
+ }[];
424
+ }[]];
425
+ successUrl: string | null;
426
+ allowDiscountCodes: boolean;
427
+ customerName: string | null;
428
+ customerEmail: string | null;
429
+ customerIpAddress: string | null;
430
+ customerExternalId: string | null;
431
+ requireCustomerFields: {
432
+ customerName?: boolean | undefined;
433
+ customerEmail?: boolean | undefined;
434
+ } | null;
435
+ invoice: {
436
+ currency: string;
437
+ invoice: string;
438
+ paymentHash: string;
439
+ amountSats: number;
440
+ expiresAt: Date;
441
+ btcPrice: number;
442
+ amountSatsReceived: number | null;
443
+ fiatAmount: number;
444
+ };
445
+ id: string;
446
+ createdAt: Date;
447
+ clientSecret: string;
448
+ organizationId: string;
449
+ expiresAt: Date;
450
+ userMetadata: Record<string, any> | null;
451
+ customFieldData: Record<string, any> | null;
452
+ customerMetadata: Record<string, any> | null;
453
+ customerId: string | null;
454
+ customerBillingAddress: Record<string, any> | null;
455
+ providedAmount: number | null;
456
+ totalAmount: number;
457
+ discountAmount: number;
458
+ netAmount: number;
459
+ taxAmount: number;
460
+ invoiceAmountSats: number;
461
+ invoiceScid: string | null;
462
+ btcPrice: number;
463
+ } | {
464
+ currency: string;
465
+ type: "AMOUNT";
466
+ status: "PENDING_PAYMENT";
467
+ products: {
468
+ id: string;
469
+ name: string;
470
+ description: string | null;
471
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
472
+ prices: {
473
+ priceAmount: number | null;
474
+ id: string;
475
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
476
+ minimumAmount: number | null;
477
+ maximumAmount: number | null;
478
+ presetAmount: number | null;
479
+ unitAmount: number | null;
480
+ capAmount: number | null;
481
+ meterId: string | null;
482
+ }[];
483
+ }[] | null;
484
+ successUrl: string | null;
485
+ allowDiscountCodes: boolean;
486
+ customerName: string | null;
487
+ customerEmail: string | null;
488
+ customerIpAddress: string | null;
489
+ customerExternalId: string | null;
490
+ requireCustomerFields: {
491
+ customerName?: boolean | undefined;
492
+ customerEmail?: boolean | undefined;
493
+ } | null;
494
+ invoice: {
495
+ currency: string;
496
+ invoice: string;
497
+ paymentHash: string;
498
+ amountSats: number;
499
+ expiresAt: Date;
500
+ btcPrice: number;
501
+ amountSatsReceived: number | null;
502
+ fiatAmount: number;
503
+ };
504
+ id: string;
505
+ createdAt: Date;
506
+ clientSecret: string;
507
+ organizationId: string;
508
+ expiresAt: Date;
509
+ userMetadata: Record<string, any> | null;
510
+ customFieldData: Record<string, any> | null;
511
+ customerMetadata: Record<string, any> | null;
512
+ customerId: string | null;
513
+ customerBillingAddress: Record<string, any> | null;
514
+ providedAmount: number;
515
+ totalAmount: number;
516
+ discountAmount: number;
517
+ netAmount: number;
518
+ taxAmount: number;
519
+ invoiceAmountSats: number;
520
+ invoiceScid: string | null;
521
+ btcPrice: number;
522
+ } | {
523
+ currency: string;
524
+ type: "TOP_UP";
525
+ status: "PENDING_PAYMENT";
526
+ products: {
527
+ id: string;
528
+ name: string;
529
+ description: string | null;
530
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
531
+ prices: {
532
+ priceAmount: number | null;
533
+ id: string;
534
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
535
+ minimumAmount: number | null;
536
+ maximumAmount: number | null;
537
+ presetAmount: number | null;
538
+ unitAmount: number | null;
539
+ capAmount: number | null;
540
+ meterId: string | null;
541
+ }[];
542
+ }[] | null;
543
+ successUrl: string | null;
544
+ allowDiscountCodes: boolean;
545
+ customerName: string | null;
546
+ customerEmail: string | null;
547
+ customerIpAddress: string | null;
548
+ customerExternalId: string | null;
549
+ requireCustomerFields: {
550
+ customerName?: boolean | undefined;
551
+ customerEmail?: boolean | undefined;
552
+ } | null;
553
+ invoice: {
554
+ currency: string;
555
+ invoice: string;
556
+ paymentHash: string;
557
+ amountSats: number | null;
558
+ expiresAt: Date;
559
+ btcPrice: number | null;
560
+ amountSatsReceived: number | null;
561
+ fiatAmount: number | null;
562
+ };
563
+ id: string;
564
+ createdAt: Date;
565
+ clientSecret: string;
566
+ organizationId: string;
567
+ expiresAt: Date;
568
+ userMetadata: Record<string, any> | null;
569
+ customFieldData: Record<string, any> | null;
570
+ customerMetadata: Record<string, any> | null;
571
+ customerId: string | null;
572
+ customerBillingAddress: Record<string, any> | null;
573
+ providedAmount: number | null;
574
+ totalAmount: number | null;
575
+ discountAmount: number | null;
576
+ netAmount: number | null;
577
+ taxAmount: number | null;
578
+ invoiceAmountSats: number | null;
579
+ invoiceScid: string | null;
580
+ btcPrice: number | null;
581
+ } | {
582
+ currency: string;
583
+ type: "PRODUCTS";
584
+ status: "PAYMENT_RECEIVED";
585
+ products: [{
586
+ id: string;
587
+ name: string;
588
+ description: string | null;
589
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
590
+ prices: {
591
+ priceAmount: number | null;
592
+ id: string;
593
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
594
+ minimumAmount: number | null;
595
+ maximumAmount: number | null;
596
+ presetAmount: number | null;
597
+ unitAmount: number | null;
598
+ capAmount: number | null;
599
+ meterId: string | null;
600
+ }[];
601
+ }, ...{
602
+ id: string;
603
+ name: string;
604
+ description: string | null;
605
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
606
+ prices: {
607
+ priceAmount: number | null;
608
+ id: string;
609
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
610
+ minimumAmount: number | null;
611
+ maximumAmount: number | null;
612
+ presetAmount: number | null;
613
+ unitAmount: number | null;
614
+ capAmount: number | null;
615
+ meterId: string | null;
616
+ }[];
617
+ }[]];
618
+ successUrl: string | null;
619
+ allowDiscountCodes: boolean;
620
+ customerName: string | null;
621
+ customerEmail: string | null;
622
+ customerIpAddress: string | null;
623
+ customerExternalId: string | null;
624
+ requireCustomerFields: {
625
+ customerName?: boolean | undefined;
626
+ customerEmail?: boolean | undefined;
627
+ } | null;
628
+ invoice: {
629
+ currency: string;
630
+ invoice: string;
631
+ paymentHash: string;
632
+ amountSats: number;
633
+ expiresAt: Date;
634
+ btcPrice: number;
635
+ amountSatsReceived: number;
636
+ fiatAmount: number;
637
+ };
638
+ id: string;
639
+ createdAt: Date;
640
+ clientSecret: string;
641
+ organizationId: string;
642
+ expiresAt: Date;
643
+ userMetadata: Record<string, any> | null;
644
+ customFieldData: Record<string, any> | null;
645
+ customerMetadata: Record<string, any> | null;
646
+ customerId: string | null;
647
+ customerBillingAddress: Record<string, any> | null;
648
+ providedAmount: number | null;
649
+ totalAmount: number;
650
+ discountAmount: number;
651
+ netAmount: number;
652
+ taxAmount: number;
653
+ invoiceAmountSats: number;
654
+ invoiceScid: string | null;
655
+ btcPrice: number;
656
+ } | {
657
+ currency: string;
658
+ type: "AMOUNT";
659
+ status: "PAYMENT_RECEIVED";
660
+ products: {
661
+ id: string;
662
+ name: string;
663
+ description: string | null;
664
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
665
+ prices: {
666
+ priceAmount: number | null;
667
+ id: string;
668
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
669
+ minimumAmount: number | null;
670
+ maximumAmount: number | null;
671
+ presetAmount: number | null;
672
+ unitAmount: number | null;
673
+ capAmount: number | null;
674
+ meterId: string | null;
675
+ }[];
676
+ }[] | null;
677
+ successUrl: string | null;
678
+ allowDiscountCodes: boolean;
679
+ customerName: string | null;
680
+ customerEmail: string | null;
681
+ customerIpAddress: string | null;
682
+ customerExternalId: string | null;
683
+ requireCustomerFields: {
684
+ customerName?: boolean | undefined;
685
+ customerEmail?: boolean | undefined;
686
+ } | null;
687
+ invoice: {
688
+ currency: string;
689
+ invoice: string;
690
+ paymentHash: string;
691
+ amountSats: number;
692
+ expiresAt: Date;
693
+ btcPrice: number;
694
+ amountSatsReceived: number;
695
+ fiatAmount: number;
696
+ };
697
+ id: string;
698
+ createdAt: Date;
699
+ clientSecret: string;
700
+ organizationId: string;
701
+ expiresAt: Date;
702
+ userMetadata: Record<string, any> | null;
703
+ customFieldData: Record<string, any> | null;
704
+ customerMetadata: Record<string, any> | null;
705
+ customerId: string | null;
706
+ customerBillingAddress: Record<string, any> | null;
707
+ providedAmount: number;
708
+ totalAmount: number;
709
+ discountAmount: number;
710
+ netAmount: number;
711
+ taxAmount: number;
712
+ invoiceAmountSats: number;
713
+ invoiceScid: string | null;
714
+ btcPrice: number;
715
+ } | {
716
+ currency: string;
717
+ type: "TOP_UP";
718
+ status: "PAYMENT_RECEIVED";
719
+ products: {
720
+ id: string;
721
+ name: string;
722
+ description: string | null;
723
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
724
+ prices: {
725
+ priceAmount: number | null;
726
+ id: string;
727
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
728
+ minimumAmount: number | null;
729
+ maximumAmount: number | null;
730
+ presetAmount: number | null;
731
+ unitAmount: number | null;
732
+ capAmount: number | null;
733
+ meterId: string | null;
734
+ }[];
735
+ }[] | null;
736
+ successUrl: string | null;
737
+ allowDiscountCodes: boolean;
738
+ customerName: string | null;
739
+ customerEmail: string | null;
740
+ customerIpAddress: string | null;
741
+ customerExternalId: string | null;
742
+ requireCustomerFields: {
743
+ customerName?: boolean | undefined;
744
+ customerEmail?: boolean | undefined;
745
+ } | null;
746
+ invoice: {
747
+ currency: string;
748
+ invoice: string;
749
+ paymentHash: string;
750
+ amountSats: number;
751
+ expiresAt: Date;
752
+ btcPrice: number;
753
+ amountSatsReceived: number;
754
+ fiatAmount: number;
755
+ };
756
+ id: string;
757
+ createdAt: Date;
758
+ clientSecret: string;
759
+ organizationId: string;
760
+ expiresAt: Date;
761
+ userMetadata: Record<string, any> | null;
762
+ customFieldData: Record<string, any> | null;
763
+ customerMetadata: Record<string, any> | null;
764
+ customerId: string | null;
765
+ customerBillingAddress: Record<string, any> | null;
766
+ providedAmount: number | null;
767
+ totalAmount: number;
768
+ discountAmount: number;
769
+ netAmount: number;
770
+ taxAmount: number;
771
+ invoiceAmountSats: number;
772
+ invoiceScid: string | null;
773
+ btcPrice: number;
774
+ } | {
775
+ currency: string;
776
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
777
+ status: "EXPIRED";
778
+ products: {
779
+ id: string;
780
+ name: string;
781
+ description: string | null;
782
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
783
+ prices: {
784
+ priceAmount: number | null;
785
+ id: string;
786
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
787
+ minimumAmount: number | null;
788
+ maximumAmount: number | null;
789
+ presetAmount: number | null;
790
+ unitAmount: number | null;
791
+ capAmount: number | null;
792
+ meterId: string | null;
793
+ }[];
794
+ }[] | null;
795
+ successUrl: string | null;
796
+ allowDiscountCodes: boolean;
797
+ customerName: string | null;
798
+ customerEmail: string | null;
799
+ customerIpAddress: string | null;
800
+ customerExternalId: string | null;
801
+ requireCustomerFields: {
802
+ customerName?: boolean | undefined;
803
+ customerEmail?: boolean | undefined;
804
+ } | null;
805
+ invoice: {
806
+ currency: string;
807
+ invoice: string;
808
+ paymentHash: string;
809
+ amountSats: number | null;
810
+ expiresAt: Date;
811
+ btcPrice: number | null;
812
+ amountSatsReceived: number | null;
813
+ fiatAmount: number | null;
814
+ } | null;
815
+ id: string;
816
+ createdAt: Date;
817
+ clientSecret: string;
818
+ organizationId: string;
819
+ expiresAt: Date;
820
+ userMetadata: Record<string, any> | null;
821
+ customFieldData: Record<string, any> | null;
822
+ customerMetadata: Record<string, any> | null;
823
+ customerId: string | null;
824
+ customerBillingAddress: Record<string, any> | null;
825
+ providedAmount: number | null;
826
+ totalAmount: number | null;
827
+ discountAmount: number | null;
828
+ netAmount: number | null;
829
+ taxAmount: number | null;
830
+ invoiceAmountSats: number | null;
831
+ invoiceScid: string | null;
832
+ btcPrice: number | null;
833
+ }>;
834
+ export declare function confirmCheckout(confirm: ConfirmCheckout): Promise<{
835
+ currency: string;
836
+ type: "PRODUCTS";
837
+ status: "UNCONFIRMED";
838
+ products: [{
839
+ id: string;
840
+ name: string;
841
+ description: string | null;
842
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
843
+ prices: {
844
+ priceAmount: number | null;
845
+ id: string;
846
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
847
+ minimumAmount: number | null;
848
+ maximumAmount: number | null;
849
+ presetAmount: number | null;
850
+ unitAmount: number | null;
851
+ capAmount: number | null;
852
+ meterId: string | null;
853
+ }[];
854
+ }, ...{
855
+ id: string;
856
+ name: string;
857
+ description: string | null;
858
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
859
+ prices: {
860
+ priceAmount: number | null;
861
+ id: string;
862
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
863
+ minimumAmount: number | null;
864
+ maximumAmount: number | null;
865
+ presetAmount: number | null;
866
+ unitAmount: number | null;
867
+ capAmount: number | null;
868
+ meterId: string | null;
869
+ }[];
870
+ }[]];
871
+ successUrl: string | null;
872
+ allowDiscountCodes: boolean;
873
+ customerName: string | null;
874
+ customerEmail: string | null;
875
+ customerIpAddress: string | null;
876
+ customerExternalId: string | null;
877
+ requireCustomerFields: {
878
+ customerName?: boolean | undefined;
879
+ customerEmail?: boolean | undefined;
880
+ } | null;
881
+ invoice: {
882
+ currency: string;
883
+ invoice: string;
884
+ paymentHash: string;
885
+ amountSats: number | null;
886
+ expiresAt: Date;
887
+ btcPrice: number | null;
888
+ amountSatsReceived: number | null;
889
+ fiatAmount: number | null;
890
+ } | null;
891
+ id: string;
892
+ createdAt: Date;
893
+ clientSecret: string;
894
+ organizationId: string;
895
+ expiresAt: Date;
896
+ userMetadata: Record<string, any> | null;
897
+ customFieldData: Record<string, any> | null;
898
+ customerMetadata: Record<string, any> | null;
899
+ customerId: string | null;
900
+ customerBillingAddress: Record<string, any> | null;
901
+ providedAmount: number | null;
902
+ totalAmount: number | null;
903
+ discountAmount: number | null;
904
+ netAmount: number | null;
905
+ taxAmount: number | null;
906
+ invoiceAmountSats: number | null;
907
+ invoiceScid: string | null;
908
+ btcPrice: number | null;
909
+ } | {
910
+ currency: string;
911
+ type: "AMOUNT";
912
+ status: "UNCONFIRMED";
913
+ products: {
914
+ id: string;
915
+ name: string;
916
+ description: string | null;
917
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
918
+ prices: {
919
+ priceAmount: number | null;
920
+ id: string;
921
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
922
+ minimumAmount: number | null;
923
+ maximumAmount: number | null;
924
+ presetAmount: number | null;
925
+ unitAmount: number | null;
926
+ capAmount: number | null;
927
+ meterId: string | null;
928
+ }[];
929
+ }[] | null;
930
+ successUrl: string | null;
931
+ allowDiscountCodes: boolean;
932
+ customerName: string | null;
933
+ customerEmail: string | null;
934
+ customerIpAddress: string | null;
935
+ customerExternalId: string | null;
936
+ requireCustomerFields: {
937
+ customerName?: boolean | undefined;
938
+ customerEmail?: boolean | undefined;
939
+ } | null;
940
+ invoice: {
941
+ currency: string;
942
+ invoice: string;
943
+ paymentHash: string;
944
+ amountSats: number | null;
945
+ expiresAt: Date;
946
+ btcPrice: number | null;
947
+ amountSatsReceived: number | null;
948
+ fiatAmount: number | null;
949
+ } | null;
950
+ id: string;
951
+ createdAt: Date;
952
+ clientSecret: string;
953
+ organizationId: string;
954
+ expiresAt: Date;
955
+ userMetadata: Record<string, any> | null;
956
+ customFieldData: Record<string, any> | null;
957
+ customerMetadata: Record<string, any> | null;
958
+ customerId: string | null;
959
+ customerBillingAddress: Record<string, any> | null;
960
+ providedAmount: number;
961
+ totalAmount: number | null;
962
+ discountAmount: number | null;
963
+ netAmount: number | null;
964
+ taxAmount: number | null;
965
+ invoiceAmountSats: number | null;
966
+ invoiceScid: string | null;
967
+ btcPrice: number | null;
968
+ } | {
969
+ currency: string;
970
+ type: "TOP_UP";
971
+ status: "UNCONFIRMED";
972
+ products: {
973
+ id: string;
974
+ name: string;
975
+ description: string | null;
976
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
977
+ prices: {
978
+ priceAmount: number | null;
979
+ id: string;
980
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
981
+ minimumAmount: number | null;
982
+ maximumAmount: number | null;
983
+ presetAmount: number | null;
984
+ unitAmount: number | null;
985
+ capAmount: number | null;
986
+ meterId: string | null;
987
+ }[];
988
+ }[] | null;
989
+ successUrl: string | null;
990
+ allowDiscountCodes: boolean;
991
+ customerName: string | null;
992
+ customerEmail: string | null;
993
+ customerIpAddress: string | null;
994
+ customerExternalId: string | null;
995
+ requireCustomerFields: {
996
+ customerName?: boolean | undefined;
997
+ customerEmail?: boolean | undefined;
998
+ } | null;
999
+ invoice: {
1000
+ currency: string;
1001
+ invoice: string;
1002
+ paymentHash: string;
1003
+ amountSats: number | null;
1004
+ expiresAt: Date;
1005
+ btcPrice: number | null;
1006
+ amountSatsReceived: number | null;
1007
+ fiatAmount: number | null;
1008
+ } | null;
1009
+ id: string;
1010
+ createdAt: Date;
1011
+ clientSecret: string;
1012
+ organizationId: string;
1013
+ expiresAt: Date;
1014
+ userMetadata: Record<string, any> | null;
1015
+ customFieldData: Record<string, any> | null;
1016
+ customerMetadata: Record<string, any> | null;
1017
+ customerId: string | null;
1018
+ customerBillingAddress: Record<string, any> | null;
1019
+ providedAmount: number | null;
1020
+ totalAmount: number | null;
1021
+ discountAmount: number | null;
1022
+ netAmount: number | null;
1023
+ taxAmount: number | null;
1024
+ invoiceAmountSats: number | null;
1025
+ invoiceScid: string | null;
1026
+ btcPrice: number | null;
1027
+ } | {
1028
+ currency: string;
1029
+ type: "PRODUCTS";
1030
+ status: "CONFIRMED";
1031
+ products: [{
1032
+ id: string;
1033
+ name: string;
1034
+ description: string | null;
1035
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1036
+ prices: {
1037
+ priceAmount: number | null;
1038
+ id: string;
1039
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1040
+ minimumAmount: number | null;
1041
+ maximumAmount: number | null;
1042
+ presetAmount: number | null;
1043
+ unitAmount: number | null;
1044
+ capAmount: number | null;
1045
+ meterId: string | null;
1046
+ }[];
1047
+ }, ...{
1048
+ id: string;
1049
+ name: string;
1050
+ description: string | null;
1051
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1052
+ prices: {
1053
+ priceAmount: number | null;
1054
+ id: string;
1055
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1056
+ minimumAmount: number | null;
1057
+ maximumAmount: number | null;
1058
+ presetAmount: number | null;
1059
+ unitAmount: number | null;
1060
+ capAmount: number | null;
1061
+ meterId: string | null;
1062
+ }[];
1063
+ }[]];
1064
+ successUrl: string | null;
1065
+ allowDiscountCodes: boolean;
1066
+ customerName: string | null;
1067
+ customerEmail: string | null;
1068
+ customerIpAddress: string | null;
1069
+ customerExternalId: string | null;
1070
+ requireCustomerFields: {
1071
+ customerName?: boolean | undefined;
1072
+ customerEmail?: boolean | undefined;
1073
+ } | null;
1074
+ invoice: {
1075
+ currency: string;
1076
+ invoice: string;
1077
+ paymentHash: string;
1078
+ amountSats: number | null;
1079
+ expiresAt: Date;
1080
+ btcPrice: number | null;
1081
+ amountSatsReceived: number | null;
1082
+ fiatAmount: number | null;
1083
+ } | null;
1084
+ id: string;
1085
+ createdAt: Date;
1086
+ clientSecret: string;
1087
+ organizationId: string;
1088
+ expiresAt: Date;
1089
+ userMetadata: Record<string, any> | null;
1090
+ customFieldData: Record<string, any> | null;
1091
+ customerMetadata: Record<string, any> | null;
1092
+ customerId: string | null;
1093
+ customerBillingAddress: Record<string, any> | null;
1094
+ providedAmount: number | null;
1095
+ totalAmount: number;
1096
+ discountAmount: number;
1097
+ netAmount: number;
1098
+ taxAmount: number;
1099
+ invoiceAmountSats: number;
1100
+ invoiceScid: string | null;
1101
+ btcPrice: number;
1102
+ } | {
1103
+ currency: string;
1104
+ type: "AMOUNT";
1105
+ status: "CONFIRMED";
1106
+ products: {
1107
+ id: string;
1108
+ name: string;
1109
+ description: string | null;
1110
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1111
+ prices: {
1112
+ priceAmount: number | null;
1113
+ id: string;
1114
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1115
+ minimumAmount: number | null;
1116
+ maximumAmount: number | null;
1117
+ presetAmount: number | null;
1118
+ unitAmount: number | null;
1119
+ capAmount: number | null;
1120
+ meterId: string | null;
1121
+ }[];
1122
+ }[] | null;
1123
+ successUrl: string | null;
1124
+ allowDiscountCodes: boolean;
1125
+ customerName: string | null;
1126
+ customerEmail: string | null;
1127
+ customerIpAddress: string | null;
1128
+ customerExternalId: string | null;
1129
+ requireCustomerFields: {
1130
+ customerName?: boolean | undefined;
1131
+ customerEmail?: boolean | undefined;
1132
+ } | null;
1133
+ invoice: {
1134
+ currency: string;
1135
+ invoice: string;
1136
+ paymentHash: string;
1137
+ amountSats: number | null;
1138
+ expiresAt: Date;
1139
+ btcPrice: number | null;
1140
+ amountSatsReceived: number | null;
1141
+ fiatAmount: number | null;
1142
+ } | null;
1143
+ id: string;
1144
+ createdAt: Date;
1145
+ clientSecret: string;
1146
+ organizationId: string;
1147
+ expiresAt: Date;
1148
+ userMetadata: Record<string, any> | null;
1149
+ customFieldData: Record<string, any> | null;
1150
+ customerMetadata: Record<string, any> | null;
1151
+ customerId: string | null;
1152
+ customerBillingAddress: Record<string, any> | null;
1153
+ providedAmount: number;
1154
+ totalAmount: number;
1155
+ discountAmount: number;
1156
+ netAmount: number;
1157
+ taxAmount: number;
1158
+ invoiceAmountSats: number;
1159
+ invoiceScid: string | null;
1160
+ btcPrice: number;
1161
+ } | {
1162
+ currency: string;
1163
+ type: "TOP_UP";
1164
+ status: "CONFIRMED";
1165
+ products: {
1166
+ id: string;
1167
+ name: string;
1168
+ description: string | null;
1169
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1170
+ prices: {
1171
+ priceAmount: number | null;
1172
+ id: string;
1173
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1174
+ minimumAmount: number | null;
1175
+ maximumAmount: number | null;
1176
+ presetAmount: number | null;
1177
+ unitAmount: number | null;
1178
+ capAmount: number | null;
1179
+ meterId: string | null;
1180
+ }[];
1181
+ }[] | null;
1182
+ successUrl: string | null;
1183
+ allowDiscountCodes: boolean;
1184
+ customerName: string | null;
1185
+ customerEmail: string | null;
1186
+ customerIpAddress: string | null;
1187
+ customerExternalId: string | null;
1188
+ requireCustomerFields: {
1189
+ customerName?: boolean | undefined;
1190
+ customerEmail?: boolean | undefined;
1191
+ } | null;
1192
+ invoice: {
1193
+ currency: string;
1194
+ invoice: string;
1195
+ paymentHash: string;
1196
+ amountSats: number | null;
1197
+ expiresAt: Date;
1198
+ btcPrice: number | null;
1199
+ amountSatsReceived: number | null;
1200
+ fiatAmount: number | null;
1201
+ } | null;
1202
+ id: string;
1203
+ createdAt: Date;
1204
+ clientSecret: string;
1205
+ organizationId: string;
1206
+ expiresAt: Date;
1207
+ userMetadata: Record<string, any> | null;
1208
+ customFieldData: Record<string, any> | null;
1209
+ customerMetadata: Record<string, any> | null;
1210
+ customerId: string | null;
1211
+ customerBillingAddress: Record<string, any> | null;
1212
+ providedAmount: number | null;
1213
+ totalAmount: number | null;
1214
+ discountAmount: number | null;
1215
+ netAmount: number | null;
1216
+ taxAmount: number | null;
1217
+ invoiceAmountSats: number | null;
1218
+ invoiceScid: string | null;
1219
+ btcPrice: number | null;
1220
+ } | {
1221
+ currency: string;
1222
+ type: "PRODUCTS";
1223
+ status: "PENDING_PAYMENT";
1224
+ products: [{
1225
+ id: string;
1226
+ name: string;
1227
+ description: string | null;
1228
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1229
+ prices: {
1230
+ priceAmount: number | null;
1231
+ id: string;
1232
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1233
+ minimumAmount: number | null;
1234
+ maximumAmount: number | null;
1235
+ presetAmount: number | null;
1236
+ unitAmount: number | null;
1237
+ capAmount: number | null;
1238
+ meterId: string | null;
1239
+ }[];
1240
+ }, ...{
1241
+ id: string;
1242
+ name: string;
1243
+ description: string | null;
1244
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1245
+ prices: {
1246
+ priceAmount: number | null;
1247
+ id: string;
1248
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1249
+ minimumAmount: number | null;
1250
+ maximumAmount: number | null;
1251
+ presetAmount: number | null;
1252
+ unitAmount: number | null;
1253
+ capAmount: number | null;
1254
+ meterId: string | null;
1255
+ }[];
1256
+ }[]];
1257
+ successUrl: string | null;
1258
+ allowDiscountCodes: boolean;
1259
+ customerName: string | null;
1260
+ customerEmail: string | null;
1261
+ customerIpAddress: string | null;
1262
+ customerExternalId: string | null;
1263
+ requireCustomerFields: {
1264
+ customerName?: boolean | undefined;
1265
+ customerEmail?: boolean | undefined;
1266
+ } | null;
1267
+ invoice: {
1268
+ currency: string;
1269
+ invoice: string;
1270
+ paymentHash: string;
1271
+ amountSats: number;
1272
+ expiresAt: Date;
1273
+ btcPrice: number;
1274
+ amountSatsReceived: number | null;
1275
+ fiatAmount: number;
1276
+ };
1277
+ id: string;
1278
+ createdAt: Date;
1279
+ clientSecret: string;
1280
+ organizationId: string;
1281
+ expiresAt: Date;
1282
+ userMetadata: Record<string, any> | null;
1283
+ customFieldData: Record<string, any> | null;
1284
+ customerMetadata: Record<string, any> | null;
1285
+ customerId: string | null;
1286
+ customerBillingAddress: Record<string, any> | null;
1287
+ providedAmount: number | null;
1288
+ totalAmount: number;
1289
+ discountAmount: number;
1290
+ netAmount: number;
1291
+ taxAmount: number;
1292
+ invoiceAmountSats: number;
1293
+ invoiceScid: string | null;
1294
+ btcPrice: number;
1295
+ } | {
1296
+ currency: string;
1297
+ type: "AMOUNT";
1298
+ status: "PENDING_PAYMENT";
1299
+ products: {
1300
+ id: string;
1301
+ name: string;
1302
+ description: string | null;
1303
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1304
+ prices: {
1305
+ priceAmount: number | null;
1306
+ id: string;
1307
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1308
+ minimumAmount: number | null;
1309
+ maximumAmount: number | null;
1310
+ presetAmount: number | null;
1311
+ unitAmount: number | null;
1312
+ capAmount: number | null;
1313
+ meterId: string | null;
1314
+ }[];
1315
+ }[] | null;
1316
+ successUrl: string | null;
1317
+ allowDiscountCodes: boolean;
1318
+ customerName: string | null;
1319
+ customerEmail: string | null;
1320
+ customerIpAddress: string | null;
1321
+ customerExternalId: string | null;
1322
+ requireCustomerFields: {
1323
+ customerName?: boolean | undefined;
1324
+ customerEmail?: boolean | undefined;
1325
+ } | null;
1326
+ invoice: {
1327
+ currency: string;
1328
+ invoice: string;
1329
+ paymentHash: string;
1330
+ amountSats: number;
1331
+ expiresAt: Date;
1332
+ btcPrice: number;
1333
+ amountSatsReceived: number | null;
1334
+ fiatAmount: number;
1335
+ };
1336
+ id: string;
1337
+ createdAt: Date;
1338
+ clientSecret: string;
1339
+ organizationId: string;
1340
+ expiresAt: Date;
1341
+ userMetadata: Record<string, any> | null;
1342
+ customFieldData: Record<string, any> | null;
1343
+ customerMetadata: Record<string, any> | null;
1344
+ customerId: string | null;
1345
+ customerBillingAddress: Record<string, any> | null;
1346
+ providedAmount: number;
1347
+ totalAmount: number;
1348
+ discountAmount: number;
1349
+ netAmount: number;
1350
+ taxAmount: number;
1351
+ invoiceAmountSats: number;
1352
+ invoiceScid: string | null;
1353
+ btcPrice: number;
1354
+ } | {
1355
+ currency: string;
1356
+ type: "TOP_UP";
1357
+ status: "PENDING_PAYMENT";
1358
+ products: {
1359
+ id: string;
1360
+ name: string;
1361
+ description: string | null;
1362
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1363
+ prices: {
1364
+ priceAmount: number | null;
1365
+ id: string;
1366
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1367
+ minimumAmount: number | null;
1368
+ maximumAmount: number | null;
1369
+ presetAmount: number | null;
1370
+ unitAmount: number | null;
1371
+ capAmount: number | null;
1372
+ meterId: string | null;
1373
+ }[];
1374
+ }[] | null;
1375
+ successUrl: string | null;
1376
+ allowDiscountCodes: boolean;
1377
+ customerName: string | null;
1378
+ customerEmail: string | null;
1379
+ customerIpAddress: string | null;
1380
+ customerExternalId: string | null;
1381
+ requireCustomerFields: {
1382
+ customerName?: boolean | undefined;
1383
+ customerEmail?: boolean | undefined;
1384
+ } | null;
1385
+ invoice: {
1386
+ currency: string;
1387
+ invoice: string;
1388
+ paymentHash: string;
1389
+ amountSats: number | null;
1390
+ expiresAt: Date;
1391
+ btcPrice: number | null;
1392
+ amountSatsReceived: number | null;
1393
+ fiatAmount: number | null;
1394
+ };
1395
+ id: string;
1396
+ createdAt: Date;
1397
+ clientSecret: string;
1398
+ organizationId: string;
1399
+ expiresAt: Date;
1400
+ userMetadata: Record<string, any> | null;
1401
+ customFieldData: Record<string, any> | null;
1402
+ customerMetadata: Record<string, any> | null;
1403
+ customerId: string | null;
1404
+ customerBillingAddress: Record<string, any> | null;
1405
+ providedAmount: number | null;
1406
+ totalAmount: number | null;
1407
+ discountAmount: number | null;
1408
+ netAmount: number | null;
1409
+ taxAmount: number | null;
1410
+ invoiceAmountSats: number | null;
1411
+ invoiceScid: string | null;
1412
+ btcPrice: number | null;
1413
+ } | {
1414
+ currency: string;
1415
+ type: "PRODUCTS";
1416
+ status: "PAYMENT_RECEIVED";
1417
+ products: [{
1418
+ id: string;
1419
+ name: string;
1420
+ description: string | null;
1421
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1422
+ prices: {
1423
+ priceAmount: number | null;
1424
+ id: string;
1425
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1426
+ minimumAmount: number | null;
1427
+ maximumAmount: number | null;
1428
+ presetAmount: number | null;
1429
+ unitAmount: number | null;
1430
+ capAmount: number | null;
1431
+ meterId: string | null;
1432
+ }[];
1433
+ }, ...{
1434
+ id: string;
1435
+ name: string;
1436
+ description: string | null;
1437
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1438
+ prices: {
1439
+ priceAmount: number | null;
1440
+ id: string;
1441
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1442
+ minimumAmount: number | null;
1443
+ maximumAmount: number | null;
1444
+ presetAmount: number | null;
1445
+ unitAmount: number | null;
1446
+ capAmount: number | null;
1447
+ meterId: string | null;
1448
+ }[];
1449
+ }[]];
1450
+ successUrl: string | null;
1451
+ allowDiscountCodes: boolean;
1452
+ customerName: string | null;
1453
+ customerEmail: string | null;
1454
+ customerIpAddress: string | null;
1455
+ customerExternalId: string | null;
1456
+ requireCustomerFields: {
1457
+ customerName?: boolean | undefined;
1458
+ customerEmail?: boolean | undefined;
1459
+ } | null;
1460
+ invoice: {
1461
+ currency: string;
1462
+ invoice: string;
1463
+ paymentHash: string;
1464
+ amountSats: number;
1465
+ expiresAt: Date;
1466
+ btcPrice: number;
1467
+ amountSatsReceived: number;
1468
+ fiatAmount: number;
1469
+ };
1470
+ id: string;
1471
+ createdAt: Date;
1472
+ clientSecret: string;
1473
+ organizationId: string;
1474
+ expiresAt: Date;
1475
+ userMetadata: Record<string, any> | null;
1476
+ customFieldData: Record<string, any> | null;
1477
+ customerMetadata: Record<string, any> | null;
1478
+ customerId: string | null;
1479
+ customerBillingAddress: Record<string, any> | null;
1480
+ providedAmount: number | null;
1481
+ totalAmount: number;
1482
+ discountAmount: number;
1483
+ netAmount: number;
1484
+ taxAmount: number;
1485
+ invoiceAmountSats: number;
1486
+ invoiceScid: string | null;
1487
+ btcPrice: number;
1488
+ } | {
1489
+ currency: string;
1490
+ type: "AMOUNT";
1491
+ status: "PAYMENT_RECEIVED";
1492
+ products: {
1493
+ id: string;
1494
+ name: string;
1495
+ description: string | null;
1496
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1497
+ prices: {
1498
+ priceAmount: number | null;
1499
+ id: string;
1500
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1501
+ minimumAmount: number | null;
1502
+ maximumAmount: number | null;
1503
+ presetAmount: number | null;
1504
+ unitAmount: number | null;
1505
+ capAmount: number | null;
1506
+ meterId: string | null;
1507
+ }[];
1508
+ }[] | null;
1509
+ successUrl: string | null;
1510
+ allowDiscountCodes: boolean;
1511
+ customerName: string | null;
1512
+ customerEmail: string | null;
1513
+ customerIpAddress: string | null;
1514
+ customerExternalId: string | null;
1515
+ requireCustomerFields: {
1516
+ customerName?: boolean | undefined;
1517
+ customerEmail?: boolean | undefined;
1518
+ } | null;
1519
+ invoice: {
1520
+ currency: string;
1521
+ invoice: string;
1522
+ paymentHash: string;
1523
+ amountSats: number;
1524
+ expiresAt: Date;
1525
+ btcPrice: number;
1526
+ amountSatsReceived: number;
1527
+ fiatAmount: number;
1528
+ };
1529
+ id: string;
1530
+ createdAt: Date;
1531
+ clientSecret: string;
1532
+ organizationId: string;
1533
+ expiresAt: Date;
1534
+ userMetadata: Record<string, any> | null;
1535
+ customFieldData: Record<string, any> | null;
1536
+ customerMetadata: Record<string, any> | null;
1537
+ customerId: string | null;
1538
+ customerBillingAddress: Record<string, any> | null;
1539
+ providedAmount: number;
1540
+ totalAmount: number;
1541
+ discountAmount: number;
1542
+ netAmount: number;
1543
+ taxAmount: number;
1544
+ invoiceAmountSats: number;
1545
+ invoiceScid: string | null;
1546
+ btcPrice: number;
1547
+ } | {
1548
+ currency: string;
1549
+ type: "TOP_UP";
1550
+ status: "PAYMENT_RECEIVED";
1551
+ products: {
1552
+ id: string;
1553
+ name: string;
1554
+ description: string | null;
1555
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1556
+ prices: {
1557
+ priceAmount: number | null;
1558
+ id: string;
1559
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1560
+ minimumAmount: number | null;
1561
+ maximumAmount: number | null;
1562
+ presetAmount: number | null;
1563
+ unitAmount: number | null;
1564
+ capAmount: number | null;
1565
+ meterId: string | null;
1566
+ }[];
1567
+ }[] | null;
1568
+ successUrl: string | null;
1569
+ allowDiscountCodes: boolean;
1570
+ customerName: string | null;
1571
+ customerEmail: string | null;
1572
+ customerIpAddress: string | null;
1573
+ customerExternalId: string | null;
1574
+ requireCustomerFields: {
1575
+ customerName?: boolean | undefined;
1576
+ customerEmail?: boolean | undefined;
1577
+ } | null;
1578
+ invoice: {
1579
+ currency: string;
1580
+ invoice: string;
1581
+ paymentHash: string;
1582
+ amountSats: number;
1583
+ expiresAt: Date;
1584
+ btcPrice: number;
1585
+ amountSatsReceived: number;
1586
+ fiatAmount: number;
1587
+ };
1588
+ id: string;
1589
+ createdAt: Date;
1590
+ clientSecret: string;
1591
+ organizationId: string;
1592
+ expiresAt: Date;
1593
+ userMetadata: Record<string, any> | null;
1594
+ customFieldData: Record<string, any> | null;
1595
+ customerMetadata: Record<string, any> | null;
1596
+ customerId: string | null;
1597
+ customerBillingAddress: Record<string, any> | null;
1598
+ providedAmount: number | null;
1599
+ totalAmount: number;
1600
+ discountAmount: number;
1601
+ netAmount: number;
1602
+ taxAmount: number;
1603
+ invoiceAmountSats: number;
1604
+ invoiceScid: string | null;
1605
+ btcPrice: number;
1606
+ } | {
1607
+ currency: string;
1608
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
1609
+ status: "EXPIRED";
1610
+ products: {
1611
+ id: string;
1612
+ name: string;
1613
+ description: string | null;
1614
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1615
+ prices: {
1616
+ priceAmount: number | null;
1617
+ id: string;
1618
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1619
+ minimumAmount: number | null;
1620
+ maximumAmount: number | null;
1621
+ presetAmount: number | null;
1622
+ unitAmount: number | null;
1623
+ capAmount: number | null;
1624
+ meterId: string | null;
1625
+ }[];
1626
+ }[] | null;
1627
+ successUrl: string | null;
1628
+ allowDiscountCodes: boolean;
1629
+ customerName: string | null;
1630
+ customerEmail: string | null;
1631
+ customerIpAddress: string | null;
1632
+ customerExternalId: string | null;
1633
+ requireCustomerFields: {
1634
+ customerName?: boolean | undefined;
1635
+ customerEmail?: boolean | undefined;
1636
+ } | null;
1637
+ invoice: {
1638
+ currency: string;
1639
+ invoice: string;
1640
+ paymentHash: string;
1641
+ amountSats: number | null;
1642
+ expiresAt: Date;
1643
+ btcPrice: number | null;
1644
+ amountSatsReceived: number | null;
1645
+ fiatAmount: number | null;
1646
+ } | null;
1647
+ id: string;
1648
+ createdAt: Date;
1649
+ clientSecret: string;
1650
+ organizationId: string;
1651
+ expiresAt: Date;
1652
+ userMetadata: Record<string, any> | null;
1653
+ customFieldData: Record<string, any> | null;
1654
+ customerMetadata: Record<string, any> | null;
1655
+ customerId: string | null;
1656
+ customerBillingAddress: Record<string, any> | null;
1657
+ providedAmount: number | null;
1658
+ totalAmount: number | null;
1659
+ discountAmount: number | null;
1660
+ netAmount: number | null;
1661
+ taxAmount: number | null;
1662
+ invoiceAmountSats: number | null;
1663
+ invoiceScid: string | null;
1664
+ btcPrice: number | null;
1665
+ }>;
1666
+ export interface CreateCheckoutParams {
1667
+ title: string;
1668
+ description: string;
1669
+ amount: number;
1670
+ currency?: 'USD' | 'SAT';
1671
+ successUrl?: string;
1672
+ checkoutPath?: string;
1673
+ metadata?: Record<string, any>;
1674
+ }
1675
+ export declare function createCheckout(params: CreateCheckoutParams): Promise<{
1676
+ currency: string;
1677
+ type: "PRODUCTS";
1678
+ status: "UNCONFIRMED";
1679
+ products: [{
1680
+ id: string;
1681
+ name: string;
1682
+ description: string | null;
1683
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1684
+ prices: {
1685
+ priceAmount: number | null;
1686
+ id: string;
1687
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1688
+ minimumAmount: number | null;
1689
+ maximumAmount: number | null;
1690
+ presetAmount: number | null;
1691
+ unitAmount: number | null;
1692
+ capAmount: number | null;
1693
+ meterId: string | null;
1694
+ }[];
1695
+ }, ...{
1696
+ id: string;
1697
+ name: string;
1698
+ description: string | null;
1699
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1700
+ prices: {
1701
+ priceAmount: number | null;
1702
+ id: string;
1703
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1704
+ minimumAmount: number | null;
1705
+ maximumAmount: number | null;
1706
+ presetAmount: number | null;
1707
+ unitAmount: number | null;
1708
+ capAmount: number | null;
1709
+ meterId: string | null;
1710
+ }[];
1711
+ }[]];
1712
+ successUrl: string | null;
1713
+ allowDiscountCodes: boolean;
1714
+ customerName: string | null;
1715
+ customerEmail: string | null;
1716
+ customerIpAddress: string | null;
1717
+ customerExternalId: string | null;
1718
+ requireCustomerFields: {
1719
+ customerName?: boolean | undefined;
1720
+ customerEmail?: boolean | undefined;
1721
+ } | null;
1722
+ invoice: {
1723
+ currency: string;
1724
+ invoice: string;
1725
+ paymentHash: string;
1726
+ amountSats: number | null;
1727
+ expiresAt: Date;
1728
+ btcPrice: number | null;
1729
+ amountSatsReceived: number | null;
1730
+ fiatAmount: number | null;
1731
+ } | null;
1732
+ id: string;
1733
+ createdAt: Date;
1734
+ clientSecret: string;
1735
+ organizationId: string;
1736
+ expiresAt: Date;
1737
+ userMetadata: Record<string, any> | null;
1738
+ customFieldData: Record<string, any> | null;
1739
+ customerMetadata: Record<string, any> | null;
1740
+ customerId: string | null;
1741
+ customerBillingAddress: Record<string, any> | null;
1742
+ providedAmount: number | null;
1743
+ totalAmount: number | null;
1744
+ discountAmount: number | null;
1745
+ netAmount: number | null;
1746
+ taxAmount: number | null;
1747
+ invoiceAmountSats: number | null;
1748
+ invoiceScid: string | null;
1749
+ btcPrice: number | null;
1750
+ } | {
1751
+ currency: string;
1752
+ type: "AMOUNT";
1753
+ status: "UNCONFIRMED";
1754
+ products: {
1755
+ id: string;
1756
+ name: string;
1757
+ description: string | null;
1758
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1759
+ prices: {
1760
+ priceAmount: number | null;
1761
+ id: string;
1762
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1763
+ minimumAmount: number | null;
1764
+ maximumAmount: number | null;
1765
+ presetAmount: number | null;
1766
+ unitAmount: number | null;
1767
+ capAmount: number | null;
1768
+ meterId: string | null;
1769
+ }[];
1770
+ }[] | null;
1771
+ successUrl: string | null;
1772
+ allowDiscountCodes: boolean;
1773
+ customerName: string | null;
1774
+ customerEmail: string | null;
1775
+ customerIpAddress: string | null;
1776
+ customerExternalId: string | null;
1777
+ requireCustomerFields: {
1778
+ customerName?: boolean | undefined;
1779
+ customerEmail?: boolean | undefined;
1780
+ } | null;
1781
+ invoice: {
1782
+ currency: string;
1783
+ invoice: string;
1784
+ paymentHash: string;
1785
+ amountSats: number | null;
1786
+ expiresAt: Date;
1787
+ btcPrice: number | null;
1788
+ amountSatsReceived: number | null;
1789
+ fiatAmount: number | null;
1790
+ } | null;
1791
+ id: string;
1792
+ createdAt: Date;
1793
+ clientSecret: string;
1794
+ organizationId: string;
1795
+ expiresAt: Date;
1796
+ userMetadata: Record<string, any> | null;
1797
+ customFieldData: Record<string, any> | null;
1798
+ customerMetadata: Record<string, any> | null;
1799
+ customerId: string | null;
1800
+ customerBillingAddress: Record<string, any> | null;
1801
+ providedAmount: number;
1802
+ totalAmount: number | null;
1803
+ discountAmount: number | null;
1804
+ netAmount: number | null;
1805
+ taxAmount: number | null;
1806
+ invoiceAmountSats: number | null;
1807
+ invoiceScid: string | null;
1808
+ btcPrice: number | null;
1809
+ } | {
1810
+ currency: string;
1811
+ type: "TOP_UP";
1812
+ status: "UNCONFIRMED";
1813
+ products: {
1814
+ id: string;
1815
+ name: string;
1816
+ description: string | null;
1817
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1818
+ prices: {
1819
+ priceAmount: number | null;
1820
+ id: string;
1821
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1822
+ minimumAmount: number | null;
1823
+ maximumAmount: number | null;
1824
+ presetAmount: number | null;
1825
+ unitAmount: number | null;
1826
+ capAmount: number | null;
1827
+ meterId: string | null;
1828
+ }[];
1829
+ }[] | null;
1830
+ successUrl: string | null;
1831
+ allowDiscountCodes: boolean;
1832
+ customerName: string | null;
1833
+ customerEmail: string | null;
1834
+ customerIpAddress: string | null;
1835
+ customerExternalId: string | null;
1836
+ requireCustomerFields: {
1837
+ customerName?: boolean | undefined;
1838
+ customerEmail?: boolean | undefined;
1839
+ } | null;
1840
+ invoice: {
1841
+ currency: string;
1842
+ invoice: string;
1843
+ paymentHash: string;
1844
+ amountSats: number | null;
1845
+ expiresAt: Date;
1846
+ btcPrice: number | null;
1847
+ amountSatsReceived: number | null;
1848
+ fiatAmount: number | null;
1849
+ } | null;
1850
+ id: string;
1851
+ createdAt: Date;
1852
+ clientSecret: string;
1853
+ organizationId: string;
1854
+ expiresAt: Date;
1855
+ userMetadata: Record<string, any> | null;
1856
+ customFieldData: Record<string, any> | null;
1857
+ customerMetadata: Record<string, any> | null;
1858
+ customerId: string | null;
1859
+ customerBillingAddress: Record<string, any> | null;
1860
+ providedAmount: number | null;
1861
+ totalAmount: number | null;
1862
+ discountAmount: number | null;
1863
+ netAmount: number | null;
1864
+ taxAmount: number | null;
1865
+ invoiceAmountSats: number | null;
1866
+ invoiceScid: string | null;
1867
+ btcPrice: number | null;
1868
+ } | {
1869
+ currency: string;
1870
+ type: "PRODUCTS";
1871
+ status: "PENDING_PAYMENT";
1872
+ products: [{
1873
+ id: string;
1874
+ name: string;
1875
+ description: string | null;
1876
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1877
+ prices: {
1878
+ priceAmount: number | null;
1879
+ id: string;
1880
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1881
+ minimumAmount: number | null;
1882
+ maximumAmount: number | null;
1883
+ presetAmount: number | null;
1884
+ unitAmount: number | null;
1885
+ capAmount: number | null;
1886
+ meterId: string | null;
1887
+ }[];
1888
+ }, ...{
1889
+ id: string;
1890
+ name: string;
1891
+ description: string | null;
1892
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1893
+ prices: {
1894
+ priceAmount: number | null;
1895
+ id: string;
1896
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1897
+ minimumAmount: number | null;
1898
+ maximumAmount: number | null;
1899
+ presetAmount: number | null;
1900
+ unitAmount: number | null;
1901
+ capAmount: number | null;
1902
+ meterId: string | null;
1903
+ }[];
1904
+ }[]];
1905
+ successUrl: string | null;
1906
+ allowDiscountCodes: boolean;
1907
+ customerName: string | null;
1908
+ customerEmail: string | null;
1909
+ customerIpAddress: string | null;
1910
+ customerExternalId: string | null;
1911
+ requireCustomerFields: {
1912
+ customerName?: boolean | undefined;
1913
+ customerEmail?: boolean | undefined;
1914
+ } | null;
1915
+ invoice: {
1916
+ currency: string;
1917
+ invoice: string;
1918
+ paymentHash: string;
1919
+ amountSats: number;
1920
+ expiresAt: Date;
1921
+ btcPrice: number;
1922
+ amountSatsReceived: number | null;
1923
+ fiatAmount: number;
1924
+ };
1925
+ id: string;
1926
+ createdAt: Date;
1927
+ clientSecret: string;
1928
+ organizationId: string;
1929
+ expiresAt: Date;
1930
+ userMetadata: Record<string, any> | null;
1931
+ customFieldData: Record<string, any> | null;
1932
+ customerMetadata: Record<string, any> | null;
1933
+ customerId: string | null;
1934
+ customerBillingAddress: Record<string, any> | null;
1935
+ providedAmount: number | null;
1936
+ totalAmount: number;
1937
+ discountAmount: number;
1938
+ netAmount: number;
1939
+ taxAmount: number;
1940
+ invoiceAmountSats: number;
1941
+ invoiceScid: string | null;
1942
+ btcPrice: number;
1943
+ } | {
1944
+ currency: string;
1945
+ type: "AMOUNT";
1946
+ status: "PENDING_PAYMENT";
1947
+ products: {
1948
+ id: string;
1949
+ name: string;
1950
+ description: string | null;
1951
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1952
+ prices: {
1953
+ priceAmount: number | null;
1954
+ id: string;
1955
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1956
+ minimumAmount: number | null;
1957
+ maximumAmount: number | null;
1958
+ presetAmount: number | null;
1959
+ unitAmount: number | null;
1960
+ capAmount: number | null;
1961
+ meterId: string | null;
1962
+ }[];
1963
+ }[] | null;
1964
+ successUrl: string | null;
1965
+ allowDiscountCodes: boolean;
1966
+ customerName: string | null;
1967
+ customerEmail: string | null;
1968
+ customerIpAddress: string | null;
1969
+ customerExternalId: string | null;
1970
+ requireCustomerFields: {
1971
+ customerName?: boolean | undefined;
1972
+ customerEmail?: boolean | undefined;
1973
+ } | null;
1974
+ invoice: {
1975
+ currency: string;
1976
+ invoice: string;
1977
+ paymentHash: string;
1978
+ amountSats: number;
1979
+ expiresAt: Date;
1980
+ btcPrice: number;
1981
+ amountSatsReceived: number | null;
1982
+ fiatAmount: number;
1983
+ };
1984
+ id: string;
1985
+ createdAt: Date;
1986
+ clientSecret: string;
1987
+ organizationId: string;
1988
+ expiresAt: Date;
1989
+ userMetadata: Record<string, any> | null;
1990
+ customFieldData: Record<string, any> | null;
1991
+ customerMetadata: Record<string, any> | null;
1992
+ customerId: string | null;
1993
+ customerBillingAddress: Record<string, any> | null;
1994
+ providedAmount: number;
1995
+ totalAmount: number;
1996
+ discountAmount: number;
1997
+ netAmount: number;
1998
+ taxAmount: number;
1999
+ invoiceAmountSats: number;
2000
+ invoiceScid: string | null;
2001
+ btcPrice: number;
2002
+ } | {
2003
+ currency: string;
2004
+ type: "TOP_UP";
2005
+ status: "PENDING_PAYMENT";
2006
+ products: {
2007
+ id: string;
2008
+ name: string;
2009
+ description: string | null;
2010
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2011
+ prices: {
2012
+ priceAmount: number | null;
2013
+ id: string;
2014
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2015
+ minimumAmount: number | null;
2016
+ maximumAmount: number | null;
2017
+ presetAmount: number | null;
2018
+ unitAmount: number | null;
2019
+ capAmount: number | null;
2020
+ meterId: string | null;
2021
+ }[];
2022
+ }[] | null;
2023
+ successUrl: string | null;
2024
+ allowDiscountCodes: boolean;
2025
+ customerName: string | null;
2026
+ customerEmail: string | null;
2027
+ customerIpAddress: string | null;
2028
+ customerExternalId: string | null;
2029
+ requireCustomerFields: {
2030
+ customerName?: boolean | undefined;
2031
+ customerEmail?: boolean | undefined;
2032
+ } | null;
2033
+ invoice: {
2034
+ currency: string;
2035
+ invoice: string;
2036
+ paymentHash: string;
2037
+ amountSats: number | null;
2038
+ expiresAt: Date;
2039
+ btcPrice: number | null;
2040
+ amountSatsReceived: number | null;
2041
+ fiatAmount: number | null;
2042
+ };
2043
+ id: string;
2044
+ createdAt: Date;
2045
+ clientSecret: string;
2046
+ organizationId: string;
2047
+ expiresAt: Date;
2048
+ userMetadata: Record<string, any> | null;
2049
+ customFieldData: Record<string, any> | null;
2050
+ customerMetadata: Record<string, any> | null;
2051
+ customerId: string | null;
2052
+ customerBillingAddress: Record<string, any> | null;
2053
+ providedAmount: number | null;
2054
+ totalAmount: number | null;
2055
+ discountAmount: number | null;
2056
+ netAmount: number | null;
2057
+ taxAmount: number | null;
2058
+ invoiceAmountSats: number | null;
2059
+ invoiceScid: string | null;
2060
+ btcPrice: number | null;
2061
+ } | {
2062
+ currency: string;
2063
+ type: "PRODUCTS";
2064
+ status: "PAYMENT_RECEIVED";
2065
+ products: [{
2066
+ id: string;
2067
+ name: string;
2068
+ description: string | null;
2069
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2070
+ prices: {
2071
+ priceAmount: number | null;
2072
+ id: string;
2073
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2074
+ minimumAmount: number | null;
2075
+ maximumAmount: number | null;
2076
+ presetAmount: number | null;
2077
+ unitAmount: number | null;
2078
+ capAmount: number | null;
2079
+ meterId: string | null;
2080
+ }[];
2081
+ }, ...{
2082
+ id: string;
2083
+ name: string;
2084
+ description: string | null;
2085
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2086
+ prices: {
2087
+ priceAmount: number | null;
2088
+ id: string;
2089
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2090
+ minimumAmount: number | null;
2091
+ maximumAmount: number | null;
2092
+ presetAmount: number | null;
2093
+ unitAmount: number | null;
2094
+ capAmount: number | null;
2095
+ meterId: string | null;
2096
+ }[];
2097
+ }[]];
2098
+ successUrl: string | null;
2099
+ allowDiscountCodes: boolean;
2100
+ customerName: string | null;
2101
+ customerEmail: string | null;
2102
+ customerIpAddress: string | null;
2103
+ customerExternalId: string | null;
2104
+ requireCustomerFields: {
2105
+ customerName?: boolean | undefined;
2106
+ customerEmail?: boolean | undefined;
2107
+ } | null;
2108
+ invoice: {
2109
+ currency: string;
2110
+ invoice: string;
2111
+ paymentHash: string;
2112
+ amountSats: number;
2113
+ expiresAt: Date;
2114
+ btcPrice: number;
2115
+ amountSatsReceived: number;
2116
+ fiatAmount: number;
2117
+ };
2118
+ id: string;
2119
+ createdAt: Date;
2120
+ clientSecret: string;
2121
+ organizationId: string;
2122
+ expiresAt: Date;
2123
+ userMetadata: Record<string, any> | null;
2124
+ customFieldData: Record<string, any> | null;
2125
+ customerMetadata: Record<string, any> | null;
2126
+ customerId: string | null;
2127
+ customerBillingAddress: Record<string, any> | null;
2128
+ providedAmount: number | null;
2129
+ totalAmount: number;
2130
+ discountAmount: number;
2131
+ netAmount: number;
2132
+ taxAmount: number;
2133
+ invoiceAmountSats: number;
2134
+ invoiceScid: string | null;
2135
+ btcPrice: number;
2136
+ } | {
2137
+ currency: string;
2138
+ type: "AMOUNT";
2139
+ status: "PAYMENT_RECEIVED";
2140
+ products: {
2141
+ id: string;
2142
+ name: string;
2143
+ description: string | null;
2144
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2145
+ prices: {
2146
+ priceAmount: number | null;
2147
+ id: string;
2148
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2149
+ minimumAmount: number | null;
2150
+ maximumAmount: number | null;
2151
+ presetAmount: number | null;
2152
+ unitAmount: number | null;
2153
+ capAmount: number | null;
2154
+ meterId: string | null;
2155
+ }[];
2156
+ }[] | null;
2157
+ successUrl: string | null;
2158
+ allowDiscountCodes: boolean;
2159
+ customerName: string | null;
2160
+ customerEmail: string | null;
2161
+ customerIpAddress: string | null;
2162
+ customerExternalId: string | null;
2163
+ requireCustomerFields: {
2164
+ customerName?: boolean | undefined;
2165
+ customerEmail?: boolean | undefined;
2166
+ } | null;
2167
+ invoice: {
2168
+ currency: string;
2169
+ invoice: string;
2170
+ paymentHash: string;
2171
+ amountSats: number;
2172
+ expiresAt: Date;
2173
+ btcPrice: number;
2174
+ amountSatsReceived: number;
2175
+ fiatAmount: number;
2176
+ };
2177
+ id: string;
2178
+ createdAt: Date;
2179
+ clientSecret: string;
2180
+ organizationId: string;
2181
+ expiresAt: Date;
2182
+ userMetadata: Record<string, any> | null;
2183
+ customFieldData: Record<string, any> | null;
2184
+ customerMetadata: Record<string, any> | null;
2185
+ customerId: string | null;
2186
+ customerBillingAddress: Record<string, any> | null;
2187
+ providedAmount: number;
2188
+ totalAmount: number;
2189
+ discountAmount: number;
2190
+ netAmount: number;
2191
+ taxAmount: number;
2192
+ invoiceAmountSats: number;
2193
+ invoiceScid: string | null;
2194
+ btcPrice: number;
2195
+ } | {
2196
+ currency: string;
2197
+ type: "TOP_UP";
2198
+ status: "PAYMENT_RECEIVED";
2199
+ products: {
2200
+ id: string;
2201
+ name: string;
2202
+ description: string | null;
2203
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2204
+ prices: {
2205
+ priceAmount: number | null;
2206
+ id: string;
2207
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2208
+ minimumAmount: number | null;
2209
+ maximumAmount: number | null;
2210
+ presetAmount: number | null;
2211
+ unitAmount: number | null;
2212
+ capAmount: number | null;
2213
+ meterId: string | null;
2214
+ }[];
2215
+ }[] | null;
2216
+ successUrl: string | null;
2217
+ allowDiscountCodes: boolean;
2218
+ customerName: string | null;
2219
+ customerEmail: string | null;
2220
+ customerIpAddress: string | null;
2221
+ customerExternalId: string | null;
2222
+ requireCustomerFields: {
2223
+ customerName?: boolean | undefined;
2224
+ customerEmail?: boolean | undefined;
2225
+ } | null;
2226
+ invoice: {
2227
+ currency: string;
2228
+ invoice: string;
2229
+ paymentHash: string;
2230
+ amountSats: number;
2231
+ expiresAt: Date;
2232
+ btcPrice: number;
2233
+ amountSatsReceived: number;
2234
+ fiatAmount: number;
2235
+ };
2236
+ id: string;
2237
+ createdAt: Date;
2238
+ clientSecret: string;
2239
+ organizationId: string;
2240
+ expiresAt: Date;
2241
+ userMetadata: Record<string, any> | null;
2242
+ customFieldData: Record<string, any> | null;
2243
+ customerMetadata: Record<string, any> | null;
2244
+ customerId: string | null;
2245
+ customerBillingAddress: Record<string, any> | null;
2246
+ providedAmount: number | null;
2247
+ totalAmount: number;
2248
+ discountAmount: number;
2249
+ netAmount: number;
2250
+ taxAmount: number;
2251
+ invoiceAmountSats: number;
2252
+ invoiceScid: string | null;
2253
+ btcPrice: number;
2254
+ } | {
2255
+ currency: string;
2256
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
2257
+ status: "EXPIRED";
2258
+ products: {
2259
+ id: string;
2260
+ name: string;
2261
+ description: string | null;
2262
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2263
+ prices: {
2264
+ priceAmount: number | null;
2265
+ id: string;
2266
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2267
+ minimumAmount: number | null;
2268
+ maximumAmount: number | null;
2269
+ presetAmount: number | null;
2270
+ unitAmount: number | null;
2271
+ capAmount: number | null;
2272
+ meterId: string | null;
2273
+ }[];
2274
+ }[] | null;
2275
+ successUrl: string | null;
2276
+ allowDiscountCodes: boolean;
2277
+ customerName: string | null;
2278
+ customerEmail: string | null;
2279
+ customerIpAddress: string | null;
2280
+ customerExternalId: string | null;
2281
+ requireCustomerFields: {
2282
+ customerName?: boolean | undefined;
2283
+ customerEmail?: boolean | undefined;
2284
+ } | null;
2285
+ invoice: {
2286
+ currency: string;
2287
+ invoice: string;
2288
+ paymentHash: string;
2289
+ amountSats: number | null;
2290
+ expiresAt: Date;
2291
+ btcPrice: number | null;
2292
+ amountSatsReceived: number | null;
2293
+ fiatAmount: number | null;
2294
+ } | null;
2295
+ id: string;
2296
+ createdAt: Date;
2297
+ clientSecret: string;
2298
+ organizationId: string;
2299
+ expiresAt: Date;
2300
+ userMetadata: Record<string, any> | null;
2301
+ customFieldData: Record<string, any> | null;
2302
+ customerMetadata: Record<string, any> | null;
2303
+ customerId: string | null;
2304
+ customerBillingAddress: Record<string, any> | null;
2305
+ providedAmount: number | null;
2306
+ totalAmount: number | null;
2307
+ discountAmount: number | null;
2308
+ netAmount: number | null;
2309
+ taxAmount: number | null;
2310
+ invoiceAmountSats: number | null;
2311
+ invoiceScid: string | null;
2312
+ btcPrice: number | null;
2313
+ } | {
2314
+ currency: string;
2315
+ type: "PRODUCTS";
2316
+ status: "CONFIRMED";
2317
+ products: [{
2318
+ id: string;
2319
+ name: string;
2320
+ description: string | null;
2321
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2322
+ prices: {
2323
+ priceAmount: number | null;
2324
+ id: string;
2325
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2326
+ minimumAmount: number | null;
2327
+ maximumAmount: number | null;
2328
+ presetAmount: number | null;
2329
+ unitAmount: number | null;
2330
+ capAmount: number | null;
2331
+ meterId: string | null;
2332
+ }[];
2333
+ }, ...{
2334
+ id: string;
2335
+ name: string;
2336
+ description: string | null;
2337
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2338
+ prices: {
2339
+ priceAmount: number | null;
2340
+ id: string;
2341
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2342
+ minimumAmount: number | null;
2343
+ maximumAmount: number | null;
2344
+ presetAmount: number | null;
2345
+ unitAmount: number | null;
2346
+ capAmount: number | null;
2347
+ meterId: string | null;
2348
+ }[];
2349
+ }[]];
2350
+ successUrl: string | null;
2351
+ allowDiscountCodes: boolean;
2352
+ customerName: string | null;
2353
+ customerEmail: string | null;
2354
+ customerIpAddress: string | null;
2355
+ customerExternalId: string | null;
2356
+ requireCustomerFields: {
2357
+ customerName?: boolean | undefined;
2358
+ customerEmail?: boolean | undefined;
2359
+ } | null;
2360
+ invoice: {
2361
+ currency: string;
2362
+ invoice: string;
2363
+ paymentHash: string;
2364
+ amountSats: number | null;
2365
+ expiresAt: Date;
2366
+ btcPrice: number | null;
2367
+ amountSatsReceived: number | null;
2368
+ fiatAmount: number | null;
2369
+ } | null;
2370
+ id: string;
2371
+ createdAt: Date;
2372
+ clientSecret: string;
2373
+ organizationId: string;
2374
+ expiresAt: Date;
2375
+ userMetadata: Record<string, any> | null;
2376
+ customFieldData: Record<string, any> | null;
2377
+ customerMetadata: Record<string, any> | null;
2378
+ customerId: string | null;
2379
+ customerBillingAddress: Record<string, any> | null;
2380
+ providedAmount: number | null;
2381
+ totalAmount: number;
2382
+ discountAmount: number;
2383
+ netAmount: number;
2384
+ taxAmount: number;
2385
+ invoiceAmountSats: number;
2386
+ invoiceScid: string | null;
2387
+ btcPrice: number;
2388
+ } | {
2389
+ currency: string;
2390
+ type: "AMOUNT";
2391
+ status: "CONFIRMED";
2392
+ products: {
2393
+ id: string;
2394
+ name: string;
2395
+ description: string | null;
2396
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2397
+ prices: {
2398
+ priceAmount: number | null;
2399
+ id: string;
2400
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2401
+ minimumAmount: number | null;
2402
+ maximumAmount: number | null;
2403
+ presetAmount: number | null;
2404
+ unitAmount: number | null;
2405
+ capAmount: number | null;
2406
+ meterId: string | null;
2407
+ }[];
2408
+ }[] | null;
2409
+ successUrl: string | null;
2410
+ allowDiscountCodes: boolean;
2411
+ customerName: string | null;
2412
+ customerEmail: string | null;
2413
+ customerIpAddress: string | null;
2414
+ customerExternalId: string | null;
2415
+ requireCustomerFields: {
2416
+ customerName?: boolean | undefined;
2417
+ customerEmail?: boolean | undefined;
2418
+ } | null;
2419
+ invoice: {
2420
+ currency: string;
2421
+ invoice: string;
2422
+ paymentHash: string;
2423
+ amountSats: number | null;
2424
+ expiresAt: Date;
2425
+ btcPrice: number | null;
2426
+ amountSatsReceived: number | null;
2427
+ fiatAmount: number | null;
2428
+ } | null;
2429
+ id: string;
2430
+ createdAt: Date;
2431
+ clientSecret: string;
2432
+ organizationId: string;
2433
+ expiresAt: Date;
2434
+ userMetadata: Record<string, any> | null;
2435
+ customFieldData: Record<string, any> | null;
2436
+ customerMetadata: Record<string, any> | null;
2437
+ customerId: string | null;
2438
+ customerBillingAddress: Record<string, any> | null;
2439
+ providedAmount: number;
2440
+ totalAmount: number;
2441
+ discountAmount: number;
2442
+ netAmount: number;
2443
+ taxAmount: number;
2444
+ invoiceAmountSats: number;
2445
+ invoiceScid: string | null;
2446
+ btcPrice: number;
2447
+ } | {
2448
+ currency: string;
2449
+ type: "TOP_UP";
2450
+ status: "CONFIRMED";
2451
+ products: {
2452
+ id: string;
2453
+ name: string;
2454
+ description: string | null;
2455
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2456
+ prices: {
2457
+ priceAmount: number | null;
2458
+ id: string;
2459
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2460
+ minimumAmount: number | null;
2461
+ maximumAmount: number | null;
2462
+ presetAmount: number | null;
2463
+ unitAmount: number | null;
2464
+ capAmount: number | null;
2465
+ meterId: string | null;
2466
+ }[];
2467
+ }[] | null;
2468
+ successUrl: string | null;
2469
+ allowDiscountCodes: boolean;
2470
+ customerName: string | null;
2471
+ customerEmail: string | null;
2472
+ customerIpAddress: string | null;
2473
+ customerExternalId: string | null;
2474
+ requireCustomerFields: {
2475
+ customerName?: boolean | undefined;
2476
+ customerEmail?: boolean | undefined;
2477
+ } | null;
2478
+ invoice: {
2479
+ currency: string;
2480
+ invoice: string;
2481
+ paymentHash: string;
2482
+ amountSats: number | null;
2483
+ expiresAt: Date;
2484
+ btcPrice: number | null;
2485
+ amountSatsReceived: number | null;
2486
+ fiatAmount: number | null;
2487
+ } | null;
2488
+ id: string;
2489
+ createdAt: Date;
2490
+ clientSecret: string;
2491
+ organizationId: string;
2492
+ expiresAt: Date;
2493
+ userMetadata: Record<string, any> | null;
2494
+ customFieldData: Record<string, any> | null;
2495
+ customerMetadata: Record<string, any> | null;
2496
+ customerId: string | null;
2497
+ customerBillingAddress: Record<string, any> | null;
2498
+ providedAmount: number | null;
2499
+ totalAmount: number | null;
2500
+ discountAmount: number | null;
2501
+ netAmount: number | null;
2502
+ taxAmount: number | null;
2503
+ invoiceAmountSats: number | null;
2504
+ invoiceScid: string | null;
2505
+ btcPrice: number | null;
2506
+ }>;
2507
+ export declare function payInvoice(paymentHash: string, amountSats: number): Promise<{
2508
+ ok: boolean;
2509
+ }>;
2510
+ export declare function paymentHasBeenReceived(paymentHash: string): Promise<boolean>;