@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.
package/dist/actions.d.ts CHANGED
@@ -1,1668 +1,22 @@
1
- import type { ConfirmCheckout } from '@moneydevkit/api-contract';
2
- export declare function getCheckout(checkoutId: string): Promise<{
3
- id: string;
4
- type: "PRODUCTS";
5
- status: "UNCONFIRMED";
6
- createdAt: Date;
7
- clientSecret: string;
8
- organizationId: string;
9
- expiresAt: Date;
10
- userMetadata: Record<string, any> | null;
11
- customFieldData: Record<string, any> | null;
12
- customerMetadata: Record<string, any> | null;
13
- currency: string;
14
- allowDiscountCodes: boolean;
15
- customerName: string | null;
16
- customerEmail: string | null;
17
- requireCustomerFields: {
18
- customerName?: boolean | undefined;
19
- customerEmail?: boolean | undefined;
20
- } | null;
21
- successUrl: string | null;
22
- customerId: string | null;
23
- customerExternalId: string | null;
24
- customerIpAddress: string | null;
25
- customerBillingAddress: Record<string, any> | null;
26
- products: [{
27
- id: string;
28
- name: string;
29
- description: string | null;
30
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
31
- prices: {
32
- id: string;
33
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
34
- priceAmount: number | null;
35
- minimumAmount: number | null;
36
- maximumAmount: number | null;
37
- presetAmount: number | null;
38
- unitAmount: number | null;
39
- capAmount: number | null;
40
- meterId: string | null;
41
- }[];
42
- }, ...{
43
- id: string;
44
- name: string;
45
- description: string | null;
46
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
47
- prices: {
48
- id: string;
49
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
50
- priceAmount: number | null;
51
- minimumAmount: number | null;
52
- maximumAmount: number | null;
53
- presetAmount: number | null;
54
- unitAmount: number | null;
55
- capAmount: number | null;
56
- meterId: string | null;
57
- }[];
58
- }[]];
59
- providedAmount: number | null;
60
- totalAmount: number | null;
61
- discountAmount: number | null;
62
- netAmount: number | null;
63
- taxAmount: number | null;
64
- invoiceAmountSats: number | null;
65
- invoiceScid: string | null;
66
- btcPrice: number | null;
67
- invoice: {
68
- expiresAt: Date;
69
- currency: string;
70
- btcPrice: number | null;
71
- invoice: string;
72
- paymentHash: string;
73
- amountSats: number | null;
74
- amountSatsReceived: number | null;
75
- fiatAmount: number | null;
76
- } | null;
77
- } | {
78
- id: string;
79
- type: "AMOUNT";
80
- status: "UNCONFIRMED";
81
- createdAt: Date;
82
- clientSecret: string;
83
- organizationId: string;
84
- expiresAt: Date;
85
- userMetadata: Record<string, any> | null;
86
- customFieldData: Record<string, any> | null;
87
- customerMetadata: Record<string, any> | null;
88
- currency: string;
89
- allowDiscountCodes: boolean;
90
- customerName: string | null;
91
- customerEmail: string | null;
92
- requireCustomerFields: {
93
- customerName?: boolean | undefined;
94
- customerEmail?: boolean | undefined;
95
- } | null;
96
- successUrl: string | null;
97
- customerId: string | null;
98
- customerExternalId: string | null;
99
- customerIpAddress: string | null;
100
- customerBillingAddress: Record<string, any> | null;
101
- products: {
102
- id: string;
103
- name: string;
104
- description: string | null;
105
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
106
- prices: {
107
- id: string;
108
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
109
- priceAmount: number | null;
110
- minimumAmount: number | null;
111
- maximumAmount: number | null;
112
- presetAmount: number | null;
113
- unitAmount: number | null;
114
- capAmount: number | null;
115
- meterId: string | null;
116
- }[];
117
- }[] | null;
118
- providedAmount: number;
119
- totalAmount: number | null;
120
- discountAmount: number | null;
121
- netAmount: number | null;
122
- taxAmount: number | null;
123
- invoiceAmountSats: number | null;
124
- invoiceScid: string | null;
125
- btcPrice: number | null;
126
- invoice: {
127
- expiresAt: Date;
128
- currency: string;
129
- btcPrice: number | null;
130
- invoice: string;
131
- paymentHash: string;
132
- amountSats: number | null;
133
- amountSatsReceived: number | null;
134
- fiatAmount: number | null;
135
- } | null;
136
- } | {
137
- id: string;
138
- type: "TOP_UP";
139
- status: "UNCONFIRMED";
140
- createdAt: Date;
141
- clientSecret: string;
142
- organizationId: string;
143
- expiresAt: Date;
144
- userMetadata: Record<string, any> | null;
145
- customFieldData: Record<string, any> | null;
146
- customerMetadata: Record<string, any> | null;
147
- currency: string;
148
- allowDiscountCodes: boolean;
149
- customerName: string | null;
150
- customerEmail: string | null;
151
- requireCustomerFields: {
152
- customerName?: boolean | undefined;
153
- customerEmail?: boolean | undefined;
154
- } | null;
155
- successUrl: string | null;
156
- customerId: string | null;
157
- customerExternalId: string | null;
158
- customerIpAddress: string | null;
159
- customerBillingAddress: Record<string, any> | null;
160
- products: {
161
- id: string;
162
- name: string;
163
- description: string | null;
164
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
165
- prices: {
166
- id: string;
167
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
168
- priceAmount: number | null;
169
- minimumAmount: number | null;
170
- maximumAmount: number | null;
171
- presetAmount: number | null;
172
- unitAmount: number | null;
173
- capAmount: number | null;
174
- meterId: string | null;
175
- }[];
176
- }[] | null;
177
- providedAmount: number | null;
178
- totalAmount: number | null;
179
- discountAmount: number | null;
180
- netAmount: number | null;
181
- taxAmount: number | null;
182
- invoiceAmountSats: number | null;
183
- invoiceScid: string | null;
184
- btcPrice: number | null;
185
- invoice: {
186
- expiresAt: Date;
187
- currency: string;
188
- btcPrice: number | null;
189
- invoice: string;
190
- paymentHash: string;
191
- amountSats: number | null;
192
- amountSatsReceived: number | null;
193
- fiatAmount: number | null;
194
- } | null;
195
- } | {
196
- id: string;
197
- type: "PRODUCTS";
198
- status: "CONFIRMED";
199
- createdAt: Date;
200
- clientSecret: string;
201
- organizationId: string;
202
- expiresAt: Date;
203
- userMetadata: Record<string, any> | null;
204
- customFieldData: Record<string, any> | null;
205
- customerMetadata: Record<string, any> | null;
206
- currency: string;
207
- allowDiscountCodes: boolean;
208
- customerName: string | null;
209
- customerEmail: string | null;
210
- requireCustomerFields: {
211
- customerName?: boolean | undefined;
212
- customerEmail?: boolean | undefined;
213
- } | null;
214
- successUrl: string | null;
215
- customerId: string | null;
216
- customerExternalId: string | null;
217
- customerIpAddress: string | null;
218
- customerBillingAddress: Record<string, any> | null;
219
- products: [{
220
- id: string;
221
- name: string;
222
- description: string | null;
223
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
224
- prices: {
225
- id: string;
226
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
227
- priceAmount: number | null;
228
- minimumAmount: number | null;
229
- maximumAmount: number | null;
230
- presetAmount: number | null;
231
- unitAmount: number | null;
232
- capAmount: number | null;
233
- meterId: string | null;
234
- }[];
235
- }, ...{
236
- id: string;
237
- name: string;
238
- description: string | null;
239
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
240
- prices: {
241
- id: string;
242
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
243
- priceAmount: number | null;
244
- minimumAmount: number | null;
245
- maximumAmount: number | null;
246
- presetAmount: number | null;
247
- unitAmount: number | null;
248
- capAmount: number | null;
249
- meterId: string | null;
250
- }[];
251
- }[]];
252
- providedAmount: number | null;
253
- totalAmount: number;
254
- discountAmount: number;
255
- netAmount: number;
256
- taxAmount: number;
257
- invoiceAmountSats: number;
258
- invoiceScid: string | null;
259
- btcPrice: number;
260
- invoice: {
261
- expiresAt: Date;
262
- currency: string;
263
- btcPrice: number | null;
264
- invoice: string;
265
- paymentHash: string;
266
- amountSats: number | null;
267
- amountSatsReceived: number | null;
268
- fiatAmount: number | null;
269
- } | null;
270
- } | {
271
- id: string;
272
- type: "AMOUNT";
273
- status: "CONFIRMED";
274
- createdAt: Date;
275
- clientSecret: string;
276
- organizationId: string;
277
- expiresAt: Date;
278
- userMetadata: Record<string, any> | null;
279
- customFieldData: Record<string, any> | null;
280
- customerMetadata: Record<string, any> | null;
281
- currency: string;
282
- allowDiscountCodes: boolean;
283
- customerName: string | null;
284
- customerEmail: string | null;
285
- requireCustomerFields: {
286
- customerName?: boolean | undefined;
287
- customerEmail?: boolean | undefined;
288
- } | null;
289
- successUrl: string | null;
290
- customerId: string | null;
291
- customerExternalId: string | null;
292
- customerIpAddress: string | null;
293
- customerBillingAddress: Record<string, any> | null;
294
- products: {
295
- id: string;
296
- name: string;
297
- description: string | null;
298
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
299
- prices: {
300
- id: string;
301
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
302
- priceAmount: number | null;
303
- minimumAmount: number | null;
304
- maximumAmount: number | null;
305
- presetAmount: number | null;
306
- unitAmount: number | null;
307
- capAmount: number | null;
308
- meterId: string | null;
309
- }[];
310
- }[] | null;
311
- providedAmount: number;
312
- totalAmount: number;
313
- discountAmount: number;
314
- netAmount: number;
315
- taxAmount: number;
316
- invoiceAmountSats: number;
317
- invoiceScid: string | null;
318
- btcPrice: number;
319
- invoice: {
320
- expiresAt: Date;
321
- currency: string;
322
- btcPrice: number | null;
323
- invoice: string;
324
- paymentHash: string;
325
- amountSats: number | null;
326
- amountSatsReceived: number | null;
327
- fiatAmount: number | null;
328
- } | null;
329
- } | {
330
- id: string;
331
- type: "TOP_UP";
332
- status: "CONFIRMED";
333
- createdAt: Date;
334
- clientSecret: string;
335
- organizationId: string;
336
- expiresAt: Date;
337
- userMetadata: Record<string, any> | null;
338
- customFieldData: Record<string, any> | null;
339
- customerMetadata: Record<string, any> | null;
340
- currency: string;
341
- allowDiscountCodes: boolean;
342
- customerName: string | null;
343
- customerEmail: string | null;
344
- requireCustomerFields: {
345
- customerName?: boolean | undefined;
346
- customerEmail?: boolean | undefined;
347
- } | null;
348
- successUrl: string | null;
349
- customerId: string | null;
350
- customerExternalId: string | null;
351
- customerIpAddress: string | null;
352
- customerBillingAddress: Record<string, any> | null;
353
- products: {
354
- id: string;
355
- name: string;
356
- description: string | null;
357
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
358
- prices: {
359
- id: string;
360
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
361
- priceAmount: number | null;
362
- minimumAmount: number | null;
363
- maximumAmount: number | null;
364
- presetAmount: number | null;
365
- unitAmount: number | null;
366
- capAmount: number | null;
367
- meterId: string | null;
368
- }[];
369
- }[] | null;
370
- providedAmount: number | null;
371
- totalAmount: number | null;
372
- discountAmount: number | null;
373
- netAmount: number | null;
374
- taxAmount: number | null;
375
- invoiceAmountSats: number | null;
376
- invoiceScid: string | null;
377
- btcPrice: number | null;
378
- invoice: {
379
- expiresAt: Date;
380
- currency: string;
381
- btcPrice: number | null;
382
- invoice: string;
383
- paymentHash: string;
384
- amountSats: number | null;
385
- amountSatsReceived: number | null;
386
- fiatAmount: number | null;
387
- } | null;
388
- } | {
389
- id: string;
390
- type: "PRODUCTS";
391
- status: "PENDING_PAYMENT";
392
- createdAt: Date;
393
- clientSecret: string;
394
- organizationId: string;
395
- expiresAt: Date;
396
- userMetadata: Record<string, any> | null;
397
- customFieldData: Record<string, any> | null;
398
- customerMetadata: Record<string, any> | null;
399
- currency: string;
400
- allowDiscountCodes: boolean;
401
- customerName: string | null;
402
- customerEmail: string | null;
403
- requireCustomerFields: {
404
- customerName?: boolean | undefined;
405
- customerEmail?: boolean | undefined;
406
- } | null;
407
- successUrl: string | null;
408
- customerId: string | null;
409
- customerExternalId: string | null;
410
- customerIpAddress: string | null;
411
- customerBillingAddress: Record<string, any> | null;
412
- products: [{
413
- id: string;
414
- name: string;
415
- description: string | null;
416
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
417
- prices: {
418
- id: string;
419
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
420
- priceAmount: number | null;
421
- minimumAmount: number | null;
422
- maximumAmount: number | null;
423
- presetAmount: number | null;
424
- unitAmount: number | null;
425
- capAmount: number | null;
426
- meterId: string | null;
427
- }[];
428
- }, ...{
429
- id: string;
430
- name: string;
431
- description: string | null;
432
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
433
- prices: {
434
- id: string;
435
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
436
- priceAmount: number | null;
437
- minimumAmount: number | null;
438
- maximumAmount: number | null;
439
- presetAmount: number | null;
440
- unitAmount: number | null;
441
- capAmount: number | null;
442
- meterId: string | null;
443
- }[];
444
- }[]];
445
- providedAmount: number | null;
446
- totalAmount: number;
447
- discountAmount: number;
448
- netAmount: number;
449
- taxAmount: number;
450
- invoiceAmountSats: number;
451
- invoiceScid: string | null;
452
- btcPrice: number;
453
- invoice: {
454
- expiresAt: Date;
455
- currency: string;
456
- btcPrice: number;
457
- invoice: string;
458
- paymentHash: string;
459
- amountSats: number;
460
- amountSatsReceived: number | null;
461
- fiatAmount: number;
462
- };
463
- } | {
464
- id: string;
465
- type: "AMOUNT";
466
- status: "PENDING_PAYMENT";
467
- createdAt: Date;
468
- clientSecret: string;
469
- organizationId: string;
470
- expiresAt: Date;
471
- userMetadata: Record<string, any> | null;
472
- customFieldData: Record<string, any> | null;
473
- customerMetadata: Record<string, any> | null;
474
- currency: string;
475
- allowDiscountCodes: boolean;
476
- customerName: string | null;
477
- customerEmail: string | null;
478
- requireCustomerFields: {
479
- customerName?: boolean | undefined;
480
- customerEmail?: boolean | undefined;
481
- } | null;
482
- successUrl: string | null;
483
- customerId: string | null;
484
- customerExternalId: string | null;
485
- customerIpAddress: string | null;
486
- customerBillingAddress: Record<string, any> | null;
487
- products: {
488
- id: string;
489
- name: string;
490
- description: string | null;
491
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
492
- prices: {
493
- id: string;
494
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
495
- priceAmount: number | null;
496
- minimumAmount: number | null;
497
- maximumAmount: number | null;
498
- presetAmount: number | null;
499
- unitAmount: number | null;
500
- capAmount: number | null;
501
- meterId: string | null;
502
- }[];
503
- }[] | null;
504
- providedAmount: number;
505
- totalAmount: number;
506
- discountAmount: number;
507
- netAmount: number;
508
- taxAmount: number;
509
- invoiceAmountSats: number;
510
- invoiceScid: string | null;
511
- btcPrice: number;
512
- invoice: {
513
- expiresAt: Date;
514
- currency: string;
515
- btcPrice: number;
516
- invoice: string;
517
- paymentHash: string;
518
- amountSats: number;
519
- amountSatsReceived: number | null;
520
- fiatAmount: number;
521
- };
522
- } | {
523
- id: string;
524
- type: "TOP_UP";
525
- status: "PENDING_PAYMENT";
526
- createdAt: Date;
527
- clientSecret: string;
528
- organizationId: string;
529
- expiresAt: Date;
530
- userMetadata: Record<string, any> | null;
531
- customFieldData: Record<string, any> | null;
532
- customerMetadata: Record<string, any> | null;
533
- currency: string;
534
- allowDiscountCodes: boolean;
535
- customerName: string | null;
536
- customerEmail: string | null;
537
- requireCustomerFields: {
538
- customerName?: boolean | undefined;
539
- customerEmail?: boolean | undefined;
540
- } | null;
541
- successUrl: string | null;
542
- customerId: string | null;
543
- customerExternalId: string | null;
544
- customerIpAddress: string | null;
545
- customerBillingAddress: Record<string, any> | null;
546
- products: {
547
- id: string;
548
- name: string;
549
- description: string | null;
550
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
551
- prices: {
552
- id: string;
553
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
554
- priceAmount: number | null;
555
- minimumAmount: number | null;
556
- maximumAmount: number | null;
557
- presetAmount: number | null;
558
- unitAmount: number | null;
559
- capAmount: number | null;
560
- meterId: string | null;
561
- }[];
562
- }[] | null;
563
- providedAmount: number | null;
564
- totalAmount: number | null;
565
- discountAmount: number | null;
566
- netAmount: number | null;
567
- taxAmount: number | null;
568
- invoiceAmountSats: number | null;
569
- invoiceScid: string | null;
570
- btcPrice: number | null;
571
- invoice: {
572
- expiresAt: Date;
573
- currency: string;
574
- btcPrice: number | null;
575
- invoice: string;
576
- paymentHash: string;
577
- amountSats: number | null;
578
- amountSatsReceived: number | null;
579
- fiatAmount: number | null;
580
- };
581
- } | {
582
- id: string;
583
- type: "PRODUCTS";
584
- status: "PAYMENT_RECEIVED";
585
- createdAt: Date;
586
- clientSecret: string;
587
- organizationId: string;
588
- expiresAt: Date;
589
- userMetadata: Record<string, any> | null;
590
- customFieldData: Record<string, any> | null;
591
- customerMetadata: Record<string, any> | null;
592
- currency: string;
593
- allowDiscountCodes: boolean;
594
- customerName: string | null;
595
- customerEmail: string | null;
596
- requireCustomerFields: {
597
- customerName?: boolean | undefined;
598
- customerEmail?: boolean | undefined;
599
- } | null;
600
- successUrl: string | null;
601
- customerId: string | null;
602
- customerExternalId: string | null;
603
- customerIpAddress: string | null;
604
- customerBillingAddress: Record<string, any> | null;
605
- products: [{
606
- id: string;
607
- name: string;
608
- description: string | null;
609
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
610
- prices: {
611
- id: string;
612
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
613
- priceAmount: number | null;
614
- minimumAmount: number | null;
615
- maximumAmount: number | null;
616
- presetAmount: number | null;
617
- unitAmount: number | null;
618
- capAmount: number | null;
619
- meterId: string | null;
620
- }[];
621
- }, ...{
622
- id: string;
623
- name: string;
624
- description: string | null;
625
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
626
- prices: {
627
- id: string;
628
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
629
- priceAmount: number | null;
630
- minimumAmount: number | null;
631
- maximumAmount: number | null;
632
- presetAmount: number | null;
633
- unitAmount: number | null;
634
- capAmount: number | null;
635
- meterId: string | null;
636
- }[];
637
- }[]];
638
- providedAmount: number | null;
639
- totalAmount: number;
640
- discountAmount: number;
641
- netAmount: number;
642
- taxAmount: number;
643
- invoiceAmountSats: number;
644
- invoiceScid: string | null;
645
- btcPrice: number;
646
- invoice: {
647
- expiresAt: Date;
648
- currency: string;
649
- btcPrice: number;
650
- invoice: string;
651
- paymentHash: string;
652
- amountSats: number;
653
- amountSatsReceived: number;
654
- fiatAmount: number;
655
- };
656
- } | {
657
- id: string;
658
- type: "AMOUNT";
659
- status: "PAYMENT_RECEIVED";
660
- createdAt: Date;
661
- clientSecret: string;
662
- organizationId: string;
663
- expiresAt: Date;
664
- userMetadata: Record<string, any> | null;
665
- customFieldData: Record<string, any> | null;
666
- customerMetadata: Record<string, any> | null;
667
- currency: string;
668
- allowDiscountCodes: boolean;
669
- customerName: string | null;
670
- customerEmail: string | null;
671
- requireCustomerFields: {
672
- customerName?: boolean | undefined;
673
- customerEmail?: boolean | undefined;
674
- } | null;
675
- successUrl: string | null;
676
- customerId: string | null;
677
- customerExternalId: string | null;
678
- customerIpAddress: string | null;
679
- customerBillingAddress: Record<string, any> | null;
680
- products: {
681
- id: string;
682
- name: string;
683
- description: string | null;
684
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
685
- prices: {
686
- id: string;
687
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
688
- priceAmount: number | null;
689
- minimumAmount: number | null;
690
- maximumAmount: number | null;
691
- presetAmount: number | null;
692
- unitAmount: number | null;
693
- capAmount: number | null;
694
- meterId: string | null;
695
- }[];
696
- }[] | null;
697
- providedAmount: number;
698
- totalAmount: number;
699
- discountAmount: number;
700
- netAmount: number;
701
- taxAmount: number;
702
- invoiceAmountSats: number;
703
- invoiceScid: string | null;
704
- btcPrice: number;
705
- invoice: {
706
- expiresAt: Date;
707
- currency: string;
708
- btcPrice: number;
709
- invoice: string;
710
- paymentHash: string;
711
- amountSats: number;
712
- amountSatsReceived: number;
713
- fiatAmount: number;
714
- };
715
- } | {
716
- id: string;
717
- type: "TOP_UP";
718
- status: "PAYMENT_RECEIVED";
719
- createdAt: Date;
720
- clientSecret: string;
721
- organizationId: string;
722
- expiresAt: Date;
723
- userMetadata: Record<string, any> | null;
724
- customFieldData: Record<string, any> | null;
725
- customerMetadata: Record<string, any> | null;
726
- currency: string;
727
- allowDiscountCodes: boolean;
728
- customerName: string | null;
729
- customerEmail: string | null;
730
- requireCustomerFields: {
731
- customerName?: boolean | undefined;
732
- customerEmail?: boolean | undefined;
733
- } | null;
734
- successUrl: string | null;
735
- customerId: string | null;
736
- customerExternalId: string | null;
737
- customerIpAddress: string | null;
738
- customerBillingAddress: Record<string, any> | null;
739
- products: {
740
- id: string;
741
- name: string;
742
- description: string | null;
743
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
744
- prices: {
745
- id: string;
746
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
747
- priceAmount: number | null;
748
- minimumAmount: number | null;
749
- maximumAmount: number | null;
750
- presetAmount: number | null;
751
- unitAmount: number | null;
752
- capAmount: number | null;
753
- meterId: string | null;
754
- }[];
755
- }[] | null;
756
- providedAmount: number | null;
757
- totalAmount: number;
758
- discountAmount: number;
759
- netAmount: number;
760
- taxAmount: number;
761
- invoiceAmountSats: number;
762
- invoiceScid: string | null;
763
- btcPrice: number;
764
- invoice: {
765
- expiresAt: Date;
766
- currency: string;
767
- btcPrice: number;
768
- invoice: string;
769
- paymentHash: string;
770
- amountSats: number;
771
- amountSatsReceived: number;
772
- fiatAmount: number;
773
- };
774
- } | {
775
- id: string;
776
- type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
777
- status: "EXPIRED";
778
- createdAt: Date;
779
- clientSecret: string;
780
- organizationId: string;
781
- expiresAt: Date;
782
- userMetadata: Record<string, any> | null;
783
- customFieldData: Record<string, any> | null;
784
- customerMetadata: Record<string, any> | null;
785
- currency: string;
786
- allowDiscountCodes: boolean;
787
- customerName: string | null;
788
- customerEmail: string | null;
789
- requireCustomerFields: {
790
- customerName?: boolean | undefined;
791
- customerEmail?: boolean | undefined;
792
- } | null;
793
- successUrl: string | null;
794
- customerId: string | null;
795
- customerExternalId: string | null;
796
- customerIpAddress: string | null;
797
- customerBillingAddress: Record<string, any> | null;
798
- products: {
799
- id: string;
800
- name: string;
801
- description: string | null;
802
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
803
- prices: {
804
- id: string;
805
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
806
- priceAmount: number | null;
807
- minimumAmount: number | null;
808
- maximumAmount: number | null;
809
- presetAmount: number | null;
810
- unitAmount: number | null;
811
- capAmount: number | null;
812
- meterId: string | null;
813
- }[];
814
- }[] | null;
815
- providedAmount: number | null;
816
- totalAmount: number | null;
817
- discountAmount: number | null;
818
- netAmount: number | null;
819
- taxAmount: number | null;
820
- invoiceAmountSats: number | null;
821
- invoiceScid: string | null;
822
- btcPrice: number | null;
823
- invoice: {
824
- expiresAt: Date;
825
- currency: string;
826
- btcPrice: number | null;
827
- invoice: string;
828
- paymentHash: string;
829
- amountSats: number | null;
830
- amountSatsReceived: number | null;
831
- fiatAmount: number | null;
832
- } | null;
833
- }>;
834
- export declare function confirmCheckout(confirm: ConfirmCheckout): Promise<{
835
- id: string;
836
- type: "PRODUCTS";
837
- status: "UNCONFIRMED";
838
- createdAt: Date;
839
- clientSecret: string;
840
- organizationId: string;
841
- expiresAt: Date;
842
- userMetadata: Record<string, any> | null;
843
- customFieldData: Record<string, any> | null;
844
- customerMetadata: Record<string, any> | null;
845
- currency: string;
846
- allowDiscountCodes: boolean;
847
- customerName: string | null;
848
- customerEmail: string | null;
849
- requireCustomerFields: {
850
- customerName?: boolean | undefined;
851
- customerEmail?: boolean | undefined;
852
- } | null;
853
- successUrl: string | null;
854
- customerId: string | null;
855
- customerExternalId: string | null;
856
- customerIpAddress: string | null;
857
- customerBillingAddress: Record<string, any> | null;
858
- products: [{
859
- id: string;
860
- name: string;
861
- description: string | null;
862
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
863
- prices: {
864
- id: string;
865
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
866
- priceAmount: number | null;
867
- minimumAmount: number | null;
868
- maximumAmount: number | null;
869
- presetAmount: number | null;
870
- unitAmount: number | null;
871
- capAmount: number | null;
872
- meterId: string | null;
873
- }[];
874
- }, ...{
875
- id: string;
876
- name: string;
877
- description: string | null;
878
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
879
- prices: {
880
- id: string;
881
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
882
- priceAmount: number | null;
883
- minimumAmount: number | null;
884
- maximumAmount: number | null;
885
- presetAmount: number | null;
886
- unitAmount: number | null;
887
- capAmount: number | null;
888
- meterId: string | null;
889
- }[];
890
- }[]];
891
- providedAmount: number | null;
892
- totalAmount: number | null;
893
- discountAmount: number | null;
894
- netAmount: number | null;
895
- taxAmount: number | null;
896
- invoiceAmountSats: number | null;
897
- invoiceScid: string | null;
898
- btcPrice: number | null;
899
- invoice: {
900
- expiresAt: Date;
901
- currency: string;
902
- btcPrice: number | null;
903
- invoice: string;
904
- paymentHash: string;
905
- amountSats: number | null;
906
- amountSatsReceived: number | null;
907
- fiatAmount: number | null;
908
- } | null;
909
- } | {
910
- id: string;
911
- type: "AMOUNT";
912
- status: "UNCONFIRMED";
913
- createdAt: Date;
914
- clientSecret: string;
915
- organizationId: string;
916
- expiresAt: Date;
917
- userMetadata: Record<string, any> | null;
918
- customFieldData: Record<string, any> | null;
919
- customerMetadata: Record<string, any> | null;
920
- currency: string;
921
- allowDiscountCodes: boolean;
922
- customerName: string | null;
923
- customerEmail: string | null;
924
- requireCustomerFields: {
925
- customerName?: boolean | undefined;
926
- customerEmail?: boolean | undefined;
927
- } | null;
928
- successUrl: string | null;
929
- customerId: string | null;
930
- customerExternalId: string | null;
931
- customerIpAddress: string | null;
932
- customerBillingAddress: Record<string, any> | null;
933
- products: {
934
- id: string;
935
- name: string;
936
- description: string | null;
937
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
938
- prices: {
939
- id: string;
940
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
941
- priceAmount: number | null;
942
- minimumAmount: number | null;
943
- maximumAmount: number | null;
944
- presetAmount: number | null;
945
- unitAmount: number | null;
946
- capAmount: number | null;
947
- meterId: string | null;
948
- }[];
949
- }[] | null;
950
- providedAmount: number;
951
- totalAmount: number | null;
952
- discountAmount: number | null;
953
- netAmount: number | null;
954
- taxAmount: number | null;
955
- invoiceAmountSats: number | null;
956
- invoiceScid: string | null;
957
- btcPrice: number | null;
958
- invoice: {
959
- expiresAt: Date;
960
- currency: string;
961
- btcPrice: number | null;
962
- invoice: string;
963
- paymentHash: string;
964
- amountSats: number | null;
965
- amountSatsReceived: number | null;
966
- fiatAmount: number | null;
967
- } | null;
968
- } | {
969
- id: string;
970
- type: "TOP_UP";
971
- status: "UNCONFIRMED";
972
- createdAt: Date;
973
- clientSecret: string;
974
- organizationId: string;
975
- expiresAt: Date;
976
- userMetadata: Record<string, any> | null;
977
- customFieldData: Record<string, any> | null;
978
- customerMetadata: Record<string, any> | null;
979
- currency: string;
980
- allowDiscountCodes: boolean;
981
- customerName: string | null;
982
- customerEmail: string | null;
983
- requireCustomerFields: {
984
- customerName?: boolean | undefined;
985
- customerEmail?: boolean | undefined;
986
- } | null;
987
- successUrl: string | null;
988
- customerId: string | null;
989
- customerExternalId: string | null;
990
- customerIpAddress: string | null;
991
- customerBillingAddress: Record<string, any> | null;
992
- products: {
993
- id: string;
994
- name: string;
995
- description: string | null;
996
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
997
- prices: {
998
- id: string;
999
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1000
- priceAmount: number | null;
1001
- minimumAmount: number | null;
1002
- maximumAmount: number | null;
1003
- presetAmount: number | null;
1004
- unitAmount: number | null;
1005
- capAmount: number | null;
1006
- meterId: string | null;
1007
- }[];
1008
- }[] | null;
1009
- providedAmount: number | null;
1010
- totalAmount: number | null;
1011
- discountAmount: number | null;
1012
- netAmount: number | null;
1013
- taxAmount: number | null;
1014
- invoiceAmountSats: number | null;
1015
- invoiceScid: string | null;
1016
- btcPrice: number | null;
1017
- invoice: {
1018
- expiresAt: Date;
1019
- currency: string;
1020
- btcPrice: number | null;
1021
- invoice: string;
1022
- paymentHash: string;
1023
- amountSats: number | null;
1024
- amountSatsReceived: number | null;
1025
- fiatAmount: number | null;
1026
- } | null;
1027
- } | {
1028
- id: string;
1029
- type: "PRODUCTS";
1030
- status: "CONFIRMED";
1031
- createdAt: Date;
1032
- clientSecret: string;
1033
- organizationId: string;
1034
- expiresAt: Date;
1035
- userMetadata: Record<string, any> | null;
1036
- customFieldData: Record<string, any> | null;
1037
- customerMetadata: Record<string, any> | null;
1038
- currency: string;
1039
- allowDiscountCodes: boolean;
1040
- customerName: string | null;
1041
- customerEmail: string | null;
1042
- requireCustomerFields: {
1043
- customerName?: boolean | undefined;
1044
- customerEmail?: boolean | undefined;
1045
- } | null;
1046
- successUrl: string | null;
1047
- customerId: string | null;
1048
- customerExternalId: string | null;
1049
- customerIpAddress: string | null;
1050
- customerBillingAddress: Record<string, any> | null;
1051
- products: [{
1052
- id: string;
1053
- name: string;
1054
- description: string | null;
1055
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1056
- prices: {
1057
- id: string;
1058
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1059
- priceAmount: number | null;
1060
- minimumAmount: number | null;
1061
- maximumAmount: number | null;
1062
- presetAmount: number | null;
1063
- unitAmount: number | null;
1064
- capAmount: number | null;
1065
- meterId: string | null;
1066
- }[];
1067
- }, ...{
1068
- id: string;
1069
- name: string;
1070
- description: string | null;
1071
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1072
- prices: {
1073
- id: string;
1074
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1075
- priceAmount: number | null;
1076
- minimumAmount: number | null;
1077
- maximumAmount: number | null;
1078
- presetAmount: number | null;
1079
- unitAmount: number | null;
1080
- capAmount: number | null;
1081
- meterId: string | null;
1082
- }[];
1083
- }[]];
1084
- providedAmount: number | null;
1085
- totalAmount: number;
1086
- discountAmount: number;
1087
- netAmount: number;
1088
- taxAmount: number;
1089
- invoiceAmountSats: number;
1090
- invoiceScid: string | null;
1091
- btcPrice: number;
1092
- invoice: {
1093
- expiresAt: Date;
1094
- currency: string;
1095
- btcPrice: number | null;
1096
- invoice: string;
1097
- paymentHash: string;
1098
- amountSats: number | null;
1099
- amountSatsReceived: number | null;
1100
- fiatAmount: number | null;
1101
- } | null;
1102
- } | {
1103
- id: string;
1104
- type: "AMOUNT";
1105
- status: "CONFIRMED";
1106
- createdAt: Date;
1107
- clientSecret: string;
1108
- organizationId: string;
1109
- expiresAt: Date;
1110
- userMetadata: Record<string, any> | null;
1111
- customFieldData: Record<string, any> | null;
1112
- customerMetadata: Record<string, any> | null;
1113
- currency: string;
1114
- allowDiscountCodes: boolean;
1115
- customerName: string | null;
1116
- customerEmail: string | null;
1117
- requireCustomerFields: {
1118
- customerName?: boolean | undefined;
1119
- customerEmail?: boolean | undefined;
1120
- } | null;
1121
- successUrl: string | null;
1122
- customerId: string | null;
1123
- customerExternalId: string | null;
1124
- customerIpAddress: string | null;
1125
- customerBillingAddress: Record<string, any> | null;
1126
- products: {
1127
- id: string;
1128
- name: string;
1129
- description: string | null;
1130
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1131
- prices: {
1132
- id: string;
1133
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1134
- priceAmount: number | null;
1135
- minimumAmount: number | null;
1136
- maximumAmount: number | null;
1137
- presetAmount: number | null;
1138
- unitAmount: number | null;
1139
- capAmount: number | null;
1140
- meterId: string | null;
1141
- }[];
1142
- }[] | null;
1143
- providedAmount: number;
1144
- totalAmount: number;
1145
- discountAmount: number;
1146
- netAmount: number;
1147
- taxAmount: number;
1148
- invoiceAmountSats: number;
1149
- invoiceScid: string | null;
1150
- btcPrice: number;
1151
- invoice: {
1152
- expiresAt: Date;
1153
- currency: string;
1154
- btcPrice: number | null;
1155
- invoice: string;
1156
- paymentHash: string;
1157
- amountSats: number | null;
1158
- amountSatsReceived: number | null;
1159
- fiatAmount: number | null;
1160
- } | null;
1161
- } | {
1162
- id: string;
1163
- type: "TOP_UP";
1164
- status: "CONFIRMED";
1165
- createdAt: Date;
1166
- clientSecret: string;
1167
- organizationId: string;
1168
- expiresAt: Date;
1169
- userMetadata: Record<string, any> | null;
1170
- customFieldData: Record<string, any> | null;
1171
- customerMetadata: Record<string, any> | null;
1172
- currency: string;
1173
- allowDiscountCodes: boolean;
1174
- customerName: string | null;
1175
- customerEmail: string | null;
1176
- requireCustomerFields: {
1177
- customerName?: boolean | undefined;
1178
- customerEmail?: boolean | undefined;
1179
- } | null;
1180
- successUrl: string | null;
1181
- customerId: string | null;
1182
- customerExternalId: string | null;
1183
- customerIpAddress: string | null;
1184
- customerBillingAddress: Record<string, any> | null;
1185
- products: {
1186
- id: string;
1187
- name: string;
1188
- description: string | null;
1189
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1190
- prices: {
1191
- id: string;
1192
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1193
- priceAmount: number | null;
1194
- minimumAmount: number | null;
1195
- maximumAmount: number | null;
1196
- presetAmount: number | null;
1197
- unitAmount: number | null;
1198
- capAmount: number | null;
1199
- meterId: string | null;
1200
- }[];
1201
- }[] | null;
1202
- providedAmount: number | null;
1203
- totalAmount: number | null;
1204
- discountAmount: number | null;
1205
- netAmount: number | null;
1206
- taxAmount: number | null;
1207
- invoiceAmountSats: number | null;
1208
- invoiceScid: string | null;
1209
- btcPrice: number | null;
1210
- invoice: {
1211
- expiresAt: Date;
1212
- currency: string;
1213
- btcPrice: number | null;
1214
- invoice: string;
1215
- paymentHash: string;
1216
- amountSats: number | null;
1217
- amountSatsReceived: number | null;
1218
- fiatAmount: number | null;
1219
- } | null;
1220
- } | {
1221
- id: string;
1222
- type: "PRODUCTS";
1223
- status: "PENDING_PAYMENT";
1224
- createdAt: Date;
1225
- clientSecret: string;
1226
- organizationId: string;
1227
- expiresAt: Date;
1228
- userMetadata: Record<string, any> | null;
1229
- customFieldData: Record<string, any> | null;
1230
- customerMetadata: Record<string, any> | null;
1231
- currency: string;
1232
- allowDiscountCodes: boolean;
1233
- customerName: string | null;
1234
- customerEmail: string | null;
1235
- requireCustomerFields: {
1236
- customerName?: boolean | undefined;
1237
- customerEmail?: boolean | undefined;
1238
- } | null;
1239
- successUrl: string | null;
1240
- customerId: string | null;
1241
- customerExternalId: string | null;
1242
- customerIpAddress: string | null;
1243
- customerBillingAddress: Record<string, any> | null;
1244
- products: [{
1245
- id: string;
1246
- name: string;
1247
- description: string | null;
1248
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1249
- prices: {
1250
- id: string;
1251
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1252
- priceAmount: number | null;
1253
- minimumAmount: number | null;
1254
- maximumAmount: number | null;
1255
- presetAmount: number | null;
1256
- unitAmount: number | null;
1257
- capAmount: number | null;
1258
- meterId: string | null;
1259
- }[];
1260
- }, ...{
1261
- id: string;
1262
- name: string;
1263
- description: string | null;
1264
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1265
- prices: {
1266
- id: string;
1267
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1268
- priceAmount: number | null;
1269
- minimumAmount: number | null;
1270
- maximumAmount: number | null;
1271
- presetAmount: number | null;
1272
- unitAmount: number | null;
1273
- capAmount: number | null;
1274
- meterId: string | null;
1275
- }[];
1276
- }[]];
1277
- providedAmount: number | null;
1278
- totalAmount: number;
1279
- discountAmount: number;
1280
- netAmount: number;
1281
- taxAmount: number;
1282
- invoiceAmountSats: number;
1283
- invoiceScid: string | null;
1284
- btcPrice: number;
1285
- invoice: {
1286
- expiresAt: Date;
1287
- currency: string;
1288
- btcPrice: number;
1289
- invoice: string;
1290
- paymentHash: string;
1291
- amountSats: number;
1292
- amountSatsReceived: number | null;
1293
- fiatAmount: number;
1294
- };
1295
- } | {
1296
- id: string;
1297
- type: "AMOUNT";
1298
- status: "PENDING_PAYMENT";
1299
- createdAt: Date;
1300
- clientSecret: string;
1301
- organizationId: string;
1302
- expiresAt: Date;
1303
- userMetadata: Record<string, any> | null;
1304
- customFieldData: Record<string, any> | null;
1305
- customerMetadata: Record<string, any> | null;
1306
- currency: string;
1307
- allowDiscountCodes: boolean;
1308
- customerName: string | null;
1309
- customerEmail: string | null;
1310
- requireCustomerFields: {
1311
- customerName?: boolean | undefined;
1312
- customerEmail?: boolean | undefined;
1313
- } | null;
1314
- successUrl: string | null;
1315
- customerId: string | null;
1316
- customerExternalId: string | null;
1317
- customerIpAddress: string | null;
1318
- customerBillingAddress: Record<string, any> | null;
1319
- products: {
1320
- id: string;
1321
- name: string;
1322
- description: string | null;
1323
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1324
- prices: {
1325
- id: string;
1326
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1327
- priceAmount: number | null;
1328
- minimumAmount: number | null;
1329
- maximumAmount: number | null;
1330
- presetAmount: number | null;
1331
- unitAmount: number | null;
1332
- capAmount: number | null;
1333
- meterId: string | null;
1334
- }[];
1335
- }[] | null;
1336
- providedAmount: number;
1337
- totalAmount: number;
1338
- discountAmount: number;
1339
- netAmount: number;
1340
- taxAmount: number;
1341
- invoiceAmountSats: number;
1342
- invoiceScid: string | null;
1343
- btcPrice: number;
1344
- invoice: {
1345
- expiresAt: Date;
1346
- currency: string;
1347
- btcPrice: number;
1348
- invoice: string;
1349
- paymentHash: string;
1350
- amountSats: number;
1351
- amountSatsReceived: number | null;
1352
- fiatAmount: number;
1353
- };
1354
- } | {
1355
- id: string;
1356
- type: "TOP_UP";
1357
- status: "PENDING_PAYMENT";
1358
- createdAt: Date;
1359
- clientSecret: string;
1360
- organizationId: string;
1361
- expiresAt: Date;
1362
- userMetadata: Record<string, any> | null;
1363
- customFieldData: Record<string, any> | null;
1364
- customerMetadata: Record<string, any> | null;
1365
- currency: string;
1366
- allowDiscountCodes: boolean;
1367
- customerName: string | null;
1368
- customerEmail: string | null;
1369
- requireCustomerFields: {
1370
- customerName?: boolean | undefined;
1371
- customerEmail?: boolean | undefined;
1372
- } | null;
1373
- successUrl: string | null;
1374
- customerId: string | null;
1375
- customerExternalId: string | null;
1376
- customerIpAddress: string | null;
1377
- customerBillingAddress: Record<string, any> | null;
1378
- products: {
1379
- id: string;
1380
- name: string;
1381
- description: string | null;
1382
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1383
- prices: {
1384
- id: string;
1385
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1386
- priceAmount: number | null;
1387
- minimumAmount: number | null;
1388
- maximumAmount: number | null;
1389
- presetAmount: number | null;
1390
- unitAmount: number | null;
1391
- capAmount: number | null;
1392
- meterId: string | null;
1393
- }[];
1394
- }[] | null;
1395
- providedAmount: number | null;
1396
- totalAmount: number | null;
1397
- discountAmount: number | null;
1398
- netAmount: number | null;
1399
- taxAmount: number | null;
1400
- invoiceAmountSats: number | null;
1401
- invoiceScid: string | null;
1402
- btcPrice: number | null;
1403
- invoice: {
1404
- expiresAt: Date;
1405
- currency: string;
1406
- btcPrice: number | null;
1407
- invoice: string;
1408
- paymentHash: string;
1409
- amountSats: number | null;
1410
- amountSatsReceived: number | null;
1411
- fiatAmount: number | null;
1412
- };
1413
- } | {
1414
- id: string;
1415
- type: "PRODUCTS";
1416
- status: "PAYMENT_RECEIVED";
1417
- createdAt: Date;
1418
- clientSecret: string;
1419
- organizationId: string;
1420
- expiresAt: Date;
1421
- userMetadata: Record<string, any> | null;
1422
- customFieldData: Record<string, any> | null;
1423
- customerMetadata: Record<string, any> | null;
1424
- currency: string;
1425
- allowDiscountCodes: boolean;
1426
- customerName: string | null;
1427
- customerEmail: string | null;
1428
- requireCustomerFields: {
1429
- customerName?: boolean | undefined;
1430
- customerEmail?: boolean | undefined;
1431
- } | null;
1432
- successUrl: string | null;
1433
- customerId: string | null;
1434
- customerExternalId: string | null;
1435
- customerIpAddress: string | null;
1436
- customerBillingAddress: Record<string, any> | null;
1437
- products: [{
1438
- id: string;
1439
- name: string;
1440
- description: string | null;
1441
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1442
- prices: {
1443
- id: string;
1444
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1445
- priceAmount: number | null;
1446
- minimumAmount: number | null;
1447
- maximumAmount: number | null;
1448
- presetAmount: number | null;
1449
- unitAmount: number | null;
1450
- capAmount: number | null;
1451
- meterId: string | null;
1452
- }[];
1453
- }, ...{
1454
- id: string;
1455
- name: string;
1456
- description: string | null;
1457
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1458
- prices: {
1459
- id: string;
1460
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1461
- priceAmount: number | null;
1462
- minimumAmount: number | null;
1463
- maximumAmount: number | null;
1464
- presetAmount: number | null;
1465
- unitAmount: number | null;
1466
- capAmount: number | null;
1467
- meterId: string | null;
1468
- }[];
1469
- }[]];
1470
- providedAmount: number | null;
1471
- totalAmount: number;
1472
- discountAmount: number;
1473
- netAmount: number;
1474
- taxAmount: number;
1475
- invoiceAmountSats: number;
1476
- invoiceScid: string | null;
1477
- btcPrice: number;
1478
- invoice: {
1479
- expiresAt: Date;
1480
- currency: string;
1481
- btcPrice: number;
1482
- invoice: string;
1483
- paymentHash: string;
1484
- amountSats: number;
1485
- amountSatsReceived: number;
1486
- fiatAmount: number;
1487
- };
1488
- } | {
1489
- id: string;
1490
- type: "AMOUNT";
1491
- status: "PAYMENT_RECEIVED";
1492
- createdAt: Date;
1493
- clientSecret: string;
1494
- organizationId: string;
1495
- expiresAt: Date;
1496
- userMetadata: Record<string, any> | null;
1497
- customFieldData: Record<string, any> | null;
1498
- customerMetadata: Record<string, any> | null;
1499
- currency: string;
1500
- allowDiscountCodes: boolean;
1501
- customerName: string | null;
1502
- customerEmail: string | null;
1503
- requireCustomerFields: {
1504
- customerName?: boolean | undefined;
1505
- customerEmail?: boolean | undefined;
1506
- } | null;
1507
- successUrl: string | null;
1508
- customerId: string | null;
1509
- customerExternalId: string | null;
1510
- customerIpAddress: string | null;
1511
- customerBillingAddress: Record<string, any> | null;
1512
- products: {
1513
- id: string;
1514
- name: string;
1515
- description: string | null;
1516
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1517
- prices: {
1518
- id: string;
1519
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1520
- priceAmount: number | null;
1521
- minimumAmount: number | null;
1522
- maximumAmount: number | null;
1523
- presetAmount: number | null;
1524
- unitAmount: number | null;
1525
- capAmount: number | null;
1526
- meterId: string | null;
1527
- }[];
1528
- }[] | null;
1529
- providedAmount: number;
1530
- totalAmount: number;
1531
- discountAmount: number;
1532
- netAmount: number;
1533
- taxAmount: number;
1534
- invoiceAmountSats: number;
1535
- invoiceScid: string | null;
1536
- btcPrice: number;
1537
- invoice: {
1538
- expiresAt: Date;
1539
- currency: string;
1540
- btcPrice: number;
1541
- invoice: string;
1542
- paymentHash: string;
1543
- amountSats: number;
1544
- amountSatsReceived: number;
1545
- fiatAmount: number;
1546
- };
1547
- } | {
1548
- id: string;
1549
- type: "TOP_UP";
1550
- status: "PAYMENT_RECEIVED";
1551
- createdAt: Date;
1552
- clientSecret: string;
1553
- organizationId: string;
1554
- expiresAt: Date;
1555
- userMetadata: Record<string, any> | null;
1556
- customFieldData: Record<string, any> | null;
1557
- customerMetadata: Record<string, any> | null;
1558
- currency: string;
1559
- allowDiscountCodes: boolean;
1560
- customerName: string | null;
1561
- customerEmail: string | null;
1562
- requireCustomerFields: {
1563
- customerName?: boolean | undefined;
1564
- customerEmail?: boolean | undefined;
1565
- } | null;
1566
- successUrl: string | null;
1567
- customerId: string | null;
1568
- customerExternalId: string | null;
1569
- customerIpAddress: string | null;
1570
- customerBillingAddress: Record<string, any> | null;
1571
- products: {
1572
- id: string;
1573
- name: string;
1574
- description: string | null;
1575
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1576
- prices: {
1577
- id: string;
1578
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1579
- priceAmount: number | null;
1580
- minimumAmount: number | null;
1581
- maximumAmount: number | null;
1582
- presetAmount: number | null;
1583
- unitAmount: number | null;
1584
- capAmount: number | null;
1585
- meterId: string | null;
1586
- }[];
1587
- }[] | null;
1588
- providedAmount: number | null;
1589
- totalAmount: number;
1590
- discountAmount: number;
1591
- netAmount: number;
1592
- taxAmount: number;
1593
- invoiceAmountSats: number;
1594
- invoiceScid: string | null;
1595
- btcPrice: number;
1596
- invoice: {
1597
- expiresAt: Date;
1598
- currency: string;
1599
- btcPrice: number;
1600
- invoice: string;
1601
- paymentHash: string;
1602
- amountSats: number;
1603
- amountSatsReceived: number;
1604
- fiatAmount: number;
1605
- };
1606
- } | {
1607
- id: string;
1608
- type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
1609
- status: "EXPIRED";
1610
- createdAt: Date;
1611
- clientSecret: string;
1612
- organizationId: string;
1613
- expiresAt: Date;
1614
- userMetadata: Record<string, any> | null;
1615
- customFieldData: Record<string, any> | null;
1616
- customerMetadata: Record<string, any> | null;
1617
- currency: string;
1618
- allowDiscountCodes: boolean;
1619
- customerName: string | null;
1620
- customerEmail: string | null;
1621
- requireCustomerFields: {
1622
- customerName?: boolean | undefined;
1623
- customerEmail?: boolean | undefined;
1624
- } | null;
1625
- successUrl: string | null;
1626
- customerId: string | null;
1627
- customerExternalId: string | null;
1628
- customerIpAddress: string | null;
1629
- customerBillingAddress: Record<string, any> | null;
1630
- products: {
1631
- id: string;
1632
- name: string;
1633
- description: string | null;
1634
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1635
- prices: {
1636
- id: string;
1637
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1638
- priceAmount: number | null;
1639
- minimumAmount: number | null;
1640
- maximumAmount: number | null;
1641
- presetAmount: number | null;
1642
- unitAmount: number | null;
1643
- capAmount: number | null;
1644
- meterId: string | null;
1645
- }[];
1646
- }[] | null;
1647
- providedAmount: number | null;
1648
- totalAmount: number | null;
1649
- discountAmount: number | null;
1650
- netAmount: number | null;
1651
- taxAmount: number | null;
1652
- invoiceAmountSats: number | null;
1653
- invoiceScid: string | null;
1654
- btcPrice: number | null;
1655
- invoice: {
1656
- expiresAt: Date;
1657
- currency: string;
1658
- btcPrice: number | null;
1659
- invoice: string;
1660
- paymentHash: string;
1661
- amountSats: number | null;
1662
- amountSatsReceived: number | null;
1663
- fiatAmount: number | null;
1664
- } | null;
1665
- }>;
1
+ import type { Checkout, ConfirmCheckout } from '@moneydevkit/api-contract';
2
+ export declare function getCheckout(checkoutId: string): Promise<Checkout>;
3
+ export declare function confirmCheckout(confirm: ConfirmCheckout): Promise<Checkout>;
4
+ /**
5
+ * Valid fields that can be required at checkout time.
6
+ * 'email' and 'name' are standard fields, anything else is a custom string field.
7
+ */
8
+ export type CustomerField = string;
9
+ /**
10
+ * Customer data for checkout - flat structure with standard and custom fields.
11
+ */
12
+ export type CustomerInput = {
13
+ name?: string;
14
+ email?: string;
15
+ externalId?: string;
16
+ } & Record<string, string>;
17
+ /**
18
+ * Checkout params for creating a checkout.
19
+ */
1666
20
  export interface CreateCheckoutParams {
1667
21
  title: string;
1668
22
  description: string;
@@ -1670,840 +24,11 @@ export interface CreateCheckoutParams {
1670
24
  currency?: 'USD' | 'SAT';
1671
25
  successUrl?: string;
1672
26
  checkoutPath?: string;
1673
- metadata?: Record<string, any>;
27
+ metadata?: Record<string, unknown>;
28
+ customer?: CustomerInput;
29
+ requireCustomerData?: string[];
1674
30
  }
1675
- export declare function createCheckout(params: CreateCheckoutParams): Promise<{
1676
- id: string;
1677
- type: "PRODUCTS";
1678
- status: "UNCONFIRMED";
1679
- createdAt: Date;
1680
- clientSecret: string;
1681
- organizationId: string;
1682
- expiresAt: Date;
1683
- userMetadata: Record<string, any> | null;
1684
- customFieldData: Record<string, any> | null;
1685
- customerMetadata: Record<string, any> | null;
1686
- currency: string;
1687
- allowDiscountCodes: boolean;
1688
- customerName: string | null;
1689
- customerEmail: string | null;
1690
- requireCustomerFields: {
1691
- customerName?: boolean | undefined;
1692
- customerEmail?: boolean | undefined;
1693
- } | null;
1694
- successUrl: string | null;
1695
- customerId: string | null;
1696
- customerExternalId: string | null;
1697
- customerIpAddress: string | null;
1698
- customerBillingAddress: Record<string, any> | null;
1699
- products: [{
1700
- id: string;
1701
- name: string;
1702
- description: string | null;
1703
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1704
- prices: {
1705
- id: string;
1706
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1707
- priceAmount: number | null;
1708
- minimumAmount: number | null;
1709
- maximumAmount: number | null;
1710
- presetAmount: number | null;
1711
- unitAmount: number | null;
1712
- capAmount: number | null;
1713
- meterId: string | null;
1714
- }[];
1715
- }, ...{
1716
- id: string;
1717
- name: string;
1718
- description: string | null;
1719
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1720
- prices: {
1721
- id: string;
1722
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1723
- priceAmount: number | null;
1724
- minimumAmount: number | null;
1725
- maximumAmount: number | null;
1726
- presetAmount: number | null;
1727
- unitAmount: number | null;
1728
- capAmount: number | null;
1729
- meterId: string | null;
1730
- }[];
1731
- }[]];
1732
- providedAmount: number | null;
1733
- totalAmount: number | null;
1734
- discountAmount: number | null;
1735
- netAmount: number | null;
1736
- taxAmount: number | null;
1737
- invoiceAmountSats: number | null;
1738
- invoiceScid: string | null;
1739
- btcPrice: number | null;
1740
- invoice: {
1741
- expiresAt: Date;
1742
- currency: string;
1743
- btcPrice: number | null;
1744
- invoice: string;
1745
- paymentHash: string;
1746
- amountSats: number | null;
1747
- amountSatsReceived: number | null;
1748
- fiatAmount: number | null;
1749
- } | null;
1750
- } | {
1751
- id: string;
1752
- type: "AMOUNT";
1753
- status: "UNCONFIRMED";
1754
- createdAt: Date;
1755
- clientSecret: string;
1756
- organizationId: string;
1757
- expiresAt: Date;
1758
- userMetadata: Record<string, any> | null;
1759
- customFieldData: Record<string, any> | null;
1760
- customerMetadata: Record<string, any> | null;
1761
- currency: string;
1762
- allowDiscountCodes: boolean;
1763
- customerName: string | null;
1764
- customerEmail: string | null;
1765
- requireCustomerFields: {
1766
- customerName?: boolean | undefined;
1767
- customerEmail?: boolean | undefined;
1768
- } | null;
1769
- successUrl: string | null;
1770
- customerId: string | null;
1771
- customerExternalId: string | null;
1772
- customerIpAddress: string | null;
1773
- customerBillingAddress: Record<string, any> | null;
1774
- products: {
1775
- id: string;
1776
- name: string;
1777
- description: string | null;
1778
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1779
- prices: {
1780
- id: string;
1781
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1782
- priceAmount: number | null;
1783
- minimumAmount: number | null;
1784
- maximumAmount: number | null;
1785
- presetAmount: number | null;
1786
- unitAmount: number | null;
1787
- capAmount: number | null;
1788
- meterId: string | null;
1789
- }[];
1790
- }[] | null;
1791
- providedAmount: number;
1792
- totalAmount: number | null;
1793
- discountAmount: number | null;
1794
- netAmount: number | null;
1795
- taxAmount: number | null;
1796
- invoiceAmountSats: number | null;
1797
- invoiceScid: string | null;
1798
- btcPrice: number | null;
1799
- invoice: {
1800
- expiresAt: Date;
1801
- currency: string;
1802
- btcPrice: number | null;
1803
- invoice: string;
1804
- paymentHash: string;
1805
- amountSats: number | null;
1806
- amountSatsReceived: number | null;
1807
- fiatAmount: number | null;
1808
- } | null;
1809
- } | {
1810
- id: string;
1811
- type: "TOP_UP";
1812
- status: "UNCONFIRMED";
1813
- createdAt: Date;
1814
- clientSecret: string;
1815
- organizationId: string;
1816
- expiresAt: Date;
1817
- userMetadata: Record<string, any> | null;
1818
- customFieldData: Record<string, any> | null;
1819
- customerMetadata: Record<string, any> | null;
1820
- currency: string;
1821
- allowDiscountCodes: boolean;
1822
- customerName: string | null;
1823
- customerEmail: string | null;
1824
- requireCustomerFields: {
1825
- customerName?: boolean | undefined;
1826
- customerEmail?: boolean | undefined;
1827
- } | null;
1828
- successUrl: string | null;
1829
- customerId: string | null;
1830
- customerExternalId: string | null;
1831
- customerIpAddress: string | null;
1832
- customerBillingAddress: Record<string, any> | null;
1833
- products: {
1834
- id: string;
1835
- name: string;
1836
- description: string | null;
1837
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1838
- prices: {
1839
- id: string;
1840
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1841
- priceAmount: number | null;
1842
- minimumAmount: number | null;
1843
- maximumAmount: number | null;
1844
- presetAmount: number | null;
1845
- unitAmount: number | null;
1846
- capAmount: number | null;
1847
- meterId: string | null;
1848
- }[];
1849
- }[] | null;
1850
- providedAmount: number | null;
1851
- totalAmount: number | null;
1852
- discountAmount: number | null;
1853
- netAmount: number | null;
1854
- taxAmount: number | null;
1855
- invoiceAmountSats: number | null;
1856
- invoiceScid: string | null;
1857
- btcPrice: number | null;
1858
- invoice: {
1859
- expiresAt: Date;
1860
- currency: string;
1861
- btcPrice: number | null;
1862
- invoice: string;
1863
- paymentHash: string;
1864
- amountSats: number | null;
1865
- amountSatsReceived: number | null;
1866
- fiatAmount: number | null;
1867
- } | null;
1868
- } | {
1869
- id: string;
1870
- type: "PRODUCTS";
1871
- status: "PENDING_PAYMENT";
1872
- createdAt: Date;
1873
- clientSecret: string;
1874
- organizationId: string;
1875
- expiresAt: Date;
1876
- userMetadata: Record<string, any> | null;
1877
- customFieldData: Record<string, any> | null;
1878
- customerMetadata: Record<string, any> | null;
1879
- currency: string;
1880
- allowDiscountCodes: boolean;
1881
- customerName: string | null;
1882
- customerEmail: string | null;
1883
- requireCustomerFields: {
1884
- customerName?: boolean | undefined;
1885
- customerEmail?: boolean | undefined;
1886
- } | null;
1887
- successUrl: string | null;
1888
- customerId: string | null;
1889
- customerExternalId: string | null;
1890
- customerIpAddress: string | null;
1891
- customerBillingAddress: Record<string, any> | null;
1892
- products: [{
1893
- id: string;
1894
- name: string;
1895
- description: string | null;
1896
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1897
- prices: {
1898
- id: string;
1899
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1900
- priceAmount: number | null;
1901
- minimumAmount: number | null;
1902
- maximumAmount: number | null;
1903
- presetAmount: number | null;
1904
- unitAmount: number | null;
1905
- capAmount: number | null;
1906
- meterId: string | null;
1907
- }[];
1908
- }, ...{
1909
- id: string;
1910
- name: string;
1911
- description: string | null;
1912
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1913
- prices: {
1914
- id: string;
1915
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1916
- priceAmount: number | null;
1917
- minimumAmount: number | null;
1918
- maximumAmount: number | null;
1919
- presetAmount: number | null;
1920
- unitAmount: number | null;
1921
- capAmount: number | null;
1922
- meterId: string | null;
1923
- }[];
1924
- }[]];
1925
- providedAmount: number | null;
1926
- totalAmount: number;
1927
- discountAmount: number;
1928
- netAmount: number;
1929
- taxAmount: number;
1930
- invoiceAmountSats: number;
1931
- invoiceScid: string | null;
1932
- btcPrice: number;
1933
- invoice: {
1934
- expiresAt: Date;
1935
- currency: string;
1936
- btcPrice: number;
1937
- invoice: string;
1938
- paymentHash: string;
1939
- amountSats: number;
1940
- amountSatsReceived: number | null;
1941
- fiatAmount: number;
1942
- };
1943
- } | {
1944
- id: string;
1945
- type: "AMOUNT";
1946
- status: "PENDING_PAYMENT";
1947
- createdAt: Date;
1948
- clientSecret: string;
1949
- organizationId: string;
1950
- expiresAt: Date;
1951
- userMetadata: Record<string, any> | null;
1952
- customFieldData: Record<string, any> | null;
1953
- customerMetadata: Record<string, any> | null;
1954
- currency: string;
1955
- allowDiscountCodes: boolean;
1956
- customerName: string | null;
1957
- customerEmail: string | null;
1958
- requireCustomerFields: {
1959
- customerName?: boolean | undefined;
1960
- customerEmail?: boolean | undefined;
1961
- } | null;
1962
- successUrl: string | null;
1963
- customerId: string | null;
1964
- customerExternalId: string | null;
1965
- customerIpAddress: string | null;
1966
- customerBillingAddress: Record<string, any> | null;
1967
- products: {
1968
- id: string;
1969
- name: string;
1970
- description: string | null;
1971
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1972
- prices: {
1973
- id: string;
1974
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1975
- priceAmount: number | null;
1976
- minimumAmount: number | null;
1977
- maximumAmount: number | null;
1978
- presetAmount: number | null;
1979
- unitAmount: number | null;
1980
- capAmount: number | null;
1981
- meterId: string | null;
1982
- }[];
1983
- }[] | null;
1984
- providedAmount: number;
1985
- totalAmount: number;
1986
- discountAmount: number;
1987
- netAmount: number;
1988
- taxAmount: number;
1989
- invoiceAmountSats: number;
1990
- invoiceScid: string | null;
1991
- btcPrice: number;
1992
- invoice: {
1993
- expiresAt: Date;
1994
- currency: string;
1995
- btcPrice: number;
1996
- invoice: string;
1997
- paymentHash: string;
1998
- amountSats: number;
1999
- amountSatsReceived: number | null;
2000
- fiatAmount: number;
2001
- };
2002
- } | {
2003
- id: string;
2004
- type: "TOP_UP";
2005
- status: "PENDING_PAYMENT";
2006
- createdAt: Date;
2007
- clientSecret: string;
2008
- organizationId: string;
2009
- expiresAt: Date;
2010
- userMetadata: Record<string, any> | null;
2011
- customFieldData: Record<string, any> | null;
2012
- customerMetadata: Record<string, any> | null;
2013
- currency: string;
2014
- allowDiscountCodes: boolean;
2015
- customerName: string | null;
2016
- customerEmail: string | null;
2017
- requireCustomerFields: {
2018
- customerName?: boolean | undefined;
2019
- customerEmail?: boolean | undefined;
2020
- } | null;
2021
- successUrl: string | null;
2022
- customerId: string | null;
2023
- customerExternalId: string | null;
2024
- customerIpAddress: string | null;
2025
- customerBillingAddress: Record<string, any> | null;
2026
- products: {
2027
- id: string;
2028
- name: string;
2029
- description: string | null;
2030
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2031
- prices: {
2032
- id: string;
2033
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2034
- priceAmount: number | null;
2035
- minimumAmount: number | null;
2036
- maximumAmount: number | null;
2037
- presetAmount: number | null;
2038
- unitAmount: number | null;
2039
- capAmount: number | null;
2040
- meterId: string | null;
2041
- }[];
2042
- }[] | null;
2043
- providedAmount: number | null;
2044
- totalAmount: number | null;
2045
- discountAmount: number | null;
2046
- netAmount: number | null;
2047
- taxAmount: number | null;
2048
- invoiceAmountSats: number | null;
2049
- invoiceScid: string | null;
2050
- btcPrice: number | null;
2051
- invoice: {
2052
- expiresAt: Date;
2053
- currency: string;
2054
- btcPrice: number | null;
2055
- invoice: string;
2056
- paymentHash: string;
2057
- amountSats: number | null;
2058
- amountSatsReceived: number | null;
2059
- fiatAmount: number | null;
2060
- };
2061
- } | {
2062
- id: string;
2063
- type: "PRODUCTS";
2064
- status: "PAYMENT_RECEIVED";
2065
- createdAt: Date;
2066
- clientSecret: string;
2067
- organizationId: string;
2068
- expiresAt: Date;
2069
- userMetadata: Record<string, any> | null;
2070
- customFieldData: Record<string, any> | null;
2071
- customerMetadata: Record<string, any> | null;
2072
- currency: string;
2073
- allowDiscountCodes: boolean;
2074
- customerName: string | null;
2075
- customerEmail: string | null;
2076
- requireCustomerFields: {
2077
- customerName?: boolean | undefined;
2078
- customerEmail?: boolean | undefined;
2079
- } | null;
2080
- successUrl: string | null;
2081
- customerId: string | null;
2082
- customerExternalId: string | null;
2083
- customerIpAddress: string | null;
2084
- customerBillingAddress: Record<string, any> | null;
2085
- products: [{
2086
- id: string;
2087
- name: string;
2088
- description: string | null;
2089
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2090
- prices: {
2091
- id: string;
2092
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2093
- priceAmount: number | null;
2094
- minimumAmount: number | null;
2095
- maximumAmount: number | null;
2096
- presetAmount: number | null;
2097
- unitAmount: number | null;
2098
- capAmount: number | null;
2099
- meterId: string | null;
2100
- }[];
2101
- }, ...{
2102
- id: string;
2103
- name: string;
2104
- description: string | null;
2105
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2106
- prices: {
2107
- id: string;
2108
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2109
- priceAmount: number | null;
2110
- minimumAmount: number | null;
2111
- maximumAmount: number | null;
2112
- presetAmount: number | null;
2113
- unitAmount: number | null;
2114
- capAmount: number | null;
2115
- meterId: string | null;
2116
- }[];
2117
- }[]];
2118
- providedAmount: number | null;
2119
- totalAmount: number;
2120
- discountAmount: number;
2121
- netAmount: number;
2122
- taxAmount: number;
2123
- invoiceAmountSats: number;
2124
- invoiceScid: string | null;
2125
- btcPrice: number;
2126
- invoice: {
2127
- expiresAt: Date;
2128
- currency: string;
2129
- btcPrice: number;
2130
- invoice: string;
2131
- paymentHash: string;
2132
- amountSats: number;
2133
- amountSatsReceived: number;
2134
- fiatAmount: number;
2135
- };
2136
- } | {
2137
- id: string;
2138
- type: "AMOUNT";
2139
- status: "PAYMENT_RECEIVED";
2140
- createdAt: Date;
2141
- clientSecret: string;
2142
- organizationId: string;
2143
- expiresAt: Date;
2144
- userMetadata: Record<string, any> | null;
2145
- customFieldData: Record<string, any> | null;
2146
- customerMetadata: Record<string, any> | null;
2147
- currency: string;
2148
- allowDiscountCodes: boolean;
2149
- customerName: string | null;
2150
- customerEmail: string | null;
2151
- requireCustomerFields: {
2152
- customerName?: boolean | undefined;
2153
- customerEmail?: boolean | undefined;
2154
- } | null;
2155
- successUrl: string | null;
2156
- customerId: string | null;
2157
- customerExternalId: string | null;
2158
- customerIpAddress: string | null;
2159
- customerBillingAddress: Record<string, any> | null;
2160
- products: {
2161
- id: string;
2162
- name: string;
2163
- description: string | null;
2164
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2165
- prices: {
2166
- id: string;
2167
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2168
- priceAmount: number | null;
2169
- minimumAmount: number | null;
2170
- maximumAmount: number | null;
2171
- presetAmount: number | null;
2172
- unitAmount: number | null;
2173
- capAmount: number | null;
2174
- meterId: string | null;
2175
- }[];
2176
- }[] | null;
2177
- providedAmount: number;
2178
- totalAmount: number;
2179
- discountAmount: number;
2180
- netAmount: number;
2181
- taxAmount: number;
2182
- invoiceAmountSats: number;
2183
- invoiceScid: string | null;
2184
- btcPrice: number;
2185
- invoice: {
2186
- expiresAt: Date;
2187
- currency: string;
2188
- btcPrice: number;
2189
- invoice: string;
2190
- paymentHash: string;
2191
- amountSats: number;
2192
- amountSatsReceived: number;
2193
- fiatAmount: number;
2194
- };
2195
- } | {
2196
- id: string;
2197
- type: "TOP_UP";
2198
- status: "PAYMENT_RECEIVED";
2199
- createdAt: Date;
2200
- clientSecret: string;
2201
- organizationId: string;
2202
- expiresAt: Date;
2203
- userMetadata: Record<string, any> | null;
2204
- customFieldData: Record<string, any> | null;
2205
- customerMetadata: Record<string, any> | null;
2206
- currency: string;
2207
- allowDiscountCodes: boolean;
2208
- customerName: string | null;
2209
- customerEmail: string | null;
2210
- requireCustomerFields: {
2211
- customerName?: boolean | undefined;
2212
- customerEmail?: boolean | undefined;
2213
- } | null;
2214
- successUrl: string | null;
2215
- customerId: string | null;
2216
- customerExternalId: string | null;
2217
- customerIpAddress: string | null;
2218
- customerBillingAddress: Record<string, any> | null;
2219
- products: {
2220
- id: string;
2221
- name: string;
2222
- description: string | null;
2223
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2224
- prices: {
2225
- id: string;
2226
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2227
- priceAmount: number | null;
2228
- minimumAmount: number | null;
2229
- maximumAmount: number | null;
2230
- presetAmount: number | null;
2231
- unitAmount: number | null;
2232
- capAmount: number | null;
2233
- meterId: string | null;
2234
- }[];
2235
- }[] | null;
2236
- providedAmount: number | null;
2237
- totalAmount: number;
2238
- discountAmount: number;
2239
- netAmount: number;
2240
- taxAmount: number;
2241
- invoiceAmountSats: number;
2242
- invoiceScid: string | null;
2243
- btcPrice: number;
2244
- invoice: {
2245
- expiresAt: Date;
2246
- currency: string;
2247
- btcPrice: number;
2248
- invoice: string;
2249
- paymentHash: string;
2250
- amountSats: number;
2251
- amountSatsReceived: number;
2252
- fiatAmount: number;
2253
- };
2254
- } | {
2255
- id: string;
2256
- type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
2257
- status: "EXPIRED";
2258
- createdAt: Date;
2259
- clientSecret: string;
2260
- organizationId: string;
2261
- expiresAt: Date;
2262
- userMetadata: Record<string, any> | null;
2263
- customFieldData: Record<string, any> | null;
2264
- customerMetadata: Record<string, any> | null;
2265
- currency: string;
2266
- allowDiscountCodes: boolean;
2267
- customerName: string | null;
2268
- customerEmail: string | null;
2269
- requireCustomerFields: {
2270
- customerName?: boolean | undefined;
2271
- customerEmail?: boolean | undefined;
2272
- } | null;
2273
- successUrl: string | null;
2274
- customerId: string | null;
2275
- customerExternalId: string | null;
2276
- customerIpAddress: string | null;
2277
- customerBillingAddress: Record<string, any> | null;
2278
- products: {
2279
- id: string;
2280
- name: string;
2281
- description: string | null;
2282
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2283
- prices: {
2284
- id: string;
2285
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2286
- priceAmount: number | null;
2287
- minimumAmount: number | null;
2288
- maximumAmount: number | null;
2289
- presetAmount: number | null;
2290
- unitAmount: number | null;
2291
- capAmount: number | null;
2292
- meterId: string | null;
2293
- }[];
2294
- }[] | null;
2295
- providedAmount: number | null;
2296
- totalAmount: number | null;
2297
- discountAmount: number | null;
2298
- netAmount: number | null;
2299
- taxAmount: number | null;
2300
- invoiceAmountSats: number | null;
2301
- invoiceScid: string | null;
2302
- btcPrice: number | null;
2303
- invoice: {
2304
- expiresAt: Date;
2305
- currency: string;
2306
- btcPrice: number | null;
2307
- invoice: string;
2308
- paymentHash: string;
2309
- amountSats: number | null;
2310
- amountSatsReceived: number | null;
2311
- fiatAmount: number | null;
2312
- } | null;
2313
- } | {
2314
- id: string;
2315
- type: "PRODUCTS";
2316
- status: "CONFIRMED";
2317
- createdAt: Date;
2318
- clientSecret: string;
2319
- organizationId: string;
2320
- expiresAt: Date;
2321
- userMetadata: Record<string, any> | null;
2322
- customFieldData: Record<string, any> | null;
2323
- customerMetadata: Record<string, any> | null;
2324
- currency: string;
2325
- allowDiscountCodes: boolean;
2326
- customerName: string | null;
2327
- customerEmail: string | null;
2328
- requireCustomerFields: {
2329
- customerName?: boolean | undefined;
2330
- customerEmail?: boolean | undefined;
2331
- } | null;
2332
- successUrl: string | null;
2333
- customerId: string | null;
2334
- customerExternalId: string | null;
2335
- customerIpAddress: string | null;
2336
- customerBillingAddress: Record<string, any> | null;
2337
- products: [{
2338
- id: string;
2339
- name: string;
2340
- description: string | null;
2341
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2342
- prices: {
2343
- id: string;
2344
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2345
- priceAmount: number | null;
2346
- minimumAmount: number | null;
2347
- maximumAmount: number | null;
2348
- presetAmount: number | null;
2349
- unitAmount: number | null;
2350
- capAmount: number | null;
2351
- meterId: string | null;
2352
- }[];
2353
- }, ...{
2354
- id: string;
2355
- name: string;
2356
- description: string | null;
2357
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2358
- prices: {
2359
- id: string;
2360
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2361
- priceAmount: number | null;
2362
- minimumAmount: number | null;
2363
- maximumAmount: number | null;
2364
- presetAmount: number | null;
2365
- unitAmount: number | null;
2366
- capAmount: number | null;
2367
- meterId: string | null;
2368
- }[];
2369
- }[]];
2370
- providedAmount: number | null;
2371
- totalAmount: number;
2372
- discountAmount: number;
2373
- netAmount: number;
2374
- taxAmount: number;
2375
- invoiceAmountSats: number;
2376
- invoiceScid: string | null;
2377
- btcPrice: number;
2378
- invoice: {
2379
- expiresAt: Date;
2380
- currency: string;
2381
- btcPrice: number | null;
2382
- invoice: string;
2383
- paymentHash: string;
2384
- amountSats: number | null;
2385
- amountSatsReceived: number | null;
2386
- fiatAmount: number | null;
2387
- } | null;
2388
- } | {
2389
- id: string;
2390
- type: "AMOUNT";
2391
- status: "CONFIRMED";
2392
- createdAt: Date;
2393
- clientSecret: string;
2394
- organizationId: string;
2395
- expiresAt: Date;
2396
- userMetadata: Record<string, any> | null;
2397
- customFieldData: Record<string, any> | null;
2398
- customerMetadata: Record<string, any> | null;
2399
- currency: string;
2400
- allowDiscountCodes: boolean;
2401
- customerName: string | null;
2402
- customerEmail: string | null;
2403
- requireCustomerFields: {
2404
- customerName?: boolean | undefined;
2405
- customerEmail?: boolean | undefined;
2406
- } | null;
2407
- successUrl: string | null;
2408
- customerId: string | null;
2409
- customerExternalId: string | null;
2410
- customerIpAddress: string | null;
2411
- customerBillingAddress: Record<string, any> | null;
2412
- products: {
2413
- id: string;
2414
- name: string;
2415
- description: string | null;
2416
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2417
- prices: {
2418
- id: string;
2419
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2420
- priceAmount: number | null;
2421
- minimumAmount: number | null;
2422
- maximumAmount: number | null;
2423
- presetAmount: number | null;
2424
- unitAmount: number | null;
2425
- capAmount: number | null;
2426
- meterId: string | null;
2427
- }[];
2428
- }[] | null;
2429
- providedAmount: number;
2430
- totalAmount: number;
2431
- discountAmount: number;
2432
- netAmount: number;
2433
- taxAmount: number;
2434
- invoiceAmountSats: number;
2435
- invoiceScid: string | null;
2436
- btcPrice: number;
2437
- invoice: {
2438
- expiresAt: Date;
2439
- currency: string;
2440
- btcPrice: number | null;
2441
- invoice: string;
2442
- paymentHash: string;
2443
- amountSats: number | null;
2444
- amountSatsReceived: number | null;
2445
- fiatAmount: number | null;
2446
- } | null;
2447
- } | {
2448
- id: string;
2449
- type: "TOP_UP";
2450
- status: "CONFIRMED";
2451
- createdAt: Date;
2452
- clientSecret: string;
2453
- organizationId: string;
2454
- expiresAt: Date;
2455
- userMetadata: Record<string, any> | null;
2456
- customFieldData: Record<string, any> | null;
2457
- customerMetadata: Record<string, any> | null;
2458
- currency: string;
2459
- allowDiscountCodes: boolean;
2460
- customerName: string | null;
2461
- customerEmail: string | null;
2462
- requireCustomerFields: {
2463
- customerName?: boolean | undefined;
2464
- customerEmail?: boolean | undefined;
2465
- } | null;
2466
- successUrl: string | null;
2467
- customerId: string | null;
2468
- customerExternalId: string | null;
2469
- customerIpAddress: string | null;
2470
- customerBillingAddress: Record<string, any> | null;
2471
- products: {
2472
- id: string;
2473
- name: string;
2474
- description: string | null;
2475
- recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2476
- prices: {
2477
- id: string;
2478
- amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2479
- priceAmount: number | null;
2480
- minimumAmount: number | null;
2481
- maximumAmount: number | null;
2482
- presetAmount: number | null;
2483
- unitAmount: number | null;
2484
- capAmount: number | null;
2485
- meterId: string | null;
2486
- }[];
2487
- }[] | null;
2488
- providedAmount: number | null;
2489
- totalAmount: number | null;
2490
- discountAmount: number | null;
2491
- netAmount: number | null;
2492
- taxAmount: number | null;
2493
- invoiceAmountSats: number | null;
2494
- invoiceScid: string | null;
2495
- btcPrice: number | null;
2496
- invoice: {
2497
- expiresAt: Date;
2498
- currency: string;
2499
- btcPrice: number | null;
2500
- invoice: string;
2501
- paymentHash: string;
2502
- amountSats: number | null;
2503
- amountSatsReceived: number | null;
2504
- fiatAmount: number | null;
2505
- } | null;
2506
- }>;
31
+ export declare function createCheckout(params: CreateCheckoutParams): Promise<Checkout>;
2507
32
  export declare function markInvoicePaidPreview(paymentHash: string, amountSats: number): Promise<{
2508
33
  ok: boolean;
2509
34
  }>;