@moneydevkit/nextjs 0.1.22 → 0.2.0

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