@moneydevkit/nextjs 0.1.1 → 0.1.3

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 (66) hide show
  1. package/README.md +2 -2
  2. package/dist/components/Checkout.d.ts +1 -7
  3. package/dist/components/Checkout.js +47 -58
  4. package/dist/components/Checkout.js.map +1 -1
  5. package/dist/components/checkout/ExpiredCheckout.d.ts +2 -1
  6. package/dist/components/checkout/ExpiredCheckout.js +2 -2
  7. package/dist/components/checkout/ExpiredCheckout.js.map +1 -1
  8. package/dist/components/checkout/PaymentReceivedCheckout.d.ts +1 -1
  9. package/dist/components/checkout/PaymentReceivedCheckout.js +1 -6
  10. package/dist/components/checkout/PaymentReceivedCheckout.js.map +1 -1
  11. package/dist/components/checkout/PendingPaymentCheckout.js +2 -8
  12. package/dist/components/checkout/PendingPaymentCheckout.js.map +1 -1
  13. package/dist/hooks/useCheckout.d.ts +1 -15
  14. package/dist/hooks/useCheckout.js +6 -21
  15. package/dist/hooks/useCheckout.js.map +1 -1
  16. package/dist/index.d.ts +1 -2
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/next-plugin.d.ts +0 -6
  20. package/dist/next-plugin.js +2 -19
  21. package/dist/next-plugin.js.map +1 -1
  22. package/dist/server/actions.d.ts +5 -2
  23. package/dist/server/actions.js +26 -19
  24. package/dist/server/actions.js.map +1 -1
  25. package/dist/server/handlers/balance.js +3 -3
  26. package/dist/server/handlers/balance.js.map +1 -1
  27. package/dist/server/handlers/list_channels.d.ts +1 -0
  28. package/dist/server/handlers/list_channels.js +15 -0
  29. package/dist/server/handlers/list_channels.js.map +1 -0
  30. package/dist/server/handlers/pay_bolt_11.d.ts +1 -0
  31. package/dist/server/handlers/pay_bolt_11.js +19 -0
  32. package/dist/server/handlers/pay_bolt_11.js.map +1 -0
  33. package/dist/server/handlers/pay_bolt_12.js +3 -3
  34. package/dist/server/handlers/pay_bolt_12.js.map +1 -1
  35. package/dist/server/handlers/pay_ln_url.d.ts +1 -0
  36. package/dist/server/handlers/pay_ln_url.js +25 -0
  37. package/dist/server/handlers/pay_ln_url.js.map +1 -0
  38. package/dist/server/handlers/ping.js +3 -3
  39. package/dist/server/handlers/ping.js.map +1 -1
  40. package/dist/server/handlers/webhooks.js +5 -4
  41. package/dist/server/handlers/webhooks.js.map +1 -1
  42. package/dist/server/lightning-node.d.ts +43 -0
  43. package/dist/server/lightning-node.js +140 -0
  44. package/dist/server/lightning-node.js.map +1 -0
  45. package/dist/server/mdk-client.d.ts +3342 -0
  46. package/dist/server/mdk-client.js +38 -0
  47. package/dist/server/mdk-client.js.map +1 -0
  48. package/dist/server/mdk-config.d.ts +18 -0
  49. package/dist/server/mdk-config.js +19 -0
  50. package/dist/server/mdk-config.js.map +1 -0
  51. package/dist/server/mdk.d.ts +5 -6
  52. package/dist/server/mdk.js +28 -40
  53. package/dist/server/mdk.js.map +1 -1
  54. package/dist/server/money-dev-kit.d.ts +6 -3369
  55. package/dist/server/money-dev-kit.js +2 -164
  56. package/dist/server/money-dev-kit.js.map +1 -1
  57. package/dist/server/route.d.ts +1 -1
  58. package/dist/server/route.js +7 -1
  59. package/dist/server/route.js.map +1 -1
  60. package/dist/server/runtime.d.ts +2 -2
  61. package/dist/server/runtime.js +2 -2
  62. package/dist/server/runtime.js.map +1 -1
  63. package/dist/server/undici-dispatcher.d.ts +4 -0
  64. package/dist/server/undici-dispatcher.js +13 -0
  65. package/dist/server/undici-dispatcher.js.map +1 -0
  66. package/package.json +5 -4
@@ -0,0 +1,3342 @@
1
+ import './undici-dispatcher';
2
+ export type MoneyDevKitClientOptions = {
3
+ accessToken: string;
4
+ baseUrl: string;
5
+ };
6
+ export declare class MoneyDevKitClient {
7
+ private client;
8
+ constructor(options: MoneyDevKitClientOptions);
9
+ get checkouts(): {
10
+ get: (params: Parameters<typeof this.client.checkout.get>[0]) => Promise<{
11
+ id: string;
12
+ type: "PRODUCTS";
13
+ status: "UNCONFIRMED";
14
+ createdAt: Date;
15
+ clientSecret: string;
16
+ organizationId: string;
17
+ expiresAt: Date;
18
+ userMetadata: Record<string, any> | null;
19
+ customFieldData: Record<string, any> | null;
20
+ customerMetadata: Record<string, any> | null;
21
+ currency: string;
22
+ allowDiscountCodes: boolean;
23
+ customerName: string | null;
24
+ customerEmail: string | null;
25
+ requireCustomerFields: {
26
+ customerName?: boolean | undefined;
27
+ customerEmail?: boolean | undefined;
28
+ } | null;
29
+ successUrl: string | null;
30
+ customerId: string | null;
31
+ customerExternalId: string | null;
32
+ customerIpAddress: string | null;
33
+ customerBillingAddress: Record<string, any> | null;
34
+ products: [{
35
+ id: string;
36
+ name: string;
37
+ description: string | null;
38
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
39
+ prices: {
40
+ id: string;
41
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
42
+ priceAmount: number | null;
43
+ minimumAmount: number | null;
44
+ maximumAmount: number | null;
45
+ presetAmount: number | null;
46
+ unitAmount: number | null;
47
+ capAmount: number | null;
48
+ meterId: string | null;
49
+ }[];
50
+ }, ...{
51
+ id: string;
52
+ name: string;
53
+ description: string | null;
54
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
55
+ prices: {
56
+ id: string;
57
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
58
+ priceAmount: number | null;
59
+ minimumAmount: number | null;
60
+ maximumAmount: number | null;
61
+ presetAmount: number | null;
62
+ unitAmount: number | null;
63
+ capAmount: number | null;
64
+ meterId: string | null;
65
+ }[];
66
+ }[]];
67
+ providedAmount: number | null;
68
+ totalAmount: number | null;
69
+ discountAmount: number | null;
70
+ netAmount: number | null;
71
+ taxAmount: number | null;
72
+ invoiceAmountSats: number | null;
73
+ invoiceScid: string | null;
74
+ btcPrice: number | null;
75
+ invoice: {
76
+ expiresAt: Date;
77
+ currency: string;
78
+ btcPrice: number | null;
79
+ invoice: string;
80
+ paymentHash: string;
81
+ amountSats: number | null;
82
+ amountSatsReceived: number | null;
83
+ fiatAmount: number | null;
84
+ } | null;
85
+ } | {
86
+ id: string;
87
+ type: "AMOUNT";
88
+ status: "UNCONFIRMED";
89
+ createdAt: Date;
90
+ clientSecret: string;
91
+ organizationId: string;
92
+ expiresAt: Date;
93
+ userMetadata: Record<string, any> | null;
94
+ customFieldData: Record<string, any> | null;
95
+ customerMetadata: Record<string, any> | null;
96
+ currency: string;
97
+ allowDiscountCodes: boolean;
98
+ customerName: string | null;
99
+ customerEmail: string | null;
100
+ requireCustomerFields: {
101
+ customerName?: boolean | undefined;
102
+ customerEmail?: boolean | undefined;
103
+ } | null;
104
+ successUrl: string | null;
105
+ customerId: string | null;
106
+ customerExternalId: string | null;
107
+ customerIpAddress: string | null;
108
+ customerBillingAddress: Record<string, any> | null;
109
+ products: {
110
+ id: string;
111
+ name: string;
112
+ description: string | null;
113
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
114
+ prices: {
115
+ id: string;
116
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
117
+ priceAmount: number | null;
118
+ minimumAmount: number | null;
119
+ maximumAmount: number | null;
120
+ presetAmount: number | null;
121
+ unitAmount: number | null;
122
+ capAmount: number | null;
123
+ meterId: string | null;
124
+ }[];
125
+ }[] | null;
126
+ providedAmount: number;
127
+ totalAmount: number | null;
128
+ discountAmount: number | null;
129
+ netAmount: number | null;
130
+ taxAmount: number | null;
131
+ invoiceAmountSats: number | null;
132
+ invoiceScid: string | null;
133
+ btcPrice: number | null;
134
+ invoice: {
135
+ expiresAt: Date;
136
+ currency: string;
137
+ btcPrice: number | null;
138
+ invoice: string;
139
+ paymentHash: string;
140
+ amountSats: number | null;
141
+ amountSatsReceived: number | null;
142
+ fiatAmount: number | null;
143
+ } | null;
144
+ } | {
145
+ id: string;
146
+ type: "TOP_UP";
147
+ status: "UNCONFIRMED";
148
+ createdAt: Date;
149
+ clientSecret: string;
150
+ organizationId: string;
151
+ expiresAt: Date;
152
+ userMetadata: Record<string, any> | null;
153
+ customFieldData: Record<string, any> | null;
154
+ customerMetadata: Record<string, any> | null;
155
+ currency: string;
156
+ allowDiscountCodes: boolean;
157
+ customerName: string | null;
158
+ customerEmail: string | null;
159
+ requireCustomerFields: {
160
+ customerName?: boolean | undefined;
161
+ customerEmail?: boolean | undefined;
162
+ } | null;
163
+ successUrl: string | null;
164
+ customerId: string | null;
165
+ customerExternalId: string | null;
166
+ customerIpAddress: string | null;
167
+ customerBillingAddress: Record<string, any> | null;
168
+ products: {
169
+ id: string;
170
+ name: string;
171
+ description: string | null;
172
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
173
+ prices: {
174
+ id: string;
175
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
176
+ priceAmount: number | null;
177
+ minimumAmount: number | null;
178
+ maximumAmount: number | null;
179
+ presetAmount: number | null;
180
+ unitAmount: number | null;
181
+ capAmount: number | null;
182
+ meterId: string | null;
183
+ }[];
184
+ }[] | null;
185
+ providedAmount: number | null;
186
+ totalAmount: number | null;
187
+ discountAmount: number | null;
188
+ netAmount: number | null;
189
+ taxAmount: number | null;
190
+ invoiceAmountSats: number | null;
191
+ invoiceScid: string | null;
192
+ btcPrice: number | null;
193
+ invoice: {
194
+ expiresAt: Date;
195
+ currency: string;
196
+ btcPrice: number | null;
197
+ invoice: string;
198
+ paymentHash: string;
199
+ amountSats: number | null;
200
+ amountSatsReceived: number | null;
201
+ fiatAmount: number | null;
202
+ } | null;
203
+ } | {
204
+ id: string;
205
+ type: "PRODUCTS";
206
+ status: "CONFIRMED";
207
+ createdAt: Date;
208
+ clientSecret: string;
209
+ organizationId: string;
210
+ expiresAt: Date;
211
+ userMetadata: Record<string, any> | null;
212
+ customFieldData: Record<string, any> | null;
213
+ customerMetadata: Record<string, any> | null;
214
+ currency: string;
215
+ allowDiscountCodes: boolean;
216
+ customerName: string | null;
217
+ customerEmail: string | null;
218
+ requireCustomerFields: {
219
+ customerName?: boolean | undefined;
220
+ customerEmail?: boolean | undefined;
221
+ } | null;
222
+ successUrl: string | null;
223
+ customerId: string | null;
224
+ customerExternalId: string | null;
225
+ customerIpAddress: string | null;
226
+ customerBillingAddress: Record<string, any> | null;
227
+ products: [{
228
+ id: string;
229
+ name: string;
230
+ description: string | null;
231
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
232
+ prices: {
233
+ id: string;
234
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
235
+ priceAmount: number | null;
236
+ minimumAmount: number | null;
237
+ maximumAmount: number | null;
238
+ presetAmount: number | null;
239
+ unitAmount: number | null;
240
+ capAmount: number | null;
241
+ meterId: string | null;
242
+ }[];
243
+ }, ...{
244
+ id: string;
245
+ name: string;
246
+ description: string | null;
247
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
248
+ prices: {
249
+ id: string;
250
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
251
+ priceAmount: number | null;
252
+ minimumAmount: number | null;
253
+ maximumAmount: number | null;
254
+ presetAmount: number | null;
255
+ unitAmount: number | null;
256
+ capAmount: number | null;
257
+ meterId: string | null;
258
+ }[];
259
+ }[]];
260
+ providedAmount: number | null;
261
+ totalAmount: number;
262
+ discountAmount: number;
263
+ netAmount: number;
264
+ taxAmount: number;
265
+ invoiceAmountSats: number;
266
+ invoiceScid: string | null;
267
+ btcPrice: number;
268
+ invoice: {
269
+ expiresAt: Date;
270
+ currency: string;
271
+ btcPrice: number | null;
272
+ invoice: string;
273
+ paymentHash: string;
274
+ amountSats: number | null;
275
+ amountSatsReceived: number | null;
276
+ fiatAmount: number | null;
277
+ } | null;
278
+ } | {
279
+ id: string;
280
+ type: "AMOUNT";
281
+ status: "CONFIRMED";
282
+ createdAt: Date;
283
+ clientSecret: string;
284
+ organizationId: string;
285
+ expiresAt: Date;
286
+ userMetadata: Record<string, any> | null;
287
+ customFieldData: Record<string, any> | null;
288
+ customerMetadata: Record<string, any> | null;
289
+ currency: string;
290
+ allowDiscountCodes: boolean;
291
+ customerName: string | null;
292
+ customerEmail: string | null;
293
+ requireCustomerFields: {
294
+ customerName?: boolean | undefined;
295
+ customerEmail?: boolean | undefined;
296
+ } | null;
297
+ successUrl: string | null;
298
+ customerId: string | null;
299
+ customerExternalId: string | null;
300
+ customerIpAddress: string | null;
301
+ customerBillingAddress: Record<string, any> | null;
302
+ products: {
303
+ id: string;
304
+ name: string;
305
+ description: string | null;
306
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
307
+ prices: {
308
+ id: string;
309
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
310
+ priceAmount: number | null;
311
+ minimumAmount: number | null;
312
+ maximumAmount: number | null;
313
+ presetAmount: number | null;
314
+ unitAmount: number | null;
315
+ capAmount: number | null;
316
+ meterId: string | null;
317
+ }[];
318
+ }[] | null;
319
+ providedAmount: number;
320
+ totalAmount: number;
321
+ discountAmount: number;
322
+ netAmount: number;
323
+ taxAmount: number;
324
+ invoiceAmountSats: number;
325
+ invoiceScid: string | null;
326
+ btcPrice: number;
327
+ invoice: {
328
+ expiresAt: Date;
329
+ currency: string;
330
+ btcPrice: number | null;
331
+ invoice: string;
332
+ paymentHash: string;
333
+ amountSats: number | null;
334
+ amountSatsReceived: number | null;
335
+ fiatAmount: number | null;
336
+ } | null;
337
+ } | {
338
+ id: string;
339
+ type: "TOP_UP";
340
+ status: "CONFIRMED";
341
+ createdAt: Date;
342
+ clientSecret: string;
343
+ organizationId: string;
344
+ expiresAt: Date;
345
+ userMetadata: Record<string, any> | null;
346
+ customFieldData: Record<string, any> | null;
347
+ customerMetadata: Record<string, any> | null;
348
+ currency: string;
349
+ allowDiscountCodes: boolean;
350
+ customerName: string | null;
351
+ customerEmail: string | null;
352
+ requireCustomerFields: {
353
+ customerName?: boolean | undefined;
354
+ customerEmail?: boolean | undefined;
355
+ } | null;
356
+ successUrl: string | null;
357
+ customerId: string | null;
358
+ customerExternalId: string | null;
359
+ customerIpAddress: string | null;
360
+ customerBillingAddress: Record<string, any> | null;
361
+ products: {
362
+ id: string;
363
+ name: string;
364
+ description: string | null;
365
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
366
+ prices: {
367
+ id: string;
368
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
369
+ priceAmount: number | null;
370
+ minimumAmount: number | null;
371
+ maximumAmount: number | null;
372
+ presetAmount: number | null;
373
+ unitAmount: number | null;
374
+ capAmount: number | null;
375
+ meterId: string | null;
376
+ }[];
377
+ }[] | null;
378
+ providedAmount: number | null;
379
+ totalAmount: number | null;
380
+ discountAmount: number | null;
381
+ netAmount: number | null;
382
+ taxAmount: number | null;
383
+ invoiceAmountSats: number | null;
384
+ invoiceScid: string | null;
385
+ btcPrice: number | null;
386
+ invoice: {
387
+ expiresAt: Date;
388
+ currency: string;
389
+ btcPrice: number | null;
390
+ invoice: string;
391
+ paymentHash: string;
392
+ amountSats: number | null;
393
+ amountSatsReceived: number | null;
394
+ fiatAmount: number | null;
395
+ } | null;
396
+ } | {
397
+ id: string;
398
+ type: "PRODUCTS";
399
+ status: "PENDING_PAYMENT";
400
+ createdAt: Date;
401
+ clientSecret: string;
402
+ organizationId: string;
403
+ expiresAt: Date;
404
+ userMetadata: Record<string, any> | null;
405
+ customFieldData: Record<string, any> | null;
406
+ customerMetadata: Record<string, any> | null;
407
+ currency: string;
408
+ allowDiscountCodes: boolean;
409
+ customerName: string | null;
410
+ customerEmail: string | null;
411
+ requireCustomerFields: {
412
+ customerName?: boolean | undefined;
413
+ customerEmail?: boolean | undefined;
414
+ } | null;
415
+ successUrl: string | null;
416
+ customerId: string | null;
417
+ customerExternalId: string | null;
418
+ customerIpAddress: string | null;
419
+ customerBillingAddress: Record<string, any> | null;
420
+ products: [{
421
+ id: string;
422
+ name: string;
423
+ description: string | null;
424
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
425
+ prices: {
426
+ id: string;
427
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
428
+ priceAmount: number | null;
429
+ minimumAmount: number | null;
430
+ maximumAmount: number | null;
431
+ presetAmount: number | null;
432
+ unitAmount: number | null;
433
+ capAmount: number | null;
434
+ meterId: string | null;
435
+ }[];
436
+ }, ...{
437
+ id: string;
438
+ name: string;
439
+ description: string | null;
440
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
441
+ prices: {
442
+ id: string;
443
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
444
+ priceAmount: number | null;
445
+ minimumAmount: number | null;
446
+ maximumAmount: number | null;
447
+ presetAmount: number | null;
448
+ unitAmount: number | null;
449
+ capAmount: number | null;
450
+ meterId: string | null;
451
+ }[];
452
+ }[]];
453
+ providedAmount: number | null;
454
+ totalAmount: number;
455
+ discountAmount: number;
456
+ netAmount: number;
457
+ taxAmount: number;
458
+ invoiceAmountSats: number;
459
+ invoiceScid: string | null;
460
+ btcPrice: number;
461
+ invoice: {
462
+ expiresAt: Date;
463
+ currency: string;
464
+ btcPrice: number;
465
+ invoice: string;
466
+ paymentHash: string;
467
+ amountSats: number;
468
+ amountSatsReceived: number | null;
469
+ fiatAmount: number;
470
+ };
471
+ } | {
472
+ id: string;
473
+ type: "AMOUNT";
474
+ status: "PENDING_PAYMENT";
475
+ createdAt: Date;
476
+ clientSecret: string;
477
+ organizationId: string;
478
+ expiresAt: Date;
479
+ userMetadata: Record<string, any> | null;
480
+ customFieldData: Record<string, any> | null;
481
+ customerMetadata: Record<string, any> | null;
482
+ currency: string;
483
+ allowDiscountCodes: boolean;
484
+ customerName: string | null;
485
+ customerEmail: string | null;
486
+ requireCustomerFields: {
487
+ customerName?: boolean | undefined;
488
+ customerEmail?: boolean | undefined;
489
+ } | null;
490
+ successUrl: string | null;
491
+ customerId: string | null;
492
+ customerExternalId: string | null;
493
+ customerIpAddress: string | null;
494
+ customerBillingAddress: Record<string, any> | null;
495
+ products: {
496
+ id: string;
497
+ name: string;
498
+ description: string | null;
499
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
500
+ prices: {
501
+ id: string;
502
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
503
+ priceAmount: number | null;
504
+ minimumAmount: number | null;
505
+ maximumAmount: number | null;
506
+ presetAmount: number | null;
507
+ unitAmount: number | null;
508
+ capAmount: number | null;
509
+ meterId: string | null;
510
+ }[];
511
+ }[] | null;
512
+ providedAmount: number;
513
+ totalAmount: number;
514
+ discountAmount: number;
515
+ netAmount: number;
516
+ taxAmount: number;
517
+ invoiceAmountSats: number;
518
+ invoiceScid: string | null;
519
+ btcPrice: number;
520
+ invoice: {
521
+ expiresAt: Date;
522
+ currency: string;
523
+ btcPrice: number;
524
+ invoice: string;
525
+ paymentHash: string;
526
+ amountSats: number;
527
+ amountSatsReceived: number | null;
528
+ fiatAmount: number;
529
+ };
530
+ } | {
531
+ id: string;
532
+ type: "TOP_UP";
533
+ status: "PENDING_PAYMENT";
534
+ createdAt: Date;
535
+ clientSecret: string;
536
+ organizationId: string;
537
+ expiresAt: Date;
538
+ userMetadata: Record<string, any> | null;
539
+ customFieldData: Record<string, any> | null;
540
+ customerMetadata: Record<string, any> | null;
541
+ currency: string;
542
+ allowDiscountCodes: boolean;
543
+ customerName: string | null;
544
+ customerEmail: string | null;
545
+ requireCustomerFields: {
546
+ customerName?: boolean | undefined;
547
+ customerEmail?: boolean | undefined;
548
+ } | null;
549
+ successUrl: string | null;
550
+ customerId: string | null;
551
+ customerExternalId: string | null;
552
+ customerIpAddress: string | null;
553
+ customerBillingAddress: Record<string, any> | null;
554
+ products: {
555
+ id: string;
556
+ name: string;
557
+ description: string | null;
558
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
559
+ prices: {
560
+ id: string;
561
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
562
+ priceAmount: number | null;
563
+ minimumAmount: number | null;
564
+ maximumAmount: number | null;
565
+ presetAmount: number | null;
566
+ unitAmount: number | null;
567
+ capAmount: number | null;
568
+ meterId: string | null;
569
+ }[];
570
+ }[] | null;
571
+ providedAmount: number | null;
572
+ totalAmount: number | null;
573
+ discountAmount: number | null;
574
+ netAmount: number | null;
575
+ taxAmount: number | null;
576
+ invoiceAmountSats: number | null;
577
+ invoiceScid: string | null;
578
+ btcPrice: number | null;
579
+ invoice: {
580
+ expiresAt: Date;
581
+ currency: string;
582
+ btcPrice: number | null;
583
+ invoice: string;
584
+ paymentHash: string;
585
+ amountSats: number | null;
586
+ amountSatsReceived: number | null;
587
+ fiatAmount: number | null;
588
+ };
589
+ } | {
590
+ id: string;
591
+ type: "PRODUCTS";
592
+ status: "PAYMENT_RECEIVED";
593
+ createdAt: Date;
594
+ clientSecret: string;
595
+ organizationId: string;
596
+ expiresAt: Date;
597
+ userMetadata: Record<string, any> | null;
598
+ customFieldData: Record<string, any> | null;
599
+ customerMetadata: Record<string, any> | null;
600
+ currency: string;
601
+ allowDiscountCodes: boolean;
602
+ customerName: string | null;
603
+ customerEmail: string | null;
604
+ requireCustomerFields: {
605
+ customerName?: boolean | undefined;
606
+ customerEmail?: boolean | undefined;
607
+ } | null;
608
+ successUrl: string | null;
609
+ customerId: string | null;
610
+ customerExternalId: string | null;
611
+ customerIpAddress: string | null;
612
+ customerBillingAddress: Record<string, any> | null;
613
+ products: [{
614
+ id: string;
615
+ name: string;
616
+ description: string | null;
617
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
618
+ prices: {
619
+ id: string;
620
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
621
+ priceAmount: number | null;
622
+ minimumAmount: number | null;
623
+ maximumAmount: number | null;
624
+ presetAmount: number | null;
625
+ unitAmount: number | null;
626
+ capAmount: number | null;
627
+ meterId: string | null;
628
+ }[];
629
+ }, ...{
630
+ id: string;
631
+ name: string;
632
+ description: string | null;
633
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
634
+ prices: {
635
+ id: string;
636
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
637
+ priceAmount: number | null;
638
+ minimumAmount: number | null;
639
+ maximumAmount: number | null;
640
+ presetAmount: number | null;
641
+ unitAmount: number | null;
642
+ capAmount: number | null;
643
+ meterId: string | null;
644
+ }[];
645
+ }[]];
646
+ providedAmount: number | null;
647
+ totalAmount: number;
648
+ discountAmount: number;
649
+ netAmount: number;
650
+ taxAmount: number;
651
+ invoiceAmountSats: number;
652
+ invoiceScid: string | null;
653
+ btcPrice: number;
654
+ invoice: {
655
+ expiresAt: Date;
656
+ currency: string;
657
+ btcPrice: number;
658
+ invoice: string;
659
+ paymentHash: string;
660
+ amountSats: number;
661
+ amountSatsReceived: number;
662
+ fiatAmount: number;
663
+ };
664
+ } | {
665
+ id: string;
666
+ type: "AMOUNT";
667
+ status: "PAYMENT_RECEIVED";
668
+ createdAt: Date;
669
+ clientSecret: string;
670
+ organizationId: string;
671
+ expiresAt: Date;
672
+ userMetadata: Record<string, any> | null;
673
+ customFieldData: Record<string, any> | null;
674
+ customerMetadata: Record<string, any> | null;
675
+ currency: string;
676
+ allowDiscountCodes: boolean;
677
+ customerName: string | null;
678
+ customerEmail: string | null;
679
+ requireCustomerFields: {
680
+ customerName?: boolean | undefined;
681
+ customerEmail?: boolean | undefined;
682
+ } | null;
683
+ successUrl: string | null;
684
+ customerId: string | null;
685
+ customerExternalId: string | null;
686
+ customerIpAddress: string | null;
687
+ customerBillingAddress: Record<string, any> | null;
688
+ products: {
689
+ id: string;
690
+ name: string;
691
+ description: string | null;
692
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
693
+ prices: {
694
+ id: string;
695
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
696
+ priceAmount: number | null;
697
+ minimumAmount: number | null;
698
+ maximumAmount: number | null;
699
+ presetAmount: number | null;
700
+ unitAmount: number | null;
701
+ capAmount: number | null;
702
+ meterId: string | null;
703
+ }[];
704
+ }[] | null;
705
+ providedAmount: number;
706
+ totalAmount: number;
707
+ discountAmount: number;
708
+ netAmount: number;
709
+ taxAmount: number;
710
+ invoiceAmountSats: number;
711
+ invoiceScid: string | null;
712
+ btcPrice: number;
713
+ invoice: {
714
+ expiresAt: Date;
715
+ currency: string;
716
+ btcPrice: number;
717
+ invoice: string;
718
+ paymentHash: string;
719
+ amountSats: number;
720
+ amountSatsReceived: number;
721
+ fiatAmount: number;
722
+ };
723
+ } | {
724
+ id: string;
725
+ type: "TOP_UP";
726
+ status: "PAYMENT_RECEIVED";
727
+ createdAt: Date;
728
+ clientSecret: string;
729
+ organizationId: string;
730
+ expiresAt: Date;
731
+ userMetadata: Record<string, any> | null;
732
+ customFieldData: Record<string, any> | null;
733
+ customerMetadata: Record<string, any> | null;
734
+ currency: string;
735
+ allowDiscountCodes: boolean;
736
+ customerName: string | null;
737
+ customerEmail: string | null;
738
+ requireCustomerFields: {
739
+ customerName?: boolean | undefined;
740
+ customerEmail?: boolean | undefined;
741
+ } | null;
742
+ successUrl: string | null;
743
+ customerId: string | null;
744
+ customerExternalId: string | null;
745
+ customerIpAddress: string | null;
746
+ customerBillingAddress: Record<string, any> | null;
747
+ products: {
748
+ id: string;
749
+ name: string;
750
+ description: string | null;
751
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
752
+ prices: {
753
+ id: string;
754
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
755
+ priceAmount: number | null;
756
+ minimumAmount: number | null;
757
+ maximumAmount: number | null;
758
+ presetAmount: number | null;
759
+ unitAmount: number | null;
760
+ capAmount: number | null;
761
+ meterId: string | null;
762
+ }[];
763
+ }[] | null;
764
+ providedAmount: number | null;
765
+ totalAmount: number;
766
+ discountAmount: number;
767
+ netAmount: number;
768
+ taxAmount: number;
769
+ invoiceAmountSats: number;
770
+ invoiceScid: string | null;
771
+ btcPrice: number;
772
+ invoice: {
773
+ expiresAt: Date;
774
+ currency: string;
775
+ btcPrice: number;
776
+ invoice: string;
777
+ paymentHash: string;
778
+ amountSats: number;
779
+ amountSatsReceived: number;
780
+ fiatAmount: number;
781
+ };
782
+ } | {
783
+ id: string;
784
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
785
+ status: "EXPIRED";
786
+ createdAt: Date;
787
+ clientSecret: string;
788
+ organizationId: string;
789
+ expiresAt: Date;
790
+ userMetadata: Record<string, any> | null;
791
+ customFieldData: Record<string, any> | null;
792
+ customerMetadata: Record<string, any> | null;
793
+ currency: string;
794
+ allowDiscountCodes: boolean;
795
+ customerName: string | null;
796
+ customerEmail: string | null;
797
+ requireCustomerFields: {
798
+ customerName?: boolean | undefined;
799
+ customerEmail?: boolean | undefined;
800
+ } | null;
801
+ successUrl: string | null;
802
+ customerId: string | null;
803
+ customerExternalId: string | null;
804
+ customerIpAddress: string | null;
805
+ customerBillingAddress: Record<string, any> | null;
806
+ products: {
807
+ id: string;
808
+ name: string;
809
+ description: string | null;
810
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
811
+ prices: {
812
+ id: string;
813
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
814
+ priceAmount: number | null;
815
+ minimumAmount: number | null;
816
+ maximumAmount: number | null;
817
+ presetAmount: number | null;
818
+ unitAmount: number | null;
819
+ capAmount: number | null;
820
+ meterId: string | null;
821
+ }[];
822
+ }[] | null;
823
+ providedAmount: number | null;
824
+ totalAmount: number | null;
825
+ discountAmount: number | null;
826
+ netAmount: number | null;
827
+ taxAmount: number | null;
828
+ invoiceAmountSats: number | null;
829
+ invoiceScid: string | null;
830
+ btcPrice: number | null;
831
+ invoice: {
832
+ expiresAt: Date;
833
+ currency: string;
834
+ btcPrice: number | null;
835
+ invoice: string;
836
+ paymentHash: string;
837
+ amountSats: number | null;
838
+ amountSatsReceived: number | null;
839
+ fiatAmount: number | null;
840
+ } | null;
841
+ }>;
842
+ create: (fields: Omit<Parameters<typeof this.client.checkout.create>[0], "nodeId">, nodeId: string) => Promise<{
843
+ id: string;
844
+ type: "PRODUCTS";
845
+ status: "UNCONFIRMED";
846
+ createdAt: Date;
847
+ clientSecret: string;
848
+ organizationId: string;
849
+ expiresAt: Date;
850
+ userMetadata: Record<string, any> | null;
851
+ customFieldData: Record<string, any> | null;
852
+ customerMetadata: Record<string, any> | null;
853
+ currency: string;
854
+ allowDiscountCodes: boolean;
855
+ customerName: string | null;
856
+ customerEmail: string | null;
857
+ requireCustomerFields: {
858
+ customerName?: boolean | undefined;
859
+ customerEmail?: boolean | undefined;
860
+ } | null;
861
+ successUrl: string | null;
862
+ customerId: string | null;
863
+ customerExternalId: string | null;
864
+ customerIpAddress: string | null;
865
+ customerBillingAddress: Record<string, any> | null;
866
+ products: [{
867
+ id: string;
868
+ name: string;
869
+ description: string | null;
870
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
871
+ prices: {
872
+ id: string;
873
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
874
+ priceAmount: number | null;
875
+ minimumAmount: number | null;
876
+ maximumAmount: number | null;
877
+ presetAmount: number | null;
878
+ unitAmount: number | null;
879
+ capAmount: number | null;
880
+ meterId: string | null;
881
+ }[];
882
+ }, ...{
883
+ id: string;
884
+ name: string;
885
+ description: string | null;
886
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
887
+ prices: {
888
+ id: string;
889
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
890
+ priceAmount: number | null;
891
+ minimumAmount: number | null;
892
+ maximumAmount: number | null;
893
+ presetAmount: number | null;
894
+ unitAmount: number | null;
895
+ capAmount: number | null;
896
+ meterId: string | null;
897
+ }[];
898
+ }[]];
899
+ providedAmount: number | null;
900
+ totalAmount: number | null;
901
+ discountAmount: number | null;
902
+ netAmount: number | null;
903
+ taxAmount: number | null;
904
+ invoiceAmountSats: number | null;
905
+ invoiceScid: string | null;
906
+ btcPrice: number | null;
907
+ invoice: {
908
+ expiresAt: Date;
909
+ currency: string;
910
+ btcPrice: number | null;
911
+ invoice: string;
912
+ paymentHash: string;
913
+ amountSats: number | null;
914
+ amountSatsReceived: number | null;
915
+ fiatAmount: number | null;
916
+ } | null;
917
+ } | {
918
+ id: string;
919
+ type: "AMOUNT";
920
+ status: "UNCONFIRMED";
921
+ createdAt: Date;
922
+ clientSecret: string;
923
+ organizationId: string;
924
+ expiresAt: Date;
925
+ userMetadata: Record<string, any> | null;
926
+ customFieldData: Record<string, any> | null;
927
+ customerMetadata: Record<string, any> | null;
928
+ currency: string;
929
+ allowDiscountCodes: boolean;
930
+ customerName: string | null;
931
+ customerEmail: string | null;
932
+ requireCustomerFields: {
933
+ customerName?: boolean | undefined;
934
+ customerEmail?: boolean | undefined;
935
+ } | null;
936
+ successUrl: string | null;
937
+ customerId: string | null;
938
+ customerExternalId: string | null;
939
+ customerIpAddress: string | null;
940
+ customerBillingAddress: Record<string, any> | null;
941
+ products: {
942
+ id: string;
943
+ name: string;
944
+ description: string | null;
945
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
946
+ prices: {
947
+ id: string;
948
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
949
+ priceAmount: number | null;
950
+ minimumAmount: number | null;
951
+ maximumAmount: number | null;
952
+ presetAmount: number | null;
953
+ unitAmount: number | null;
954
+ capAmount: number | null;
955
+ meterId: string | null;
956
+ }[];
957
+ }[] | null;
958
+ providedAmount: number;
959
+ totalAmount: number | null;
960
+ discountAmount: number | null;
961
+ netAmount: number | null;
962
+ taxAmount: number | null;
963
+ invoiceAmountSats: number | null;
964
+ invoiceScid: string | null;
965
+ btcPrice: number | null;
966
+ invoice: {
967
+ expiresAt: Date;
968
+ currency: string;
969
+ btcPrice: number | null;
970
+ invoice: string;
971
+ paymentHash: string;
972
+ amountSats: number | null;
973
+ amountSatsReceived: number | null;
974
+ fiatAmount: number | null;
975
+ } | null;
976
+ } | {
977
+ id: string;
978
+ type: "TOP_UP";
979
+ status: "UNCONFIRMED";
980
+ createdAt: Date;
981
+ clientSecret: string;
982
+ organizationId: string;
983
+ expiresAt: Date;
984
+ userMetadata: Record<string, any> | null;
985
+ customFieldData: Record<string, any> | null;
986
+ customerMetadata: Record<string, any> | null;
987
+ currency: string;
988
+ allowDiscountCodes: boolean;
989
+ customerName: string | null;
990
+ customerEmail: string | null;
991
+ requireCustomerFields: {
992
+ customerName?: boolean | undefined;
993
+ customerEmail?: boolean | undefined;
994
+ } | null;
995
+ successUrl: string | null;
996
+ customerId: string | null;
997
+ customerExternalId: string | null;
998
+ customerIpAddress: string | null;
999
+ customerBillingAddress: Record<string, any> | null;
1000
+ products: {
1001
+ id: string;
1002
+ name: string;
1003
+ description: string | null;
1004
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1005
+ prices: {
1006
+ id: string;
1007
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1008
+ priceAmount: number | null;
1009
+ minimumAmount: number | null;
1010
+ maximumAmount: number | null;
1011
+ presetAmount: number | null;
1012
+ unitAmount: number | null;
1013
+ capAmount: number | null;
1014
+ meterId: string | null;
1015
+ }[];
1016
+ }[] | null;
1017
+ providedAmount: number | null;
1018
+ totalAmount: number | null;
1019
+ discountAmount: number | null;
1020
+ netAmount: number | null;
1021
+ taxAmount: number | null;
1022
+ invoiceAmountSats: number | null;
1023
+ invoiceScid: string | null;
1024
+ btcPrice: number | null;
1025
+ invoice: {
1026
+ expiresAt: Date;
1027
+ currency: string;
1028
+ btcPrice: number | null;
1029
+ invoice: string;
1030
+ paymentHash: string;
1031
+ amountSats: number | null;
1032
+ amountSatsReceived: number | null;
1033
+ fiatAmount: number | null;
1034
+ } | null;
1035
+ } | {
1036
+ id: string;
1037
+ type: "PRODUCTS";
1038
+ status: "CONFIRMED";
1039
+ createdAt: Date;
1040
+ clientSecret: string;
1041
+ organizationId: string;
1042
+ expiresAt: Date;
1043
+ userMetadata: Record<string, any> | null;
1044
+ customFieldData: Record<string, any> | null;
1045
+ customerMetadata: Record<string, any> | null;
1046
+ currency: string;
1047
+ allowDiscountCodes: boolean;
1048
+ customerName: string | null;
1049
+ customerEmail: string | null;
1050
+ requireCustomerFields: {
1051
+ customerName?: boolean | undefined;
1052
+ customerEmail?: boolean | undefined;
1053
+ } | null;
1054
+ successUrl: string | null;
1055
+ customerId: string | null;
1056
+ customerExternalId: string | null;
1057
+ customerIpAddress: string | null;
1058
+ customerBillingAddress: Record<string, any> | null;
1059
+ products: [{
1060
+ id: string;
1061
+ name: string;
1062
+ description: string | null;
1063
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1064
+ prices: {
1065
+ id: string;
1066
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1067
+ priceAmount: number | null;
1068
+ minimumAmount: number | null;
1069
+ maximumAmount: number | null;
1070
+ presetAmount: number | null;
1071
+ unitAmount: number | null;
1072
+ capAmount: number | null;
1073
+ meterId: string | null;
1074
+ }[];
1075
+ }, ...{
1076
+ id: string;
1077
+ name: string;
1078
+ description: string | null;
1079
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1080
+ prices: {
1081
+ id: string;
1082
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1083
+ priceAmount: number | null;
1084
+ minimumAmount: number | null;
1085
+ maximumAmount: number | null;
1086
+ presetAmount: number | null;
1087
+ unitAmount: number | null;
1088
+ capAmount: number | null;
1089
+ meterId: string | null;
1090
+ }[];
1091
+ }[]];
1092
+ providedAmount: number | null;
1093
+ totalAmount: number;
1094
+ discountAmount: number;
1095
+ netAmount: number;
1096
+ taxAmount: number;
1097
+ invoiceAmountSats: number;
1098
+ invoiceScid: string | null;
1099
+ btcPrice: number;
1100
+ invoice: {
1101
+ expiresAt: Date;
1102
+ currency: string;
1103
+ btcPrice: number | null;
1104
+ invoice: string;
1105
+ paymentHash: string;
1106
+ amountSats: number | null;
1107
+ amountSatsReceived: number | null;
1108
+ fiatAmount: number | null;
1109
+ } | null;
1110
+ } | {
1111
+ id: string;
1112
+ type: "AMOUNT";
1113
+ status: "CONFIRMED";
1114
+ createdAt: Date;
1115
+ clientSecret: string;
1116
+ organizationId: string;
1117
+ expiresAt: Date;
1118
+ userMetadata: Record<string, any> | null;
1119
+ customFieldData: Record<string, any> | null;
1120
+ customerMetadata: Record<string, any> | null;
1121
+ currency: string;
1122
+ allowDiscountCodes: boolean;
1123
+ customerName: string | null;
1124
+ customerEmail: string | null;
1125
+ requireCustomerFields: {
1126
+ customerName?: boolean | undefined;
1127
+ customerEmail?: boolean | undefined;
1128
+ } | null;
1129
+ successUrl: string | null;
1130
+ customerId: string | null;
1131
+ customerExternalId: string | null;
1132
+ customerIpAddress: string | null;
1133
+ customerBillingAddress: Record<string, any> | null;
1134
+ products: {
1135
+ id: string;
1136
+ name: string;
1137
+ description: string | null;
1138
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1139
+ prices: {
1140
+ id: string;
1141
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1142
+ priceAmount: number | null;
1143
+ minimumAmount: number | null;
1144
+ maximumAmount: number | null;
1145
+ presetAmount: number | null;
1146
+ unitAmount: number | null;
1147
+ capAmount: number | null;
1148
+ meterId: string | null;
1149
+ }[];
1150
+ }[] | null;
1151
+ providedAmount: number;
1152
+ totalAmount: number;
1153
+ discountAmount: number;
1154
+ netAmount: number;
1155
+ taxAmount: number;
1156
+ invoiceAmountSats: number;
1157
+ invoiceScid: string | null;
1158
+ btcPrice: number;
1159
+ invoice: {
1160
+ expiresAt: Date;
1161
+ currency: string;
1162
+ btcPrice: number | null;
1163
+ invoice: string;
1164
+ paymentHash: string;
1165
+ amountSats: number | null;
1166
+ amountSatsReceived: number | null;
1167
+ fiatAmount: number | null;
1168
+ } | null;
1169
+ } | {
1170
+ id: string;
1171
+ type: "TOP_UP";
1172
+ status: "CONFIRMED";
1173
+ createdAt: Date;
1174
+ clientSecret: string;
1175
+ organizationId: string;
1176
+ expiresAt: Date;
1177
+ userMetadata: Record<string, any> | null;
1178
+ customFieldData: Record<string, any> | null;
1179
+ customerMetadata: Record<string, any> | null;
1180
+ currency: string;
1181
+ allowDiscountCodes: boolean;
1182
+ customerName: string | null;
1183
+ customerEmail: string | null;
1184
+ requireCustomerFields: {
1185
+ customerName?: boolean | undefined;
1186
+ customerEmail?: boolean | undefined;
1187
+ } | null;
1188
+ successUrl: string | null;
1189
+ customerId: string | null;
1190
+ customerExternalId: string | null;
1191
+ customerIpAddress: string | null;
1192
+ customerBillingAddress: Record<string, any> | null;
1193
+ products: {
1194
+ id: string;
1195
+ name: string;
1196
+ description: string | null;
1197
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1198
+ prices: {
1199
+ id: string;
1200
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1201
+ priceAmount: number | null;
1202
+ minimumAmount: number | null;
1203
+ maximumAmount: number | null;
1204
+ presetAmount: number | null;
1205
+ unitAmount: number | null;
1206
+ capAmount: number | null;
1207
+ meterId: string | null;
1208
+ }[];
1209
+ }[] | null;
1210
+ providedAmount: number | null;
1211
+ totalAmount: number | null;
1212
+ discountAmount: number | null;
1213
+ netAmount: number | null;
1214
+ taxAmount: number | null;
1215
+ invoiceAmountSats: number | null;
1216
+ invoiceScid: string | null;
1217
+ btcPrice: number | null;
1218
+ invoice: {
1219
+ expiresAt: Date;
1220
+ currency: string;
1221
+ btcPrice: number | null;
1222
+ invoice: string;
1223
+ paymentHash: string;
1224
+ amountSats: number | null;
1225
+ amountSatsReceived: number | null;
1226
+ fiatAmount: number | null;
1227
+ } | null;
1228
+ } | {
1229
+ id: string;
1230
+ type: "PRODUCTS";
1231
+ status: "PENDING_PAYMENT";
1232
+ createdAt: Date;
1233
+ clientSecret: string;
1234
+ organizationId: string;
1235
+ expiresAt: Date;
1236
+ userMetadata: Record<string, any> | null;
1237
+ customFieldData: Record<string, any> | null;
1238
+ customerMetadata: Record<string, any> | null;
1239
+ currency: string;
1240
+ allowDiscountCodes: boolean;
1241
+ customerName: string | null;
1242
+ customerEmail: string | null;
1243
+ requireCustomerFields: {
1244
+ customerName?: boolean | undefined;
1245
+ customerEmail?: boolean | undefined;
1246
+ } | null;
1247
+ successUrl: string | null;
1248
+ customerId: string | null;
1249
+ customerExternalId: string | null;
1250
+ customerIpAddress: string | null;
1251
+ customerBillingAddress: Record<string, any> | null;
1252
+ products: [{
1253
+ id: string;
1254
+ name: string;
1255
+ description: string | null;
1256
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1257
+ prices: {
1258
+ id: string;
1259
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1260
+ priceAmount: number | null;
1261
+ minimumAmount: number | null;
1262
+ maximumAmount: number | null;
1263
+ presetAmount: number | null;
1264
+ unitAmount: number | null;
1265
+ capAmount: number | null;
1266
+ meterId: string | null;
1267
+ }[];
1268
+ }, ...{
1269
+ id: string;
1270
+ name: string;
1271
+ description: string | null;
1272
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1273
+ prices: {
1274
+ id: string;
1275
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1276
+ priceAmount: number | null;
1277
+ minimumAmount: number | null;
1278
+ maximumAmount: number | null;
1279
+ presetAmount: number | null;
1280
+ unitAmount: number | null;
1281
+ capAmount: number | null;
1282
+ meterId: string | null;
1283
+ }[];
1284
+ }[]];
1285
+ providedAmount: number | null;
1286
+ totalAmount: number;
1287
+ discountAmount: number;
1288
+ netAmount: number;
1289
+ taxAmount: number;
1290
+ invoiceAmountSats: number;
1291
+ invoiceScid: string | null;
1292
+ btcPrice: number;
1293
+ invoice: {
1294
+ expiresAt: Date;
1295
+ currency: string;
1296
+ btcPrice: number;
1297
+ invoice: string;
1298
+ paymentHash: string;
1299
+ amountSats: number;
1300
+ amountSatsReceived: number | null;
1301
+ fiatAmount: number;
1302
+ };
1303
+ } | {
1304
+ id: string;
1305
+ type: "AMOUNT";
1306
+ status: "PENDING_PAYMENT";
1307
+ createdAt: Date;
1308
+ clientSecret: string;
1309
+ organizationId: string;
1310
+ expiresAt: Date;
1311
+ userMetadata: Record<string, any> | null;
1312
+ customFieldData: Record<string, any> | null;
1313
+ customerMetadata: Record<string, any> | null;
1314
+ currency: string;
1315
+ allowDiscountCodes: boolean;
1316
+ customerName: string | null;
1317
+ customerEmail: string | null;
1318
+ requireCustomerFields: {
1319
+ customerName?: boolean | undefined;
1320
+ customerEmail?: boolean | undefined;
1321
+ } | null;
1322
+ successUrl: string | null;
1323
+ customerId: string | null;
1324
+ customerExternalId: string | null;
1325
+ customerIpAddress: string | null;
1326
+ customerBillingAddress: Record<string, any> | null;
1327
+ products: {
1328
+ id: string;
1329
+ name: string;
1330
+ description: string | null;
1331
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1332
+ prices: {
1333
+ id: string;
1334
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1335
+ priceAmount: number | null;
1336
+ minimumAmount: number | null;
1337
+ maximumAmount: number | null;
1338
+ presetAmount: number | null;
1339
+ unitAmount: number | null;
1340
+ capAmount: number | null;
1341
+ meterId: string | null;
1342
+ }[];
1343
+ }[] | null;
1344
+ providedAmount: number;
1345
+ totalAmount: number;
1346
+ discountAmount: number;
1347
+ netAmount: number;
1348
+ taxAmount: number;
1349
+ invoiceAmountSats: number;
1350
+ invoiceScid: string | null;
1351
+ btcPrice: number;
1352
+ invoice: {
1353
+ expiresAt: Date;
1354
+ currency: string;
1355
+ btcPrice: number;
1356
+ invoice: string;
1357
+ paymentHash: string;
1358
+ amountSats: number;
1359
+ amountSatsReceived: number | null;
1360
+ fiatAmount: number;
1361
+ };
1362
+ } | {
1363
+ id: string;
1364
+ type: "TOP_UP";
1365
+ status: "PENDING_PAYMENT";
1366
+ createdAt: Date;
1367
+ clientSecret: string;
1368
+ organizationId: string;
1369
+ expiresAt: Date;
1370
+ userMetadata: Record<string, any> | null;
1371
+ customFieldData: Record<string, any> | null;
1372
+ customerMetadata: Record<string, any> | null;
1373
+ currency: string;
1374
+ allowDiscountCodes: boolean;
1375
+ customerName: string | null;
1376
+ customerEmail: string | null;
1377
+ requireCustomerFields: {
1378
+ customerName?: boolean | undefined;
1379
+ customerEmail?: boolean | undefined;
1380
+ } | null;
1381
+ successUrl: string | null;
1382
+ customerId: string | null;
1383
+ customerExternalId: string | null;
1384
+ customerIpAddress: string | null;
1385
+ customerBillingAddress: Record<string, any> | null;
1386
+ products: {
1387
+ id: string;
1388
+ name: string;
1389
+ description: string | null;
1390
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1391
+ prices: {
1392
+ id: string;
1393
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1394
+ priceAmount: number | null;
1395
+ minimumAmount: number | null;
1396
+ maximumAmount: number | null;
1397
+ presetAmount: number | null;
1398
+ unitAmount: number | null;
1399
+ capAmount: number | null;
1400
+ meterId: string | null;
1401
+ }[];
1402
+ }[] | null;
1403
+ providedAmount: number | null;
1404
+ totalAmount: number | null;
1405
+ discountAmount: number | null;
1406
+ netAmount: number | null;
1407
+ taxAmount: number | null;
1408
+ invoiceAmountSats: number | null;
1409
+ invoiceScid: string | null;
1410
+ btcPrice: number | null;
1411
+ invoice: {
1412
+ expiresAt: Date;
1413
+ currency: string;
1414
+ btcPrice: number | null;
1415
+ invoice: string;
1416
+ paymentHash: string;
1417
+ amountSats: number | null;
1418
+ amountSatsReceived: number | null;
1419
+ fiatAmount: number | null;
1420
+ };
1421
+ } | {
1422
+ id: string;
1423
+ type: "PRODUCTS";
1424
+ status: "PAYMENT_RECEIVED";
1425
+ createdAt: Date;
1426
+ clientSecret: string;
1427
+ organizationId: string;
1428
+ expiresAt: Date;
1429
+ userMetadata: Record<string, any> | null;
1430
+ customFieldData: Record<string, any> | null;
1431
+ customerMetadata: Record<string, any> | null;
1432
+ currency: string;
1433
+ allowDiscountCodes: boolean;
1434
+ customerName: string | null;
1435
+ customerEmail: string | null;
1436
+ requireCustomerFields: {
1437
+ customerName?: boolean | undefined;
1438
+ customerEmail?: boolean | undefined;
1439
+ } | null;
1440
+ successUrl: string | null;
1441
+ customerId: string | null;
1442
+ customerExternalId: string | null;
1443
+ customerIpAddress: string | null;
1444
+ customerBillingAddress: Record<string, any> | null;
1445
+ products: [{
1446
+ id: string;
1447
+ name: string;
1448
+ description: string | null;
1449
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1450
+ prices: {
1451
+ id: string;
1452
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1453
+ priceAmount: number | null;
1454
+ minimumAmount: number | null;
1455
+ maximumAmount: number | null;
1456
+ presetAmount: number | null;
1457
+ unitAmount: number | null;
1458
+ capAmount: number | null;
1459
+ meterId: string | null;
1460
+ }[];
1461
+ }, ...{
1462
+ id: string;
1463
+ name: string;
1464
+ description: string | null;
1465
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1466
+ prices: {
1467
+ id: string;
1468
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1469
+ priceAmount: number | null;
1470
+ minimumAmount: number | null;
1471
+ maximumAmount: number | null;
1472
+ presetAmount: number | null;
1473
+ unitAmount: number | null;
1474
+ capAmount: number | null;
1475
+ meterId: string | null;
1476
+ }[];
1477
+ }[]];
1478
+ providedAmount: number | null;
1479
+ totalAmount: number;
1480
+ discountAmount: number;
1481
+ netAmount: number;
1482
+ taxAmount: number;
1483
+ invoiceAmountSats: number;
1484
+ invoiceScid: string | null;
1485
+ btcPrice: number;
1486
+ invoice: {
1487
+ expiresAt: Date;
1488
+ currency: string;
1489
+ btcPrice: number;
1490
+ invoice: string;
1491
+ paymentHash: string;
1492
+ amountSats: number;
1493
+ amountSatsReceived: number;
1494
+ fiatAmount: number;
1495
+ };
1496
+ } | {
1497
+ id: string;
1498
+ type: "AMOUNT";
1499
+ status: "PAYMENT_RECEIVED";
1500
+ createdAt: Date;
1501
+ clientSecret: string;
1502
+ organizationId: string;
1503
+ expiresAt: Date;
1504
+ userMetadata: Record<string, any> | null;
1505
+ customFieldData: Record<string, any> | null;
1506
+ customerMetadata: Record<string, any> | null;
1507
+ currency: string;
1508
+ allowDiscountCodes: boolean;
1509
+ customerName: string | null;
1510
+ customerEmail: string | null;
1511
+ requireCustomerFields: {
1512
+ customerName?: boolean | undefined;
1513
+ customerEmail?: boolean | undefined;
1514
+ } | null;
1515
+ successUrl: string | null;
1516
+ customerId: string | null;
1517
+ customerExternalId: string | null;
1518
+ customerIpAddress: string | null;
1519
+ customerBillingAddress: Record<string, any> | null;
1520
+ products: {
1521
+ id: string;
1522
+ name: string;
1523
+ description: string | null;
1524
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1525
+ prices: {
1526
+ id: string;
1527
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1528
+ priceAmount: number | null;
1529
+ minimumAmount: number | null;
1530
+ maximumAmount: number | null;
1531
+ presetAmount: number | null;
1532
+ unitAmount: number | null;
1533
+ capAmount: number | null;
1534
+ meterId: string | null;
1535
+ }[];
1536
+ }[] | null;
1537
+ providedAmount: number;
1538
+ totalAmount: number;
1539
+ discountAmount: number;
1540
+ netAmount: number;
1541
+ taxAmount: number;
1542
+ invoiceAmountSats: number;
1543
+ invoiceScid: string | null;
1544
+ btcPrice: number;
1545
+ invoice: {
1546
+ expiresAt: Date;
1547
+ currency: string;
1548
+ btcPrice: number;
1549
+ invoice: string;
1550
+ paymentHash: string;
1551
+ amountSats: number;
1552
+ amountSatsReceived: number;
1553
+ fiatAmount: number;
1554
+ };
1555
+ } | {
1556
+ id: string;
1557
+ type: "TOP_UP";
1558
+ status: "PAYMENT_RECEIVED";
1559
+ createdAt: Date;
1560
+ clientSecret: string;
1561
+ organizationId: string;
1562
+ expiresAt: Date;
1563
+ userMetadata: Record<string, any> | null;
1564
+ customFieldData: Record<string, any> | null;
1565
+ customerMetadata: Record<string, any> | null;
1566
+ currency: string;
1567
+ allowDiscountCodes: boolean;
1568
+ customerName: string | null;
1569
+ customerEmail: string | null;
1570
+ requireCustomerFields: {
1571
+ customerName?: boolean | undefined;
1572
+ customerEmail?: boolean | undefined;
1573
+ } | null;
1574
+ successUrl: string | null;
1575
+ customerId: string | null;
1576
+ customerExternalId: string | null;
1577
+ customerIpAddress: string | null;
1578
+ customerBillingAddress: Record<string, any> | null;
1579
+ products: {
1580
+ id: string;
1581
+ name: string;
1582
+ description: string | null;
1583
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1584
+ prices: {
1585
+ id: string;
1586
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1587
+ priceAmount: number | null;
1588
+ minimumAmount: number | null;
1589
+ maximumAmount: number | null;
1590
+ presetAmount: number | null;
1591
+ unitAmount: number | null;
1592
+ capAmount: number | null;
1593
+ meterId: string | null;
1594
+ }[];
1595
+ }[] | null;
1596
+ providedAmount: number | null;
1597
+ totalAmount: number;
1598
+ discountAmount: number;
1599
+ netAmount: number;
1600
+ taxAmount: number;
1601
+ invoiceAmountSats: number;
1602
+ invoiceScid: string | null;
1603
+ btcPrice: number;
1604
+ invoice: {
1605
+ expiresAt: Date;
1606
+ currency: string;
1607
+ btcPrice: number;
1608
+ invoice: string;
1609
+ paymentHash: string;
1610
+ amountSats: number;
1611
+ amountSatsReceived: number;
1612
+ fiatAmount: number;
1613
+ };
1614
+ } | {
1615
+ id: string;
1616
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
1617
+ status: "EXPIRED";
1618
+ createdAt: Date;
1619
+ clientSecret: string;
1620
+ organizationId: string;
1621
+ expiresAt: Date;
1622
+ userMetadata: Record<string, any> | null;
1623
+ customFieldData: Record<string, any> | null;
1624
+ customerMetadata: Record<string, any> | null;
1625
+ currency: string;
1626
+ allowDiscountCodes: boolean;
1627
+ customerName: string | null;
1628
+ customerEmail: string | null;
1629
+ requireCustomerFields: {
1630
+ customerName?: boolean | undefined;
1631
+ customerEmail?: boolean | undefined;
1632
+ } | null;
1633
+ successUrl: string | null;
1634
+ customerId: string | null;
1635
+ customerExternalId: string | null;
1636
+ customerIpAddress: string | null;
1637
+ customerBillingAddress: Record<string, any> | null;
1638
+ products: {
1639
+ id: string;
1640
+ name: string;
1641
+ description: string | null;
1642
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1643
+ prices: {
1644
+ id: string;
1645
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1646
+ priceAmount: number | null;
1647
+ minimumAmount: number | null;
1648
+ maximumAmount: number | null;
1649
+ presetAmount: number | null;
1650
+ unitAmount: number | null;
1651
+ capAmount: number | null;
1652
+ meterId: string | null;
1653
+ }[];
1654
+ }[] | null;
1655
+ providedAmount: number | null;
1656
+ totalAmount: number | null;
1657
+ discountAmount: number | null;
1658
+ netAmount: number | null;
1659
+ taxAmount: number | null;
1660
+ invoiceAmountSats: number | null;
1661
+ invoiceScid: string | null;
1662
+ btcPrice: number | null;
1663
+ invoice: {
1664
+ expiresAt: Date;
1665
+ currency: string;
1666
+ btcPrice: number | null;
1667
+ invoice: string;
1668
+ paymentHash: string;
1669
+ amountSats: number | null;
1670
+ amountSatsReceived: number | null;
1671
+ fiatAmount: number | null;
1672
+ } | null;
1673
+ }>;
1674
+ confirm: (params: Parameters<typeof this.client.checkout.confirm>[0]) => Promise<{
1675
+ id: string;
1676
+ type: "PRODUCTS";
1677
+ status: "UNCONFIRMED";
1678
+ createdAt: Date;
1679
+ clientSecret: string;
1680
+ organizationId: string;
1681
+ expiresAt: Date;
1682
+ userMetadata: Record<string, any> | null;
1683
+ customFieldData: Record<string, any> | null;
1684
+ customerMetadata: Record<string, any> | null;
1685
+ currency: string;
1686
+ allowDiscountCodes: boolean;
1687
+ customerName: string | null;
1688
+ customerEmail: string | null;
1689
+ requireCustomerFields: {
1690
+ customerName?: boolean | undefined;
1691
+ customerEmail?: boolean | undefined;
1692
+ } | null;
1693
+ successUrl: string | null;
1694
+ customerId: string | null;
1695
+ customerExternalId: string | null;
1696
+ customerIpAddress: string | null;
1697
+ customerBillingAddress: Record<string, any> | null;
1698
+ products: [{
1699
+ id: string;
1700
+ name: string;
1701
+ description: string | null;
1702
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1703
+ prices: {
1704
+ id: string;
1705
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1706
+ priceAmount: number | null;
1707
+ minimumAmount: number | null;
1708
+ maximumAmount: number | null;
1709
+ presetAmount: number | null;
1710
+ unitAmount: number | null;
1711
+ capAmount: number | null;
1712
+ meterId: string | null;
1713
+ }[];
1714
+ }, ...{
1715
+ id: string;
1716
+ name: string;
1717
+ description: string | null;
1718
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1719
+ prices: {
1720
+ id: string;
1721
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1722
+ priceAmount: number | null;
1723
+ minimumAmount: number | null;
1724
+ maximumAmount: number | null;
1725
+ presetAmount: number | null;
1726
+ unitAmount: number | null;
1727
+ capAmount: number | null;
1728
+ meterId: string | null;
1729
+ }[];
1730
+ }[]];
1731
+ providedAmount: number | null;
1732
+ totalAmount: number | null;
1733
+ discountAmount: number | null;
1734
+ netAmount: number | null;
1735
+ taxAmount: number | null;
1736
+ invoiceAmountSats: number | null;
1737
+ invoiceScid: string | null;
1738
+ btcPrice: number | null;
1739
+ invoice: {
1740
+ expiresAt: Date;
1741
+ currency: string;
1742
+ btcPrice: number | null;
1743
+ invoice: string;
1744
+ paymentHash: string;
1745
+ amountSats: number | null;
1746
+ amountSatsReceived: number | null;
1747
+ fiatAmount: number | null;
1748
+ } | null;
1749
+ } | {
1750
+ id: string;
1751
+ type: "AMOUNT";
1752
+ status: "UNCONFIRMED";
1753
+ createdAt: Date;
1754
+ clientSecret: string;
1755
+ organizationId: string;
1756
+ expiresAt: Date;
1757
+ userMetadata: Record<string, any> | null;
1758
+ customFieldData: Record<string, any> | null;
1759
+ customerMetadata: Record<string, any> | null;
1760
+ currency: string;
1761
+ allowDiscountCodes: boolean;
1762
+ customerName: string | null;
1763
+ customerEmail: string | null;
1764
+ requireCustomerFields: {
1765
+ customerName?: boolean | undefined;
1766
+ customerEmail?: boolean | undefined;
1767
+ } | null;
1768
+ successUrl: string | null;
1769
+ customerId: string | null;
1770
+ customerExternalId: string | null;
1771
+ customerIpAddress: string | null;
1772
+ customerBillingAddress: Record<string, any> | null;
1773
+ products: {
1774
+ id: string;
1775
+ name: string;
1776
+ description: string | null;
1777
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1778
+ prices: {
1779
+ id: string;
1780
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1781
+ priceAmount: number | null;
1782
+ minimumAmount: number | null;
1783
+ maximumAmount: number | null;
1784
+ presetAmount: number | null;
1785
+ unitAmount: number | null;
1786
+ capAmount: number | null;
1787
+ meterId: string | null;
1788
+ }[];
1789
+ }[] | null;
1790
+ providedAmount: number;
1791
+ totalAmount: number | null;
1792
+ discountAmount: number | null;
1793
+ netAmount: number | null;
1794
+ taxAmount: number | null;
1795
+ invoiceAmountSats: number | null;
1796
+ invoiceScid: string | null;
1797
+ btcPrice: number | null;
1798
+ invoice: {
1799
+ expiresAt: Date;
1800
+ currency: string;
1801
+ btcPrice: number | null;
1802
+ invoice: string;
1803
+ paymentHash: string;
1804
+ amountSats: number | null;
1805
+ amountSatsReceived: number | null;
1806
+ fiatAmount: number | null;
1807
+ } | null;
1808
+ } | {
1809
+ id: string;
1810
+ type: "TOP_UP";
1811
+ status: "UNCONFIRMED";
1812
+ createdAt: Date;
1813
+ clientSecret: string;
1814
+ organizationId: string;
1815
+ expiresAt: Date;
1816
+ userMetadata: Record<string, any> | null;
1817
+ customFieldData: Record<string, any> | null;
1818
+ customerMetadata: Record<string, any> | null;
1819
+ currency: string;
1820
+ allowDiscountCodes: boolean;
1821
+ customerName: string | null;
1822
+ customerEmail: string | null;
1823
+ requireCustomerFields: {
1824
+ customerName?: boolean | undefined;
1825
+ customerEmail?: boolean | undefined;
1826
+ } | null;
1827
+ successUrl: string | null;
1828
+ customerId: string | null;
1829
+ customerExternalId: string | null;
1830
+ customerIpAddress: string | null;
1831
+ customerBillingAddress: Record<string, any> | null;
1832
+ products: {
1833
+ id: string;
1834
+ name: string;
1835
+ description: string | null;
1836
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1837
+ prices: {
1838
+ id: string;
1839
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1840
+ priceAmount: number | null;
1841
+ minimumAmount: number | null;
1842
+ maximumAmount: number | null;
1843
+ presetAmount: number | null;
1844
+ unitAmount: number | null;
1845
+ capAmount: number | null;
1846
+ meterId: string | null;
1847
+ }[];
1848
+ }[] | null;
1849
+ providedAmount: number | null;
1850
+ totalAmount: number | null;
1851
+ discountAmount: number | null;
1852
+ netAmount: number | null;
1853
+ taxAmount: number | null;
1854
+ invoiceAmountSats: number | null;
1855
+ invoiceScid: string | null;
1856
+ btcPrice: number | null;
1857
+ invoice: {
1858
+ expiresAt: Date;
1859
+ currency: string;
1860
+ btcPrice: number | null;
1861
+ invoice: string;
1862
+ paymentHash: string;
1863
+ amountSats: number | null;
1864
+ amountSatsReceived: number | null;
1865
+ fiatAmount: number | null;
1866
+ } | null;
1867
+ } | {
1868
+ id: string;
1869
+ type: "PRODUCTS";
1870
+ status: "CONFIRMED";
1871
+ createdAt: Date;
1872
+ clientSecret: string;
1873
+ organizationId: string;
1874
+ expiresAt: Date;
1875
+ userMetadata: Record<string, any> | null;
1876
+ customFieldData: Record<string, any> | null;
1877
+ customerMetadata: Record<string, any> | null;
1878
+ currency: string;
1879
+ allowDiscountCodes: boolean;
1880
+ customerName: string | null;
1881
+ customerEmail: string | null;
1882
+ requireCustomerFields: {
1883
+ customerName?: boolean | undefined;
1884
+ customerEmail?: boolean | undefined;
1885
+ } | null;
1886
+ successUrl: string | null;
1887
+ customerId: string | null;
1888
+ customerExternalId: string | null;
1889
+ customerIpAddress: string | null;
1890
+ customerBillingAddress: Record<string, any> | null;
1891
+ products: [{
1892
+ id: string;
1893
+ name: string;
1894
+ description: string | null;
1895
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1896
+ prices: {
1897
+ id: string;
1898
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1899
+ priceAmount: number | null;
1900
+ minimumAmount: number | null;
1901
+ maximumAmount: number | null;
1902
+ presetAmount: number | null;
1903
+ unitAmount: number | null;
1904
+ capAmount: number | null;
1905
+ meterId: string | null;
1906
+ }[];
1907
+ }, ...{
1908
+ id: string;
1909
+ name: string;
1910
+ description: string | null;
1911
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1912
+ prices: {
1913
+ id: string;
1914
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1915
+ priceAmount: number | null;
1916
+ minimumAmount: number | null;
1917
+ maximumAmount: number | null;
1918
+ presetAmount: number | null;
1919
+ unitAmount: number | null;
1920
+ capAmount: number | null;
1921
+ meterId: string | null;
1922
+ }[];
1923
+ }[]];
1924
+ providedAmount: number | null;
1925
+ totalAmount: number;
1926
+ discountAmount: number;
1927
+ netAmount: number;
1928
+ taxAmount: number;
1929
+ invoiceAmountSats: number;
1930
+ invoiceScid: string | null;
1931
+ btcPrice: number;
1932
+ invoice: {
1933
+ expiresAt: Date;
1934
+ currency: string;
1935
+ btcPrice: number | null;
1936
+ invoice: string;
1937
+ paymentHash: string;
1938
+ amountSats: number | null;
1939
+ amountSatsReceived: number | null;
1940
+ fiatAmount: number | null;
1941
+ } | null;
1942
+ } | {
1943
+ id: string;
1944
+ type: "AMOUNT";
1945
+ status: "CONFIRMED";
1946
+ createdAt: Date;
1947
+ clientSecret: string;
1948
+ organizationId: string;
1949
+ expiresAt: Date;
1950
+ userMetadata: Record<string, any> | null;
1951
+ customFieldData: Record<string, any> | null;
1952
+ customerMetadata: Record<string, any> | null;
1953
+ currency: string;
1954
+ allowDiscountCodes: boolean;
1955
+ customerName: string | null;
1956
+ customerEmail: string | null;
1957
+ requireCustomerFields: {
1958
+ customerName?: boolean | undefined;
1959
+ customerEmail?: boolean | undefined;
1960
+ } | null;
1961
+ successUrl: string | null;
1962
+ customerId: string | null;
1963
+ customerExternalId: string | null;
1964
+ customerIpAddress: string | null;
1965
+ customerBillingAddress: Record<string, any> | null;
1966
+ products: {
1967
+ id: string;
1968
+ name: string;
1969
+ description: string | null;
1970
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1971
+ prices: {
1972
+ id: string;
1973
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1974
+ priceAmount: number | null;
1975
+ minimumAmount: number | null;
1976
+ maximumAmount: number | null;
1977
+ presetAmount: number | null;
1978
+ unitAmount: number | null;
1979
+ capAmount: number | null;
1980
+ meterId: string | null;
1981
+ }[];
1982
+ }[] | null;
1983
+ providedAmount: number;
1984
+ totalAmount: number;
1985
+ discountAmount: number;
1986
+ netAmount: number;
1987
+ taxAmount: number;
1988
+ invoiceAmountSats: number;
1989
+ invoiceScid: string | null;
1990
+ btcPrice: number;
1991
+ invoice: {
1992
+ expiresAt: Date;
1993
+ currency: string;
1994
+ btcPrice: number | null;
1995
+ invoice: string;
1996
+ paymentHash: string;
1997
+ amountSats: number | null;
1998
+ amountSatsReceived: number | null;
1999
+ fiatAmount: number | null;
2000
+ } | null;
2001
+ } | {
2002
+ id: string;
2003
+ type: "TOP_UP";
2004
+ status: "CONFIRMED";
2005
+ createdAt: Date;
2006
+ clientSecret: string;
2007
+ organizationId: string;
2008
+ expiresAt: Date;
2009
+ userMetadata: Record<string, any> | null;
2010
+ customFieldData: Record<string, any> | null;
2011
+ customerMetadata: Record<string, any> | null;
2012
+ currency: string;
2013
+ allowDiscountCodes: boolean;
2014
+ customerName: string | null;
2015
+ customerEmail: string | null;
2016
+ requireCustomerFields: {
2017
+ customerName?: boolean | undefined;
2018
+ customerEmail?: boolean | undefined;
2019
+ } | null;
2020
+ successUrl: string | null;
2021
+ customerId: string | null;
2022
+ customerExternalId: string | null;
2023
+ customerIpAddress: string | null;
2024
+ customerBillingAddress: Record<string, any> | null;
2025
+ products: {
2026
+ id: string;
2027
+ name: string;
2028
+ description: string | null;
2029
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2030
+ prices: {
2031
+ id: string;
2032
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2033
+ priceAmount: number | null;
2034
+ minimumAmount: number | null;
2035
+ maximumAmount: number | null;
2036
+ presetAmount: number | null;
2037
+ unitAmount: number | null;
2038
+ capAmount: number | null;
2039
+ meterId: string | null;
2040
+ }[];
2041
+ }[] | null;
2042
+ providedAmount: number | null;
2043
+ totalAmount: number | null;
2044
+ discountAmount: number | null;
2045
+ netAmount: number | null;
2046
+ taxAmount: number | null;
2047
+ invoiceAmountSats: number | null;
2048
+ invoiceScid: string | null;
2049
+ btcPrice: number | null;
2050
+ invoice: {
2051
+ expiresAt: Date;
2052
+ currency: string;
2053
+ btcPrice: number | null;
2054
+ invoice: string;
2055
+ paymentHash: string;
2056
+ amountSats: number | null;
2057
+ amountSatsReceived: number | null;
2058
+ fiatAmount: number | null;
2059
+ } | null;
2060
+ } | {
2061
+ id: string;
2062
+ type: "PRODUCTS";
2063
+ status: "PENDING_PAYMENT";
2064
+ createdAt: Date;
2065
+ clientSecret: string;
2066
+ organizationId: string;
2067
+ expiresAt: Date;
2068
+ userMetadata: Record<string, any> | null;
2069
+ customFieldData: Record<string, any> | null;
2070
+ customerMetadata: Record<string, any> | null;
2071
+ currency: string;
2072
+ allowDiscountCodes: boolean;
2073
+ customerName: string | null;
2074
+ customerEmail: string | null;
2075
+ requireCustomerFields: {
2076
+ customerName?: boolean | undefined;
2077
+ customerEmail?: boolean | undefined;
2078
+ } | null;
2079
+ successUrl: string | null;
2080
+ customerId: string | null;
2081
+ customerExternalId: string | null;
2082
+ customerIpAddress: string | null;
2083
+ customerBillingAddress: Record<string, any> | null;
2084
+ products: [{
2085
+ id: string;
2086
+ name: string;
2087
+ description: string | null;
2088
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2089
+ prices: {
2090
+ id: string;
2091
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2092
+ priceAmount: number | null;
2093
+ minimumAmount: number | null;
2094
+ maximumAmount: number | null;
2095
+ presetAmount: number | null;
2096
+ unitAmount: number | null;
2097
+ capAmount: number | null;
2098
+ meterId: string | null;
2099
+ }[];
2100
+ }, ...{
2101
+ id: string;
2102
+ name: string;
2103
+ description: string | null;
2104
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2105
+ prices: {
2106
+ id: string;
2107
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2108
+ priceAmount: number | null;
2109
+ minimumAmount: number | null;
2110
+ maximumAmount: number | null;
2111
+ presetAmount: number | null;
2112
+ unitAmount: number | null;
2113
+ capAmount: number | null;
2114
+ meterId: string | null;
2115
+ }[];
2116
+ }[]];
2117
+ providedAmount: number | null;
2118
+ totalAmount: number;
2119
+ discountAmount: number;
2120
+ netAmount: number;
2121
+ taxAmount: number;
2122
+ invoiceAmountSats: number;
2123
+ invoiceScid: string | null;
2124
+ btcPrice: number;
2125
+ invoice: {
2126
+ expiresAt: Date;
2127
+ currency: string;
2128
+ btcPrice: number;
2129
+ invoice: string;
2130
+ paymentHash: string;
2131
+ amountSats: number;
2132
+ amountSatsReceived: number | null;
2133
+ fiatAmount: number;
2134
+ };
2135
+ } | {
2136
+ id: string;
2137
+ type: "AMOUNT";
2138
+ status: "PENDING_PAYMENT";
2139
+ createdAt: Date;
2140
+ clientSecret: string;
2141
+ organizationId: string;
2142
+ expiresAt: Date;
2143
+ userMetadata: Record<string, any> | null;
2144
+ customFieldData: Record<string, any> | null;
2145
+ customerMetadata: Record<string, any> | null;
2146
+ currency: string;
2147
+ allowDiscountCodes: boolean;
2148
+ customerName: string | null;
2149
+ customerEmail: string | null;
2150
+ requireCustomerFields: {
2151
+ customerName?: boolean | undefined;
2152
+ customerEmail?: boolean | undefined;
2153
+ } | null;
2154
+ successUrl: string | null;
2155
+ customerId: string | null;
2156
+ customerExternalId: string | null;
2157
+ customerIpAddress: string | null;
2158
+ customerBillingAddress: Record<string, any> | null;
2159
+ products: {
2160
+ id: string;
2161
+ name: string;
2162
+ description: string | null;
2163
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2164
+ prices: {
2165
+ id: string;
2166
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2167
+ priceAmount: number | null;
2168
+ minimumAmount: number | null;
2169
+ maximumAmount: number | null;
2170
+ presetAmount: number | null;
2171
+ unitAmount: number | null;
2172
+ capAmount: number | null;
2173
+ meterId: string | null;
2174
+ }[];
2175
+ }[] | null;
2176
+ providedAmount: number;
2177
+ totalAmount: number;
2178
+ discountAmount: number;
2179
+ netAmount: number;
2180
+ taxAmount: number;
2181
+ invoiceAmountSats: number;
2182
+ invoiceScid: string | null;
2183
+ btcPrice: number;
2184
+ invoice: {
2185
+ expiresAt: Date;
2186
+ currency: string;
2187
+ btcPrice: number;
2188
+ invoice: string;
2189
+ paymentHash: string;
2190
+ amountSats: number;
2191
+ amountSatsReceived: number | null;
2192
+ fiatAmount: number;
2193
+ };
2194
+ } | {
2195
+ id: string;
2196
+ type: "TOP_UP";
2197
+ status: "PENDING_PAYMENT";
2198
+ createdAt: Date;
2199
+ clientSecret: string;
2200
+ organizationId: string;
2201
+ expiresAt: Date;
2202
+ userMetadata: Record<string, any> | null;
2203
+ customFieldData: Record<string, any> | null;
2204
+ customerMetadata: Record<string, any> | null;
2205
+ currency: string;
2206
+ allowDiscountCodes: boolean;
2207
+ customerName: string | null;
2208
+ customerEmail: string | null;
2209
+ requireCustomerFields: {
2210
+ customerName?: boolean | undefined;
2211
+ customerEmail?: boolean | undefined;
2212
+ } | null;
2213
+ successUrl: string | null;
2214
+ customerId: string | null;
2215
+ customerExternalId: string | null;
2216
+ customerIpAddress: string | null;
2217
+ customerBillingAddress: Record<string, any> | null;
2218
+ products: {
2219
+ id: string;
2220
+ name: string;
2221
+ description: string | null;
2222
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2223
+ prices: {
2224
+ id: string;
2225
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2226
+ priceAmount: number | null;
2227
+ minimumAmount: number | null;
2228
+ maximumAmount: number | null;
2229
+ presetAmount: number | null;
2230
+ unitAmount: number | null;
2231
+ capAmount: number | null;
2232
+ meterId: string | null;
2233
+ }[];
2234
+ }[] | null;
2235
+ providedAmount: number | null;
2236
+ totalAmount: number | null;
2237
+ discountAmount: number | null;
2238
+ netAmount: number | null;
2239
+ taxAmount: number | null;
2240
+ invoiceAmountSats: number | null;
2241
+ invoiceScid: string | null;
2242
+ btcPrice: number | null;
2243
+ invoice: {
2244
+ expiresAt: Date;
2245
+ currency: string;
2246
+ btcPrice: number | null;
2247
+ invoice: string;
2248
+ paymentHash: string;
2249
+ amountSats: number | null;
2250
+ amountSatsReceived: number | null;
2251
+ fiatAmount: number | null;
2252
+ };
2253
+ } | {
2254
+ id: string;
2255
+ type: "PRODUCTS";
2256
+ status: "PAYMENT_RECEIVED";
2257
+ createdAt: Date;
2258
+ clientSecret: string;
2259
+ organizationId: string;
2260
+ expiresAt: Date;
2261
+ userMetadata: Record<string, any> | null;
2262
+ customFieldData: Record<string, any> | null;
2263
+ customerMetadata: Record<string, any> | null;
2264
+ currency: string;
2265
+ allowDiscountCodes: boolean;
2266
+ customerName: string | null;
2267
+ customerEmail: string | null;
2268
+ requireCustomerFields: {
2269
+ customerName?: boolean | undefined;
2270
+ customerEmail?: boolean | undefined;
2271
+ } | null;
2272
+ successUrl: string | null;
2273
+ customerId: string | null;
2274
+ customerExternalId: string | null;
2275
+ customerIpAddress: string | null;
2276
+ customerBillingAddress: Record<string, any> | null;
2277
+ products: [{
2278
+ id: string;
2279
+ name: string;
2280
+ description: string | null;
2281
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2282
+ prices: {
2283
+ id: string;
2284
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2285
+ priceAmount: number | null;
2286
+ minimumAmount: number | null;
2287
+ maximumAmount: number | null;
2288
+ presetAmount: number | null;
2289
+ unitAmount: number | null;
2290
+ capAmount: number | null;
2291
+ meterId: string | null;
2292
+ }[];
2293
+ }, ...{
2294
+ id: string;
2295
+ name: string;
2296
+ description: string | null;
2297
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2298
+ prices: {
2299
+ id: string;
2300
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2301
+ priceAmount: number | null;
2302
+ minimumAmount: number | null;
2303
+ maximumAmount: number | null;
2304
+ presetAmount: number | null;
2305
+ unitAmount: number | null;
2306
+ capAmount: number | null;
2307
+ meterId: string | null;
2308
+ }[];
2309
+ }[]];
2310
+ providedAmount: number | null;
2311
+ totalAmount: number;
2312
+ discountAmount: number;
2313
+ netAmount: number;
2314
+ taxAmount: number;
2315
+ invoiceAmountSats: number;
2316
+ invoiceScid: string | null;
2317
+ btcPrice: number;
2318
+ invoice: {
2319
+ expiresAt: Date;
2320
+ currency: string;
2321
+ btcPrice: number;
2322
+ invoice: string;
2323
+ paymentHash: string;
2324
+ amountSats: number;
2325
+ amountSatsReceived: number;
2326
+ fiatAmount: number;
2327
+ };
2328
+ } | {
2329
+ id: string;
2330
+ type: "AMOUNT";
2331
+ status: "PAYMENT_RECEIVED";
2332
+ createdAt: Date;
2333
+ clientSecret: string;
2334
+ organizationId: string;
2335
+ expiresAt: Date;
2336
+ userMetadata: Record<string, any> | null;
2337
+ customFieldData: Record<string, any> | null;
2338
+ customerMetadata: Record<string, any> | null;
2339
+ currency: string;
2340
+ allowDiscountCodes: boolean;
2341
+ customerName: string | null;
2342
+ customerEmail: string | null;
2343
+ requireCustomerFields: {
2344
+ customerName?: boolean | undefined;
2345
+ customerEmail?: boolean | undefined;
2346
+ } | null;
2347
+ successUrl: string | null;
2348
+ customerId: string | null;
2349
+ customerExternalId: string | null;
2350
+ customerIpAddress: string | null;
2351
+ customerBillingAddress: Record<string, any> | null;
2352
+ products: {
2353
+ id: string;
2354
+ name: string;
2355
+ description: string | null;
2356
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2357
+ prices: {
2358
+ id: string;
2359
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2360
+ priceAmount: number | null;
2361
+ minimumAmount: number | null;
2362
+ maximumAmount: number | null;
2363
+ presetAmount: number | null;
2364
+ unitAmount: number | null;
2365
+ capAmount: number | null;
2366
+ meterId: string | null;
2367
+ }[];
2368
+ }[] | null;
2369
+ providedAmount: number;
2370
+ totalAmount: number;
2371
+ discountAmount: number;
2372
+ netAmount: number;
2373
+ taxAmount: number;
2374
+ invoiceAmountSats: number;
2375
+ invoiceScid: string | null;
2376
+ btcPrice: number;
2377
+ invoice: {
2378
+ expiresAt: Date;
2379
+ currency: string;
2380
+ btcPrice: number;
2381
+ invoice: string;
2382
+ paymentHash: string;
2383
+ amountSats: number;
2384
+ amountSatsReceived: number;
2385
+ fiatAmount: number;
2386
+ };
2387
+ } | {
2388
+ id: string;
2389
+ type: "TOP_UP";
2390
+ status: "PAYMENT_RECEIVED";
2391
+ createdAt: Date;
2392
+ clientSecret: string;
2393
+ organizationId: string;
2394
+ expiresAt: Date;
2395
+ userMetadata: Record<string, any> | null;
2396
+ customFieldData: Record<string, any> | null;
2397
+ customerMetadata: Record<string, any> | null;
2398
+ currency: string;
2399
+ allowDiscountCodes: boolean;
2400
+ customerName: string | null;
2401
+ customerEmail: string | null;
2402
+ requireCustomerFields: {
2403
+ customerName?: boolean | undefined;
2404
+ customerEmail?: boolean | undefined;
2405
+ } | null;
2406
+ successUrl: string | null;
2407
+ customerId: string | null;
2408
+ customerExternalId: string | null;
2409
+ customerIpAddress: string | null;
2410
+ customerBillingAddress: Record<string, any> | null;
2411
+ products: {
2412
+ id: string;
2413
+ name: string;
2414
+ description: string | null;
2415
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2416
+ prices: {
2417
+ id: string;
2418
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2419
+ priceAmount: number | null;
2420
+ minimumAmount: number | null;
2421
+ maximumAmount: number | null;
2422
+ presetAmount: number | null;
2423
+ unitAmount: number | null;
2424
+ capAmount: number | null;
2425
+ meterId: string | null;
2426
+ }[];
2427
+ }[] | null;
2428
+ providedAmount: number | null;
2429
+ totalAmount: number;
2430
+ discountAmount: number;
2431
+ netAmount: number;
2432
+ taxAmount: number;
2433
+ invoiceAmountSats: number;
2434
+ invoiceScid: string | null;
2435
+ btcPrice: number;
2436
+ invoice: {
2437
+ expiresAt: Date;
2438
+ currency: string;
2439
+ btcPrice: number;
2440
+ invoice: string;
2441
+ paymentHash: string;
2442
+ amountSats: number;
2443
+ amountSatsReceived: number;
2444
+ fiatAmount: number;
2445
+ };
2446
+ } | {
2447
+ id: string;
2448
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
2449
+ status: "EXPIRED";
2450
+ createdAt: Date;
2451
+ clientSecret: string;
2452
+ organizationId: string;
2453
+ expiresAt: Date;
2454
+ userMetadata: Record<string, any> | null;
2455
+ customFieldData: Record<string, any> | null;
2456
+ customerMetadata: Record<string, any> | null;
2457
+ currency: string;
2458
+ allowDiscountCodes: boolean;
2459
+ customerName: string | null;
2460
+ customerEmail: string | null;
2461
+ requireCustomerFields: {
2462
+ customerName?: boolean | undefined;
2463
+ customerEmail?: boolean | undefined;
2464
+ } | null;
2465
+ successUrl: string | null;
2466
+ customerId: string | null;
2467
+ customerExternalId: string | null;
2468
+ customerIpAddress: string | null;
2469
+ customerBillingAddress: Record<string, any> | null;
2470
+ products: {
2471
+ id: string;
2472
+ name: string;
2473
+ description: string | null;
2474
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2475
+ prices: {
2476
+ id: string;
2477
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2478
+ priceAmount: number | null;
2479
+ minimumAmount: number | null;
2480
+ maximumAmount: number | null;
2481
+ presetAmount: number | null;
2482
+ unitAmount: number | null;
2483
+ capAmount: number | null;
2484
+ meterId: string | null;
2485
+ }[];
2486
+ }[] | null;
2487
+ providedAmount: number | null;
2488
+ totalAmount: number | null;
2489
+ discountAmount: number | null;
2490
+ netAmount: number | null;
2491
+ taxAmount: number | null;
2492
+ invoiceAmountSats: number | null;
2493
+ invoiceScid: string | null;
2494
+ btcPrice: number | null;
2495
+ invoice: {
2496
+ expiresAt: Date;
2497
+ currency: string;
2498
+ btcPrice: number | null;
2499
+ invoice: string;
2500
+ paymentHash: string;
2501
+ amountSats: number | null;
2502
+ amountSatsReceived: number | null;
2503
+ fiatAmount: number | null;
2504
+ } | null;
2505
+ }>;
2506
+ registerInvoice: (params: Parameters<typeof this.client.checkout.registerInvoice>[0]) => Promise<{
2507
+ id: string;
2508
+ type: "PRODUCTS";
2509
+ status: "UNCONFIRMED";
2510
+ createdAt: Date;
2511
+ clientSecret: string;
2512
+ organizationId: string;
2513
+ expiresAt: Date;
2514
+ userMetadata: Record<string, any> | null;
2515
+ customFieldData: Record<string, any> | null;
2516
+ customerMetadata: Record<string, any> | null;
2517
+ currency: string;
2518
+ allowDiscountCodes: boolean;
2519
+ customerName: string | null;
2520
+ customerEmail: string | null;
2521
+ requireCustomerFields: {
2522
+ customerName?: boolean | undefined;
2523
+ customerEmail?: boolean | undefined;
2524
+ } | null;
2525
+ successUrl: string | null;
2526
+ customerId: string | null;
2527
+ customerExternalId: string | null;
2528
+ customerIpAddress: string | null;
2529
+ customerBillingAddress: Record<string, any> | null;
2530
+ products: [{
2531
+ id: string;
2532
+ name: string;
2533
+ description: string | null;
2534
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2535
+ prices: {
2536
+ id: string;
2537
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2538
+ priceAmount: number | null;
2539
+ minimumAmount: number | null;
2540
+ maximumAmount: number | null;
2541
+ presetAmount: number | null;
2542
+ unitAmount: number | null;
2543
+ capAmount: number | null;
2544
+ meterId: string | null;
2545
+ }[];
2546
+ }, ...{
2547
+ id: string;
2548
+ name: string;
2549
+ description: string | null;
2550
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2551
+ prices: {
2552
+ id: string;
2553
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2554
+ priceAmount: number | null;
2555
+ minimumAmount: number | null;
2556
+ maximumAmount: number | null;
2557
+ presetAmount: number | null;
2558
+ unitAmount: number | null;
2559
+ capAmount: number | null;
2560
+ meterId: string | null;
2561
+ }[];
2562
+ }[]];
2563
+ providedAmount: number | null;
2564
+ totalAmount: number | null;
2565
+ discountAmount: number | null;
2566
+ netAmount: number | null;
2567
+ taxAmount: number | null;
2568
+ invoiceAmountSats: number | null;
2569
+ invoiceScid: string | null;
2570
+ btcPrice: number | null;
2571
+ invoice: {
2572
+ expiresAt: Date;
2573
+ currency: string;
2574
+ btcPrice: number | null;
2575
+ invoice: string;
2576
+ paymentHash: string;
2577
+ amountSats: number | null;
2578
+ amountSatsReceived: number | null;
2579
+ fiatAmount: number | null;
2580
+ } | null;
2581
+ } | {
2582
+ id: string;
2583
+ type: "AMOUNT";
2584
+ status: "UNCONFIRMED";
2585
+ createdAt: Date;
2586
+ clientSecret: string;
2587
+ organizationId: string;
2588
+ expiresAt: Date;
2589
+ userMetadata: Record<string, any> | null;
2590
+ customFieldData: Record<string, any> | null;
2591
+ customerMetadata: Record<string, any> | null;
2592
+ currency: string;
2593
+ allowDiscountCodes: boolean;
2594
+ customerName: string | null;
2595
+ customerEmail: string | null;
2596
+ requireCustomerFields: {
2597
+ customerName?: boolean | undefined;
2598
+ customerEmail?: boolean | undefined;
2599
+ } | null;
2600
+ successUrl: string | null;
2601
+ customerId: string | null;
2602
+ customerExternalId: string | null;
2603
+ customerIpAddress: string | null;
2604
+ customerBillingAddress: Record<string, any> | null;
2605
+ products: {
2606
+ id: string;
2607
+ name: string;
2608
+ description: string | null;
2609
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2610
+ prices: {
2611
+ id: string;
2612
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2613
+ priceAmount: number | null;
2614
+ minimumAmount: number | null;
2615
+ maximumAmount: number | null;
2616
+ presetAmount: number | null;
2617
+ unitAmount: number | null;
2618
+ capAmount: number | null;
2619
+ meterId: string | null;
2620
+ }[];
2621
+ }[] | null;
2622
+ providedAmount: number;
2623
+ totalAmount: number | null;
2624
+ discountAmount: number | null;
2625
+ netAmount: number | null;
2626
+ taxAmount: number | null;
2627
+ invoiceAmountSats: number | null;
2628
+ invoiceScid: string | null;
2629
+ btcPrice: number | null;
2630
+ invoice: {
2631
+ expiresAt: Date;
2632
+ currency: string;
2633
+ btcPrice: number | null;
2634
+ invoice: string;
2635
+ paymentHash: string;
2636
+ amountSats: number | null;
2637
+ amountSatsReceived: number | null;
2638
+ fiatAmount: number | null;
2639
+ } | null;
2640
+ } | {
2641
+ id: string;
2642
+ type: "TOP_UP";
2643
+ status: "UNCONFIRMED";
2644
+ createdAt: Date;
2645
+ clientSecret: string;
2646
+ organizationId: string;
2647
+ expiresAt: Date;
2648
+ userMetadata: Record<string, any> | null;
2649
+ customFieldData: Record<string, any> | null;
2650
+ customerMetadata: Record<string, any> | null;
2651
+ currency: string;
2652
+ allowDiscountCodes: boolean;
2653
+ customerName: string | null;
2654
+ customerEmail: string | null;
2655
+ requireCustomerFields: {
2656
+ customerName?: boolean | undefined;
2657
+ customerEmail?: boolean | undefined;
2658
+ } | null;
2659
+ successUrl: string | null;
2660
+ customerId: string | null;
2661
+ customerExternalId: string | null;
2662
+ customerIpAddress: string | null;
2663
+ customerBillingAddress: Record<string, any> | null;
2664
+ products: {
2665
+ id: string;
2666
+ name: string;
2667
+ description: string | null;
2668
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2669
+ prices: {
2670
+ id: string;
2671
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2672
+ priceAmount: number | null;
2673
+ minimumAmount: number | null;
2674
+ maximumAmount: number | null;
2675
+ presetAmount: number | null;
2676
+ unitAmount: number | null;
2677
+ capAmount: number | null;
2678
+ meterId: string | null;
2679
+ }[];
2680
+ }[] | null;
2681
+ providedAmount: number | null;
2682
+ totalAmount: number | null;
2683
+ discountAmount: number | null;
2684
+ netAmount: number | null;
2685
+ taxAmount: number | null;
2686
+ invoiceAmountSats: number | null;
2687
+ invoiceScid: string | null;
2688
+ btcPrice: number | null;
2689
+ invoice: {
2690
+ expiresAt: Date;
2691
+ currency: string;
2692
+ btcPrice: number | null;
2693
+ invoice: string;
2694
+ paymentHash: string;
2695
+ amountSats: number | null;
2696
+ amountSatsReceived: number | null;
2697
+ fiatAmount: number | null;
2698
+ } | null;
2699
+ } | {
2700
+ id: string;
2701
+ type: "PRODUCTS";
2702
+ status: "CONFIRMED";
2703
+ createdAt: Date;
2704
+ clientSecret: string;
2705
+ organizationId: string;
2706
+ expiresAt: Date;
2707
+ userMetadata: Record<string, any> | null;
2708
+ customFieldData: Record<string, any> | null;
2709
+ customerMetadata: Record<string, any> | null;
2710
+ currency: string;
2711
+ allowDiscountCodes: boolean;
2712
+ customerName: string | null;
2713
+ customerEmail: string | null;
2714
+ requireCustomerFields: {
2715
+ customerName?: boolean | undefined;
2716
+ customerEmail?: boolean | undefined;
2717
+ } | null;
2718
+ successUrl: string | null;
2719
+ customerId: string | null;
2720
+ customerExternalId: string | null;
2721
+ customerIpAddress: string | null;
2722
+ customerBillingAddress: Record<string, any> | null;
2723
+ products: [{
2724
+ id: string;
2725
+ name: string;
2726
+ description: string | null;
2727
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2728
+ prices: {
2729
+ id: string;
2730
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2731
+ priceAmount: number | null;
2732
+ minimumAmount: number | null;
2733
+ maximumAmount: number | null;
2734
+ presetAmount: number | null;
2735
+ unitAmount: number | null;
2736
+ capAmount: number | null;
2737
+ meterId: string | null;
2738
+ }[];
2739
+ }, ...{
2740
+ id: string;
2741
+ name: string;
2742
+ description: string | null;
2743
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2744
+ prices: {
2745
+ id: string;
2746
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2747
+ priceAmount: number | null;
2748
+ minimumAmount: number | null;
2749
+ maximumAmount: number | null;
2750
+ presetAmount: number | null;
2751
+ unitAmount: number | null;
2752
+ capAmount: number | null;
2753
+ meterId: string | null;
2754
+ }[];
2755
+ }[]];
2756
+ providedAmount: number | null;
2757
+ totalAmount: number;
2758
+ discountAmount: number;
2759
+ netAmount: number;
2760
+ taxAmount: number;
2761
+ invoiceAmountSats: number;
2762
+ invoiceScid: string | null;
2763
+ btcPrice: number;
2764
+ invoice: {
2765
+ expiresAt: Date;
2766
+ currency: string;
2767
+ btcPrice: number | null;
2768
+ invoice: string;
2769
+ paymentHash: string;
2770
+ amountSats: number | null;
2771
+ amountSatsReceived: number | null;
2772
+ fiatAmount: number | null;
2773
+ } | null;
2774
+ } | {
2775
+ id: string;
2776
+ type: "AMOUNT";
2777
+ status: "CONFIRMED";
2778
+ createdAt: Date;
2779
+ clientSecret: string;
2780
+ organizationId: string;
2781
+ expiresAt: Date;
2782
+ userMetadata: Record<string, any> | null;
2783
+ customFieldData: Record<string, any> | null;
2784
+ customerMetadata: Record<string, any> | null;
2785
+ currency: string;
2786
+ allowDiscountCodes: boolean;
2787
+ customerName: string | null;
2788
+ customerEmail: string | null;
2789
+ requireCustomerFields: {
2790
+ customerName?: boolean | undefined;
2791
+ customerEmail?: boolean | undefined;
2792
+ } | null;
2793
+ successUrl: string | null;
2794
+ customerId: string | null;
2795
+ customerExternalId: string | null;
2796
+ customerIpAddress: string | null;
2797
+ customerBillingAddress: Record<string, any> | null;
2798
+ products: {
2799
+ id: string;
2800
+ name: string;
2801
+ description: string | null;
2802
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2803
+ prices: {
2804
+ id: string;
2805
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2806
+ priceAmount: number | null;
2807
+ minimumAmount: number | null;
2808
+ maximumAmount: number | null;
2809
+ presetAmount: number | null;
2810
+ unitAmount: number | null;
2811
+ capAmount: number | null;
2812
+ meterId: string | null;
2813
+ }[];
2814
+ }[] | null;
2815
+ providedAmount: number;
2816
+ totalAmount: number;
2817
+ discountAmount: number;
2818
+ netAmount: number;
2819
+ taxAmount: number;
2820
+ invoiceAmountSats: number;
2821
+ invoiceScid: string | null;
2822
+ btcPrice: number;
2823
+ invoice: {
2824
+ expiresAt: Date;
2825
+ currency: string;
2826
+ btcPrice: number | null;
2827
+ invoice: string;
2828
+ paymentHash: string;
2829
+ amountSats: number | null;
2830
+ amountSatsReceived: number | null;
2831
+ fiatAmount: number | null;
2832
+ } | null;
2833
+ } | {
2834
+ id: string;
2835
+ type: "TOP_UP";
2836
+ status: "CONFIRMED";
2837
+ createdAt: Date;
2838
+ clientSecret: string;
2839
+ organizationId: string;
2840
+ expiresAt: Date;
2841
+ userMetadata: Record<string, any> | null;
2842
+ customFieldData: Record<string, any> | null;
2843
+ customerMetadata: Record<string, any> | null;
2844
+ currency: string;
2845
+ allowDiscountCodes: boolean;
2846
+ customerName: string | null;
2847
+ customerEmail: string | null;
2848
+ requireCustomerFields: {
2849
+ customerName?: boolean | undefined;
2850
+ customerEmail?: boolean | undefined;
2851
+ } | null;
2852
+ successUrl: string | null;
2853
+ customerId: string | null;
2854
+ customerExternalId: string | null;
2855
+ customerIpAddress: string | null;
2856
+ customerBillingAddress: Record<string, any> | null;
2857
+ products: {
2858
+ id: string;
2859
+ name: string;
2860
+ description: string | null;
2861
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2862
+ prices: {
2863
+ id: string;
2864
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2865
+ priceAmount: number | null;
2866
+ minimumAmount: number | null;
2867
+ maximumAmount: number | null;
2868
+ presetAmount: number | null;
2869
+ unitAmount: number | null;
2870
+ capAmount: number | null;
2871
+ meterId: string | null;
2872
+ }[];
2873
+ }[] | null;
2874
+ providedAmount: number | null;
2875
+ totalAmount: number | null;
2876
+ discountAmount: number | null;
2877
+ netAmount: number | null;
2878
+ taxAmount: number | null;
2879
+ invoiceAmountSats: number | null;
2880
+ invoiceScid: string | null;
2881
+ btcPrice: number | null;
2882
+ invoice: {
2883
+ expiresAt: Date;
2884
+ currency: string;
2885
+ btcPrice: number | null;
2886
+ invoice: string;
2887
+ paymentHash: string;
2888
+ amountSats: number | null;
2889
+ amountSatsReceived: number | null;
2890
+ fiatAmount: number | null;
2891
+ } | null;
2892
+ } | {
2893
+ id: string;
2894
+ type: "PRODUCTS";
2895
+ status: "PENDING_PAYMENT";
2896
+ createdAt: Date;
2897
+ clientSecret: string;
2898
+ organizationId: string;
2899
+ expiresAt: Date;
2900
+ userMetadata: Record<string, any> | null;
2901
+ customFieldData: Record<string, any> | null;
2902
+ customerMetadata: Record<string, any> | null;
2903
+ currency: string;
2904
+ allowDiscountCodes: boolean;
2905
+ customerName: string | null;
2906
+ customerEmail: string | null;
2907
+ requireCustomerFields: {
2908
+ customerName?: boolean | undefined;
2909
+ customerEmail?: boolean | undefined;
2910
+ } | null;
2911
+ successUrl: string | null;
2912
+ customerId: string | null;
2913
+ customerExternalId: string | null;
2914
+ customerIpAddress: string | null;
2915
+ customerBillingAddress: Record<string, any> | null;
2916
+ products: [{
2917
+ id: string;
2918
+ name: string;
2919
+ description: string | null;
2920
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2921
+ prices: {
2922
+ id: string;
2923
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2924
+ priceAmount: number | null;
2925
+ minimumAmount: number | null;
2926
+ maximumAmount: number | null;
2927
+ presetAmount: number | null;
2928
+ unitAmount: number | null;
2929
+ capAmount: number | null;
2930
+ meterId: string | null;
2931
+ }[];
2932
+ }, ...{
2933
+ id: string;
2934
+ name: string;
2935
+ description: string | null;
2936
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2937
+ prices: {
2938
+ id: string;
2939
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2940
+ priceAmount: number | null;
2941
+ minimumAmount: number | null;
2942
+ maximumAmount: number | null;
2943
+ presetAmount: number | null;
2944
+ unitAmount: number | null;
2945
+ capAmount: number | null;
2946
+ meterId: string | null;
2947
+ }[];
2948
+ }[]];
2949
+ providedAmount: number | null;
2950
+ totalAmount: number;
2951
+ discountAmount: number;
2952
+ netAmount: number;
2953
+ taxAmount: number;
2954
+ invoiceAmountSats: number;
2955
+ invoiceScid: string | null;
2956
+ btcPrice: number;
2957
+ invoice: {
2958
+ expiresAt: Date;
2959
+ currency: string;
2960
+ btcPrice: number;
2961
+ invoice: string;
2962
+ paymentHash: string;
2963
+ amountSats: number;
2964
+ amountSatsReceived: number | null;
2965
+ fiatAmount: number;
2966
+ };
2967
+ } | {
2968
+ id: string;
2969
+ type: "AMOUNT";
2970
+ status: "PENDING_PAYMENT";
2971
+ createdAt: Date;
2972
+ clientSecret: string;
2973
+ organizationId: string;
2974
+ expiresAt: Date;
2975
+ userMetadata: Record<string, any> | null;
2976
+ customFieldData: Record<string, any> | null;
2977
+ customerMetadata: Record<string, any> | null;
2978
+ currency: string;
2979
+ allowDiscountCodes: boolean;
2980
+ customerName: string | null;
2981
+ customerEmail: string | null;
2982
+ requireCustomerFields: {
2983
+ customerName?: boolean | undefined;
2984
+ customerEmail?: boolean | undefined;
2985
+ } | null;
2986
+ successUrl: string | null;
2987
+ customerId: string | null;
2988
+ customerExternalId: string | null;
2989
+ customerIpAddress: string | null;
2990
+ customerBillingAddress: Record<string, any> | null;
2991
+ products: {
2992
+ id: string;
2993
+ name: string;
2994
+ description: string | null;
2995
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2996
+ prices: {
2997
+ id: string;
2998
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2999
+ priceAmount: number | null;
3000
+ minimumAmount: number | null;
3001
+ maximumAmount: number | null;
3002
+ presetAmount: number | null;
3003
+ unitAmount: number | null;
3004
+ capAmount: number | null;
3005
+ meterId: string | null;
3006
+ }[];
3007
+ }[] | null;
3008
+ providedAmount: number;
3009
+ totalAmount: number;
3010
+ discountAmount: number;
3011
+ netAmount: number;
3012
+ taxAmount: number;
3013
+ invoiceAmountSats: number;
3014
+ invoiceScid: string | null;
3015
+ btcPrice: number;
3016
+ invoice: {
3017
+ expiresAt: Date;
3018
+ currency: string;
3019
+ btcPrice: number;
3020
+ invoice: string;
3021
+ paymentHash: string;
3022
+ amountSats: number;
3023
+ amountSatsReceived: number | null;
3024
+ fiatAmount: number;
3025
+ };
3026
+ } | {
3027
+ id: string;
3028
+ type: "TOP_UP";
3029
+ status: "PENDING_PAYMENT";
3030
+ createdAt: Date;
3031
+ clientSecret: string;
3032
+ organizationId: string;
3033
+ expiresAt: Date;
3034
+ userMetadata: Record<string, any> | null;
3035
+ customFieldData: Record<string, any> | null;
3036
+ customerMetadata: Record<string, any> | null;
3037
+ currency: string;
3038
+ allowDiscountCodes: boolean;
3039
+ customerName: string | null;
3040
+ customerEmail: string | null;
3041
+ requireCustomerFields: {
3042
+ customerName?: boolean | undefined;
3043
+ customerEmail?: boolean | undefined;
3044
+ } | null;
3045
+ successUrl: string | null;
3046
+ customerId: string | null;
3047
+ customerExternalId: string | null;
3048
+ customerIpAddress: string | null;
3049
+ customerBillingAddress: Record<string, any> | null;
3050
+ products: {
3051
+ id: string;
3052
+ name: string;
3053
+ description: string | null;
3054
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
3055
+ prices: {
3056
+ id: string;
3057
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
3058
+ priceAmount: number | null;
3059
+ minimumAmount: number | null;
3060
+ maximumAmount: number | null;
3061
+ presetAmount: number | null;
3062
+ unitAmount: number | null;
3063
+ capAmount: number | null;
3064
+ meterId: string | null;
3065
+ }[];
3066
+ }[] | null;
3067
+ providedAmount: number | null;
3068
+ totalAmount: number | null;
3069
+ discountAmount: number | null;
3070
+ netAmount: number | null;
3071
+ taxAmount: number | null;
3072
+ invoiceAmountSats: number | null;
3073
+ invoiceScid: string | null;
3074
+ btcPrice: number | null;
3075
+ invoice: {
3076
+ expiresAt: Date;
3077
+ currency: string;
3078
+ btcPrice: number | null;
3079
+ invoice: string;
3080
+ paymentHash: string;
3081
+ amountSats: number | null;
3082
+ amountSatsReceived: number | null;
3083
+ fiatAmount: number | null;
3084
+ };
3085
+ } | {
3086
+ id: string;
3087
+ type: "PRODUCTS";
3088
+ status: "PAYMENT_RECEIVED";
3089
+ createdAt: Date;
3090
+ clientSecret: string;
3091
+ organizationId: string;
3092
+ expiresAt: Date;
3093
+ userMetadata: Record<string, any> | null;
3094
+ customFieldData: Record<string, any> | null;
3095
+ customerMetadata: Record<string, any> | null;
3096
+ currency: string;
3097
+ allowDiscountCodes: boolean;
3098
+ customerName: string | null;
3099
+ customerEmail: string | null;
3100
+ requireCustomerFields: {
3101
+ customerName?: boolean | undefined;
3102
+ customerEmail?: boolean | undefined;
3103
+ } | null;
3104
+ successUrl: string | null;
3105
+ customerId: string | null;
3106
+ customerExternalId: string | null;
3107
+ customerIpAddress: string | null;
3108
+ customerBillingAddress: Record<string, any> | null;
3109
+ products: [{
3110
+ id: string;
3111
+ name: string;
3112
+ description: string | null;
3113
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
3114
+ prices: {
3115
+ id: string;
3116
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
3117
+ priceAmount: number | null;
3118
+ minimumAmount: number | null;
3119
+ maximumAmount: number | null;
3120
+ presetAmount: number | null;
3121
+ unitAmount: number | null;
3122
+ capAmount: number | null;
3123
+ meterId: string | null;
3124
+ }[];
3125
+ }, ...{
3126
+ id: string;
3127
+ name: string;
3128
+ description: string | null;
3129
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
3130
+ prices: {
3131
+ id: string;
3132
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
3133
+ priceAmount: number | null;
3134
+ minimumAmount: number | null;
3135
+ maximumAmount: number | null;
3136
+ presetAmount: number | null;
3137
+ unitAmount: number | null;
3138
+ capAmount: number | null;
3139
+ meterId: string | null;
3140
+ }[];
3141
+ }[]];
3142
+ providedAmount: number | null;
3143
+ totalAmount: number;
3144
+ discountAmount: number;
3145
+ netAmount: number;
3146
+ taxAmount: number;
3147
+ invoiceAmountSats: number;
3148
+ invoiceScid: string | null;
3149
+ btcPrice: number;
3150
+ invoice: {
3151
+ expiresAt: Date;
3152
+ currency: string;
3153
+ btcPrice: number;
3154
+ invoice: string;
3155
+ paymentHash: string;
3156
+ amountSats: number;
3157
+ amountSatsReceived: number;
3158
+ fiatAmount: number;
3159
+ };
3160
+ } | {
3161
+ id: string;
3162
+ type: "AMOUNT";
3163
+ status: "PAYMENT_RECEIVED";
3164
+ createdAt: Date;
3165
+ clientSecret: string;
3166
+ organizationId: string;
3167
+ expiresAt: Date;
3168
+ userMetadata: Record<string, any> | null;
3169
+ customFieldData: Record<string, any> | null;
3170
+ customerMetadata: Record<string, any> | null;
3171
+ currency: string;
3172
+ allowDiscountCodes: boolean;
3173
+ customerName: string | null;
3174
+ customerEmail: string | null;
3175
+ requireCustomerFields: {
3176
+ customerName?: boolean | undefined;
3177
+ customerEmail?: boolean | undefined;
3178
+ } | null;
3179
+ successUrl: string | null;
3180
+ customerId: string | null;
3181
+ customerExternalId: string | null;
3182
+ customerIpAddress: string | null;
3183
+ customerBillingAddress: Record<string, any> | null;
3184
+ products: {
3185
+ id: string;
3186
+ name: string;
3187
+ description: string | null;
3188
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
3189
+ prices: {
3190
+ id: string;
3191
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
3192
+ priceAmount: number | null;
3193
+ minimumAmount: number | null;
3194
+ maximumAmount: number | null;
3195
+ presetAmount: number | null;
3196
+ unitAmount: number | null;
3197
+ capAmount: number | null;
3198
+ meterId: string | null;
3199
+ }[];
3200
+ }[] | null;
3201
+ providedAmount: number;
3202
+ totalAmount: number;
3203
+ discountAmount: number;
3204
+ netAmount: number;
3205
+ taxAmount: number;
3206
+ invoiceAmountSats: number;
3207
+ invoiceScid: string | null;
3208
+ btcPrice: number;
3209
+ invoice: {
3210
+ expiresAt: Date;
3211
+ currency: string;
3212
+ btcPrice: number;
3213
+ invoice: string;
3214
+ paymentHash: string;
3215
+ amountSats: number;
3216
+ amountSatsReceived: number;
3217
+ fiatAmount: number;
3218
+ };
3219
+ } | {
3220
+ id: string;
3221
+ type: "TOP_UP";
3222
+ status: "PAYMENT_RECEIVED";
3223
+ createdAt: Date;
3224
+ clientSecret: string;
3225
+ organizationId: string;
3226
+ expiresAt: Date;
3227
+ userMetadata: Record<string, any> | null;
3228
+ customFieldData: Record<string, any> | null;
3229
+ customerMetadata: Record<string, any> | null;
3230
+ currency: string;
3231
+ allowDiscountCodes: boolean;
3232
+ customerName: string | null;
3233
+ customerEmail: string | null;
3234
+ requireCustomerFields: {
3235
+ customerName?: boolean | undefined;
3236
+ customerEmail?: boolean | undefined;
3237
+ } | null;
3238
+ successUrl: string | null;
3239
+ customerId: string | null;
3240
+ customerExternalId: string | null;
3241
+ customerIpAddress: string | null;
3242
+ customerBillingAddress: Record<string, any> | null;
3243
+ products: {
3244
+ id: string;
3245
+ name: string;
3246
+ description: string | null;
3247
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
3248
+ prices: {
3249
+ id: string;
3250
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
3251
+ priceAmount: number | null;
3252
+ minimumAmount: number | null;
3253
+ maximumAmount: number | null;
3254
+ presetAmount: number | null;
3255
+ unitAmount: number | null;
3256
+ capAmount: number | null;
3257
+ meterId: string | null;
3258
+ }[];
3259
+ }[] | null;
3260
+ providedAmount: number | null;
3261
+ totalAmount: number;
3262
+ discountAmount: number;
3263
+ netAmount: number;
3264
+ taxAmount: number;
3265
+ invoiceAmountSats: number;
3266
+ invoiceScid: string | null;
3267
+ btcPrice: number;
3268
+ invoice: {
3269
+ expiresAt: Date;
3270
+ currency: string;
3271
+ btcPrice: number;
3272
+ invoice: string;
3273
+ paymentHash: string;
3274
+ amountSats: number;
3275
+ amountSatsReceived: number;
3276
+ fiatAmount: number;
3277
+ };
3278
+ } | {
3279
+ id: string;
3280
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
3281
+ status: "EXPIRED";
3282
+ createdAt: Date;
3283
+ clientSecret: string;
3284
+ organizationId: string;
3285
+ expiresAt: Date;
3286
+ userMetadata: Record<string, any> | null;
3287
+ customFieldData: Record<string, any> | null;
3288
+ customerMetadata: Record<string, any> | null;
3289
+ currency: string;
3290
+ allowDiscountCodes: boolean;
3291
+ customerName: string | null;
3292
+ customerEmail: string | null;
3293
+ requireCustomerFields: {
3294
+ customerName?: boolean | undefined;
3295
+ customerEmail?: boolean | undefined;
3296
+ } | null;
3297
+ successUrl: string | null;
3298
+ customerId: string | null;
3299
+ customerExternalId: string | null;
3300
+ customerIpAddress: string | null;
3301
+ customerBillingAddress: Record<string, any> | null;
3302
+ products: {
3303
+ id: string;
3304
+ name: string;
3305
+ description: string | null;
3306
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
3307
+ prices: {
3308
+ id: string;
3309
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
3310
+ priceAmount: number | null;
3311
+ minimumAmount: number | null;
3312
+ maximumAmount: number | null;
3313
+ presetAmount: number | null;
3314
+ unitAmount: number | null;
3315
+ capAmount: number | null;
3316
+ meterId: string | null;
3317
+ }[];
3318
+ }[] | null;
3319
+ providedAmount: number | null;
3320
+ totalAmount: number | null;
3321
+ discountAmount: number | null;
3322
+ netAmount: number | null;
3323
+ taxAmount: number | null;
3324
+ invoiceAmountSats: number | null;
3325
+ invoiceScid: string | null;
3326
+ btcPrice: number | null;
3327
+ invoice: {
3328
+ expiresAt: Date;
3329
+ currency: string;
3330
+ btcPrice: number | null;
3331
+ invoice: string;
3332
+ paymentHash: string;
3333
+ amountSats: number | null;
3334
+ amountSatsReceived: number | null;
3335
+ fiatAmount: number | null;
3336
+ } | null;
3337
+ }>;
3338
+ paymentReceived: (params: Parameters<typeof this.client.checkout.paymentReceived>[0]) => Promise<{
3339
+ ok: boolean;
3340
+ }>;
3341
+ };
3342
+ }