@moneydevkit/core 0.5.0-beta.1 → 0.5.0

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