@moneydevkit/core 0.0.1

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 (131) hide show
  1. package/dist/actions.d.ts +2510 -0
  2. package/dist/actions.js +77 -0
  3. package/dist/actions.js.map +1 -0
  4. package/dist/client-actions.d.ts +1665 -0
  5. package/dist/client-actions.js +28 -0
  6. package/dist/client-actions.js.map +1 -0
  7. package/dist/client.d.ts +4 -0
  8. package/dist/client.js +5 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/components/Checkout.d.ts +6 -0
  11. package/dist/components/Checkout.js +135 -0
  12. package/dist/components/Checkout.js.map +1 -0
  13. package/dist/components/checkout/ExpiredCheckout.d.ts +11 -0
  14. package/dist/components/checkout/ExpiredCheckout.js +24 -0
  15. package/dist/components/checkout/ExpiredCheckout.js.map +1 -0
  16. package/dist/components/checkout/PaymentReceivedCheckout.d.ts +6 -0
  17. package/dist/components/checkout/PaymentReceivedCheckout.js +25 -0
  18. package/dist/components/checkout/PaymentReceivedCheckout.js.map +1 -0
  19. package/dist/components/checkout/PendingPaymentCheckout.d.ts +9 -0
  20. package/dist/components/checkout/PendingPaymentCheckout.js +62 -0
  21. package/dist/components/checkout/PendingPaymentCheckout.js.map +1 -0
  22. package/dist/components/checkout/UnconfirmedCheckout.d.ts +9 -0
  23. package/dist/components/checkout/UnconfirmedCheckout.js +53 -0
  24. package/dist/components/checkout/UnconfirmedCheckout.js.map +1 -0
  25. package/dist/components/ui/button.d.ts +10 -0
  26. package/dist/components/ui/button.js +32 -0
  27. package/dist/components/ui/button.js.map +1 -0
  28. package/dist/components/ui/card.d.ts +9 -0
  29. package/dist/components/ui/card.js +25 -0
  30. package/dist/components/ui/card.js.map +1 -0
  31. package/dist/components/ui/collapsible.d.ts +5 -0
  32. package/dist/components/ui/collapsible.js +14 -0
  33. package/dist/components/ui/collapsible.js.map +1 -0
  34. package/dist/components/ui/dialog.d.ts +15 -0
  35. package/dist/components/ui/dialog.js +37 -0
  36. package/dist/components/ui/dialog.js.map +1 -0
  37. package/dist/components/ui/drawer.d.ts +13 -0
  38. package/dist/components/ui/drawer.js +36 -0
  39. package/dist/components/ui/drawer.js.map +1 -0
  40. package/dist/components/ui/form.d.ts +24 -0
  41. package/dist/components/ui/form.js +60 -0
  42. package/dist/components/ui/form.js.map +1 -0
  43. package/dist/components/ui/input.d.ts +3 -0
  44. package/dist/components/ui/input.js +7 -0
  45. package/dist/components/ui/input.js.map +1 -0
  46. package/dist/components/ui/label.d.ts +4 -0
  47. package/dist/components/ui/label.js +9 -0
  48. package/dist/components/ui/label.js.map +1 -0
  49. package/dist/components/ui/select.d.ts +15 -0
  50. package/dist/components/ui/select.js +39 -0
  51. package/dist/components/ui/select.js.map +1 -0
  52. package/dist/components/ui/textarea.d.ts +3 -0
  53. package/dist/components/ui/textarea.js +7 -0
  54. package/dist/components/ui/textarea.js.map +1 -0
  55. package/dist/constants.d.ts +1 -0
  56. package/dist/constants.js +2 -0
  57. package/dist/constants.js.map +1 -0
  58. package/dist/handlers/balance.d.ts +1 -0
  59. package/dist/handlers/balance.js +19 -0
  60. package/dist/handlers/balance.js.map +1 -0
  61. package/dist/handlers/checkout.d.ts +2 -0
  62. package/dist/handlers/checkout.js +62 -0
  63. package/dist/handlers/checkout.js.map +1 -0
  64. package/dist/handlers/index.d.ts +7 -0
  65. package/dist/handlers/index.js +8 -0
  66. package/dist/handlers/index.js.map +1 -0
  67. package/dist/handlers/list_channels.d.ts +1 -0
  68. package/dist/handlers/list_channels.js +15 -0
  69. package/dist/handlers/list_channels.js.map +1 -0
  70. package/dist/handlers/pay_bolt_11.d.ts +1 -0
  71. package/dist/handlers/pay_bolt_11.js +19 -0
  72. package/dist/handlers/pay_bolt_11.js.map +1 -0
  73. package/dist/handlers/pay_bolt_12.d.ts +1 -0
  74. package/dist/handlers/pay_bolt_12.js +25 -0
  75. package/dist/handlers/pay_bolt_12.js.map +1 -0
  76. package/dist/handlers/pay_ln_url.d.ts +1 -0
  77. package/dist/handlers/pay_ln_url.js +25 -0
  78. package/dist/handlers/pay_ln_url.js.map +1 -0
  79. package/dist/handlers/ping.d.ts +1 -0
  80. package/dist/handlers/ping.js +13 -0
  81. package/dist/handlers/ping.js.map +1 -0
  82. package/dist/handlers/webhooks.d.ts +1 -0
  83. package/dist/handlers/webhooks.js +45 -0
  84. package/dist/handlers/webhooks.js.map +1 -0
  85. package/dist/hooks/useCheckout.d.ts +5 -0
  86. package/dist/hooks/useCheckout.js +26 -0
  87. package/dist/hooks/useCheckout.js.map +1 -0
  88. package/dist/hooks/useCheckoutSuccess.d.ts +5 -0
  89. package/dist/hooks/useCheckoutSuccess.js +69 -0
  90. package/dist/hooks/useCheckoutSuccess.js.map +1 -0
  91. package/dist/index.d.ts +9 -0
  92. package/dist/index.js +10 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/lib/utils.d.ts +2 -0
  95. package/dist/lib/utils.js +6 -0
  96. package/dist/lib/utils.js.map +1 -0
  97. package/dist/lightning-logs.d.ts +5 -0
  98. package/dist/lightning-logs.js +170 -0
  99. package/dist/lightning-logs.js.map +1 -0
  100. package/dist/lightning-node.d.ts +42 -0
  101. package/dist/lightning-node.js +141 -0
  102. package/dist/lightning-node.js.map +1 -0
  103. package/dist/logging.d.ts +3 -0
  104. package/dist/logging.js +17 -0
  105. package/dist/logging.js.map +1 -0
  106. package/dist/mdk-client.d.ts +3341 -0
  107. package/dist/mdk-client.js +39 -0
  108. package/dist/mdk-client.js.map +1 -0
  109. package/dist/mdk-config.d.ts +18 -0
  110. package/dist/mdk-config.js +19 -0
  111. package/dist/mdk-config.js.map +1 -0
  112. package/dist/mdk-styles.css +2436 -0
  113. package/dist/mdk.d.ts +6 -0
  114. package/dist/mdk.js +69 -0
  115. package/dist/mdk.js.map +1 -0
  116. package/dist/money-dev-kit.d.ts +11 -0
  117. package/dist/money-dev-kit.js +3 -0
  118. package/dist/money-dev-kit.js.map +1 -0
  119. package/dist/payment-state.d.ts +3 -0
  120. package/dist/payment-state.js +32 -0
  121. package/dist/payment-state.js.map +1 -0
  122. package/dist/providers.d.ts +7 -0
  123. package/dist/providers.js +16 -0
  124. package/dist/providers.js.map +1 -0
  125. package/dist/route.d.ts +9 -0
  126. package/dist/route.js +133 -0
  127. package/dist/route.js.map +1 -0
  128. package/dist/undici-dispatcher.d.ts +4 -0
  129. package/dist/undici-dispatcher.js +13 -0
  130. package/dist/undici-dispatcher.js.map +1 -0
  131. package/package.json +71 -0
@@ -0,0 +1,1665 @@
1
+ import type { CreateCheckoutParams } from './actions';
2
+ export declare function clientCreateCheckout(params: CreateCheckoutParams): 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 clientGetCheckout(checkoutId: string): 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
+ }>;