@moneydevkit/nextjs 0.1.1 → 0.1.2

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