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