@moneydevkit/core 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import type { ConfirmCheckout } from '@moneydevkit/api-contract';
1
2
  import type { CreateCheckoutParams } from './actions';
2
3
  export declare function clientCreateCheckout(params: CreateCheckoutParams): Promise<{
3
4
  currency: string;
@@ -1663,3 +1664,835 @@ export declare function clientGetCheckout(checkoutId: string): Promise<{
1663
1664
  invoiceScid: string | null;
1664
1665
  btcPrice: number | null;
1665
1666
  }>;
1667
+ export declare function clientConfirmCheckout(confirm: ConfirmCheckout): Promise<{
1668
+ currency: string;
1669
+ type: "PRODUCTS";
1670
+ status: "UNCONFIRMED";
1671
+ products: [{
1672
+ id: string;
1673
+ name: string;
1674
+ description: string | null;
1675
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1676
+ prices: {
1677
+ priceAmount: number | null;
1678
+ id: string;
1679
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1680
+ minimumAmount: number | null;
1681
+ maximumAmount: number | null;
1682
+ presetAmount: number | null;
1683
+ unitAmount: number | null;
1684
+ capAmount: number | null;
1685
+ meterId: string | null;
1686
+ }[];
1687
+ }, ...{
1688
+ id: string;
1689
+ name: string;
1690
+ description: string | null;
1691
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1692
+ prices: {
1693
+ priceAmount: number | null;
1694
+ id: string;
1695
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1696
+ minimumAmount: number | null;
1697
+ maximumAmount: number | null;
1698
+ presetAmount: number | null;
1699
+ unitAmount: number | null;
1700
+ capAmount: number | null;
1701
+ meterId: string | null;
1702
+ }[];
1703
+ }[]];
1704
+ successUrl: string | null;
1705
+ allowDiscountCodes: boolean;
1706
+ customerName: string | null;
1707
+ customerEmail: string | null;
1708
+ customerIpAddress: string | null;
1709
+ customerExternalId: string | null;
1710
+ requireCustomerFields: {
1711
+ customerName?: boolean | undefined;
1712
+ customerEmail?: boolean | undefined;
1713
+ } | null;
1714
+ invoice: {
1715
+ currency: string;
1716
+ invoice: string;
1717
+ paymentHash: string;
1718
+ amountSats: number | null;
1719
+ expiresAt: Date;
1720
+ btcPrice: number | null;
1721
+ amountSatsReceived: number | null;
1722
+ fiatAmount: number | null;
1723
+ } | null;
1724
+ id: string;
1725
+ createdAt: Date;
1726
+ clientSecret: string;
1727
+ organizationId: string;
1728
+ expiresAt: Date;
1729
+ userMetadata: Record<string, any> | null;
1730
+ customFieldData: Record<string, any> | null;
1731
+ customerMetadata: Record<string, any> | null;
1732
+ customerId: string | null;
1733
+ customerBillingAddress: Record<string, any> | null;
1734
+ providedAmount: number | null;
1735
+ totalAmount: number | null;
1736
+ discountAmount: number | null;
1737
+ netAmount: number | null;
1738
+ taxAmount: number | null;
1739
+ invoiceAmountSats: number | null;
1740
+ invoiceScid: string | null;
1741
+ btcPrice: number | null;
1742
+ } | {
1743
+ currency: string;
1744
+ type: "AMOUNT";
1745
+ status: "UNCONFIRMED";
1746
+ products: {
1747
+ id: string;
1748
+ name: string;
1749
+ description: string | null;
1750
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1751
+ prices: {
1752
+ priceAmount: number | null;
1753
+ id: string;
1754
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1755
+ minimumAmount: number | null;
1756
+ maximumAmount: number | null;
1757
+ presetAmount: number | null;
1758
+ unitAmount: number | null;
1759
+ capAmount: number | null;
1760
+ meterId: string | null;
1761
+ }[];
1762
+ }[] | null;
1763
+ successUrl: string | null;
1764
+ allowDiscountCodes: boolean;
1765
+ customerName: string | null;
1766
+ customerEmail: string | null;
1767
+ customerIpAddress: string | null;
1768
+ customerExternalId: string | null;
1769
+ requireCustomerFields: {
1770
+ customerName?: boolean | undefined;
1771
+ customerEmail?: boolean | undefined;
1772
+ } | null;
1773
+ invoice: {
1774
+ currency: string;
1775
+ invoice: string;
1776
+ paymentHash: string;
1777
+ amountSats: number | null;
1778
+ expiresAt: Date;
1779
+ btcPrice: number | null;
1780
+ amountSatsReceived: number | null;
1781
+ fiatAmount: number | null;
1782
+ } | null;
1783
+ id: string;
1784
+ createdAt: Date;
1785
+ clientSecret: string;
1786
+ organizationId: string;
1787
+ expiresAt: Date;
1788
+ userMetadata: Record<string, any> | null;
1789
+ customFieldData: Record<string, any> | null;
1790
+ customerMetadata: Record<string, any> | null;
1791
+ customerId: string | null;
1792
+ customerBillingAddress: Record<string, any> | null;
1793
+ providedAmount: number;
1794
+ totalAmount: number | null;
1795
+ discountAmount: number | null;
1796
+ netAmount: number | null;
1797
+ taxAmount: number | null;
1798
+ invoiceAmountSats: number | null;
1799
+ invoiceScid: string | null;
1800
+ btcPrice: number | null;
1801
+ } | {
1802
+ currency: string;
1803
+ type: "TOP_UP";
1804
+ status: "UNCONFIRMED";
1805
+ products: {
1806
+ id: string;
1807
+ name: string;
1808
+ description: string | null;
1809
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1810
+ prices: {
1811
+ priceAmount: number | null;
1812
+ id: string;
1813
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1814
+ minimumAmount: number | null;
1815
+ maximumAmount: number | null;
1816
+ presetAmount: number | null;
1817
+ unitAmount: number | null;
1818
+ capAmount: number | null;
1819
+ meterId: string | null;
1820
+ }[];
1821
+ }[] | null;
1822
+ successUrl: string | null;
1823
+ allowDiscountCodes: boolean;
1824
+ customerName: string | null;
1825
+ customerEmail: string | null;
1826
+ customerIpAddress: string | null;
1827
+ customerExternalId: string | null;
1828
+ requireCustomerFields: {
1829
+ customerName?: boolean | undefined;
1830
+ customerEmail?: boolean | undefined;
1831
+ } | null;
1832
+ invoice: {
1833
+ currency: string;
1834
+ invoice: string;
1835
+ paymentHash: string;
1836
+ amountSats: number | null;
1837
+ expiresAt: Date;
1838
+ btcPrice: number | null;
1839
+ amountSatsReceived: number | null;
1840
+ fiatAmount: number | null;
1841
+ } | null;
1842
+ id: string;
1843
+ createdAt: Date;
1844
+ clientSecret: string;
1845
+ organizationId: string;
1846
+ expiresAt: Date;
1847
+ userMetadata: Record<string, any> | null;
1848
+ customFieldData: Record<string, any> | null;
1849
+ customerMetadata: Record<string, any> | null;
1850
+ customerId: string | null;
1851
+ customerBillingAddress: Record<string, any> | null;
1852
+ providedAmount: number | null;
1853
+ totalAmount: number | null;
1854
+ discountAmount: number | null;
1855
+ netAmount: number | null;
1856
+ taxAmount: number | null;
1857
+ invoiceAmountSats: number | null;
1858
+ invoiceScid: string | null;
1859
+ btcPrice: number | null;
1860
+ } | {
1861
+ currency: string;
1862
+ type: "PRODUCTS";
1863
+ status: "CONFIRMED";
1864
+ products: [{
1865
+ id: string;
1866
+ name: string;
1867
+ description: string | null;
1868
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1869
+ prices: {
1870
+ priceAmount: number | null;
1871
+ id: string;
1872
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1873
+ minimumAmount: number | null;
1874
+ maximumAmount: number | null;
1875
+ presetAmount: number | null;
1876
+ unitAmount: number | null;
1877
+ capAmount: number | null;
1878
+ meterId: string | null;
1879
+ }[];
1880
+ }, ...{
1881
+ id: string;
1882
+ name: string;
1883
+ description: string | null;
1884
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1885
+ prices: {
1886
+ priceAmount: number | null;
1887
+ id: string;
1888
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1889
+ minimumAmount: number | null;
1890
+ maximumAmount: number | null;
1891
+ presetAmount: number | null;
1892
+ unitAmount: number | null;
1893
+ capAmount: number | null;
1894
+ meterId: string | null;
1895
+ }[];
1896
+ }[]];
1897
+ successUrl: string | null;
1898
+ allowDiscountCodes: boolean;
1899
+ customerName: string | null;
1900
+ customerEmail: string | null;
1901
+ customerIpAddress: string | null;
1902
+ customerExternalId: string | null;
1903
+ requireCustomerFields: {
1904
+ customerName?: boolean | undefined;
1905
+ customerEmail?: boolean | undefined;
1906
+ } | null;
1907
+ invoice: {
1908
+ currency: string;
1909
+ invoice: string;
1910
+ paymentHash: string;
1911
+ amountSats: number | null;
1912
+ expiresAt: Date;
1913
+ btcPrice: number | null;
1914
+ amountSatsReceived: number | null;
1915
+ fiatAmount: number | null;
1916
+ } | null;
1917
+ id: string;
1918
+ createdAt: Date;
1919
+ clientSecret: string;
1920
+ organizationId: string;
1921
+ expiresAt: Date;
1922
+ userMetadata: Record<string, any> | null;
1923
+ customFieldData: Record<string, any> | null;
1924
+ customerMetadata: Record<string, any> | null;
1925
+ customerId: string | null;
1926
+ customerBillingAddress: Record<string, any> | null;
1927
+ providedAmount: number | null;
1928
+ totalAmount: number;
1929
+ discountAmount: number;
1930
+ netAmount: number;
1931
+ taxAmount: number;
1932
+ invoiceAmountSats: number;
1933
+ invoiceScid: string | null;
1934
+ btcPrice: number;
1935
+ } | {
1936
+ currency: string;
1937
+ type: "AMOUNT";
1938
+ status: "CONFIRMED";
1939
+ products: {
1940
+ id: string;
1941
+ name: string;
1942
+ description: string | null;
1943
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
1944
+ prices: {
1945
+ priceAmount: number | null;
1946
+ id: string;
1947
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
1948
+ minimumAmount: number | null;
1949
+ maximumAmount: number | null;
1950
+ presetAmount: number | null;
1951
+ unitAmount: number | null;
1952
+ capAmount: number | null;
1953
+ meterId: string | null;
1954
+ }[];
1955
+ }[] | null;
1956
+ successUrl: string | null;
1957
+ allowDiscountCodes: boolean;
1958
+ customerName: string | null;
1959
+ customerEmail: string | null;
1960
+ customerIpAddress: string | null;
1961
+ customerExternalId: string | null;
1962
+ requireCustomerFields: {
1963
+ customerName?: boolean | undefined;
1964
+ customerEmail?: boolean | undefined;
1965
+ } | null;
1966
+ invoice: {
1967
+ currency: string;
1968
+ invoice: string;
1969
+ paymentHash: string;
1970
+ amountSats: number | null;
1971
+ expiresAt: Date;
1972
+ btcPrice: number | null;
1973
+ amountSatsReceived: number | null;
1974
+ fiatAmount: number | null;
1975
+ } | null;
1976
+ id: string;
1977
+ createdAt: Date;
1978
+ clientSecret: string;
1979
+ organizationId: string;
1980
+ expiresAt: Date;
1981
+ userMetadata: Record<string, any> | null;
1982
+ customFieldData: Record<string, any> | null;
1983
+ customerMetadata: Record<string, any> | null;
1984
+ customerId: string | null;
1985
+ customerBillingAddress: Record<string, any> | null;
1986
+ providedAmount: number;
1987
+ totalAmount: number;
1988
+ discountAmount: number;
1989
+ netAmount: number;
1990
+ taxAmount: number;
1991
+ invoiceAmountSats: number;
1992
+ invoiceScid: string | null;
1993
+ btcPrice: number;
1994
+ } | {
1995
+ currency: string;
1996
+ type: "TOP_UP";
1997
+ status: "CONFIRMED";
1998
+ products: {
1999
+ id: string;
2000
+ name: string;
2001
+ description: string | null;
2002
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2003
+ prices: {
2004
+ priceAmount: number | null;
2005
+ id: string;
2006
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2007
+ minimumAmount: number | null;
2008
+ maximumAmount: number | null;
2009
+ presetAmount: number | null;
2010
+ unitAmount: number | null;
2011
+ capAmount: number | null;
2012
+ meterId: string | null;
2013
+ }[];
2014
+ }[] | null;
2015
+ successUrl: string | null;
2016
+ allowDiscountCodes: boolean;
2017
+ customerName: string | null;
2018
+ customerEmail: string | null;
2019
+ customerIpAddress: string | null;
2020
+ customerExternalId: string | null;
2021
+ requireCustomerFields: {
2022
+ customerName?: boolean | undefined;
2023
+ customerEmail?: boolean | undefined;
2024
+ } | null;
2025
+ invoice: {
2026
+ currency: string;
2027
+ invoice: string;
2028
+ paymentHash: string;
2029
+ amountSats: number | null;
2030
+ expiresAt: Date;
2031
+ btcPrice: number | null;
2032
+ amountSatsReceived: number | null;
2033
+ fiatAmount: number | null;
2034
+ } | null;
2035
+ id: string;
2036
+ createdAt: Date;
2037
+ clientSecret: string;
2038
+ organizationId: string;
2039
+ expiresAt: Date;
2040
+ userMetadata: Record<string, any> | null;
2041
+ customFieldData: Record<string, any> | null;
2042
+ customerMetadata: Record<string, any> | null;
2043
+ customerId: string | null;
2044
+ customerBillingAddress: Record<string, any> | null;
2045
+ providedAmount: number | null;
2046
+ totalAmount: number | null;
2047
+ discountAmount: number | null;
2048
+ netAmount: number | null;
2049
+ taxAmount: number | null;
2050
+ invoiceAmountSats: number | null;
2051
+ invoiceScid: string | null;
2052
+ btcPrice: number | null;
2053
+ } | {
2054
+ currency: string;
2055
+ type: "PRODUCTS";
2056
+ status: "PENDING_PAYMENT";
2057
+ products: [{
2058
+ id: string;
2059
+ name: string;
2060
+ description: string | null;
2061
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2062
+ prices: {
2063
+ priceAmount: number | null;
2064
+ id: string;
2065
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2066
+ minimumAmount: number | null;
2067
+ maximumAmount: number | null;
2068
+ presetAmount: number | null;
2069
+ unitAmount: number | null;
2070
+ capAmount: number | null;
2071
+ meterId: string | null;
2072
+ }[];
2073
+ }, ...{
2074
+ id: string;
2075
+ name: string;
2076
+ description: string | null;
2077
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2078
+ prices: {
2079
+ priceAmount: number | null;
2080
+ id: string;
2081
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2082
+ minimumAmount: number | null;
2083
+ maximumAmount: number | null;
2084
+ presetAmount: number | null;
2085
+ unitAmount: number | null;
2086
+ capAmount: number | null;
2087
+ meterId: string | null;
2088
+ }[];
2089
+ }[]];
2090
+ successUrl: string | null;
2091
+ allowDiscountCodes: boolean;
2092
+ customerName: string | null;
2093
+ customerEmail: string | null;
2094
+ customerIpAddress: string | null;
2095
+ customerExternalId: string | null;
2096
+ requireCustomerFields: {
2097
+ customerName?: boolean | undefined;
2098
+ customerEmail?: boolean | undefined;
2099
+ } | null;
2100
+ invoice: {
2101
+ currency: string;
2102
+ invoice: string;
2103
+ paymentHash: string;
2104
+ amountSats: number;
2105
+ expiresAt: Date;
2106
+ btcPrice: number;
2107
+ amountSatsReceived: number | null;
2108
+ fiatAmount: number;
2109
+ };
2110
+ id: string;
2111
+ createdAt: Date;
2112
+ clientSecret: string;
2113
+ organizationId: string;
2114
+ expiresAt: Date;
2115
+ userMetadata: Record<string, any> | null;
2116
+ customFieldData: Record<string, any> | null;
2117
+ customerMetadata: Record<string, any> | null;
2118
+ customerId: string | null;
2119
+ customerBillingAddress: Record<string, any> | null;
2120
+ providedAmount: number | null;
2121
+ totalAmount: number;
2122
+ discountAmount: number;
2123
+ netAmount: number;
2124
+ taxAmount: number;
2125
+ invoiceAmountSats: number;
2126
+ invoiceScid: string | null;
2127
+ btcPrice: number;
2128
+ } | {
2129
+ currency: string;
2130
+ type: "AMOUNT";
2131
+ status: "PENDING_PAYMENT";
2132
+ products: {
2133
+ id: string;
2134
+ name: string;
2135
+ description: string | null;
2136
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2137
+ prices: {
2138
+ priceAmount: number | null;
2139
+ id: string;
2140
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2141
+ minimumAmount: number | null;
2142
+ maximumAmount: number | null;
2143
+ presetAmount: number | null;
2144
+ unitAmount: number | null;
2145
+ capAmount: number | null;
2146
+ meterId: string | null;
2147
+ }[];
2148
+ }[] | null;
2149
+ successUrl: string | null;
2150
+ allowDiscountCodes: boolean;
2151
+ customerName: string | null;
2152
+ customerEmail: string | null;
2153
+ customerIpAddress: string | null;
2154
+ customerExternalId: string | null;
2155
+ requireCustomerFields: {
2156
+ customerName?: boolean | undefined;
2157
+ customerEmail?: boolean | undefined;
2158
+ } | null;
2159
+ invoice: {
2160
+ currency: string;
2161
+ invoice: string;
2162
+ paymentHash: string;
2163
+ amountSats: number;
2164
+ expiresAt: Date;
2165
+ btcPrice: number;
2166
+ amountSatsReceived: number | null;
2167
+ fiatAmount: number;
2168
+ };
2169
+ id: string;
2170
+ createdAt: Date;
2171
+ clientSecret: string;
2172
+ organizationId: string;
2173
+ expiresAt: Date;
2174
+ userMetadata: Record<string, any> | null;
2175
+ customFieldData: Record<string, any> | null;
2176
+ customerMetadata: Record<string, any> | null;
2177
+ customerId: string | null;
2178
+ customerBillingAddress: Record<string, any> | null;
2179
+ providedAmount: number;
2180
+ totalAmount: number;
2181
+ discountAmount: number;
2182
+ netAmount: number;
2183
+ taxAmount: number;
2184
+ invoiceAmountSats: number;
2185
+ invoiceScid: string | null;
2186
+ btcPrice: number;
2187
+ } | {
2188
+ currency: string;
2189
+ type: "TOP_UP";
2190
+ status: "PENDING_PAYMENT";
2191
+ products: {
2192
+ id: string;
2193
+ name: string;
2194
+ description: string | null;
2195
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2196
+ prices: {
2197
+ priceAmount: number | null;
2198
+ id: string;
2199
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2200
+ minimumAmount: number | null;
2201
+ maximumAmount: number | null;
2202
+ presetAmount: number | null;
2203
+ unitAmount: number | null;
2204
+ capAmount: number | null;
2205
+ meterId: string | null;
2206
+ }[];
2207
+ }[] | null;
2208
+ successUrl: string | null;
2209
+ allowDiscountCodes: boolean;
2210
+ customerName: string | null;
2211
+ customerEmail: string | null;
2212
+ customerIpAddress: string | null;
2213
+ customerExternalId: string | null;
2214
+ requireCustomerFields: {
2215
+ customerName?: boolean | undefined;
2216
+ customerEmail?: boolean | undefined;
2217
+ } | null;
2218
+ invoice: {
2219
+ currency: string;
2220
+ invoice: string;
2221
+ paymentHash: string;
2222
+ amountSats: number | null;
2223
+ expiresAt: Date;
2224
+ btcPrice: number | null;
2225
+ amountSatsReceived: number | null;
2226
+ fiatAmount: number | null;
2227
+ };
2228
+ id: string;
2229
+ createdAt: Date;
2230
+ clientSecret: string;
2231
+ organizationId: string;
2232
+ expiresAt: Date;
2233
+ userMetadata: Record<string, any> | null;
2234
+ customFieldData: Record<string, any> | null;
2235
+ customerMetadata: Record<string, any> | null;
2236
+ customerId: string | null;
2237
+ customerBillingAddress: Record<string, any> | null;
2238
+ providedAmount: number | null;
2239
+ totalAmount: number | null;
2240
+ discountAmount: number | null;
2241
+ netAmount: number | null;
2242
+ taxAmount: number | null;
2243
+ invoiceAmountSats: number | null;
2244
+ invoiceScid: string | null;
2245
+ btcPrice: number | null;
2246
+ } | {
2247
+ currency: string;
2248
+ type: "PRODUCTS";
2249
+ status: "PAYMENT_RECEIVED";
2250
+ products: [{
2251
+ id: string;
2252
+ name: string;
2253
+ description: string | null;
2254
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2255
+ prices: {
2256
+ priceAmount: number | null;
2257
+ id: string;
2258
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2259
+ minimumAmount: number | null;
2260
+ maximumAmount: number | null;
2261
+ presetAmount: number | null;
2262
+ unitAmount: number | null;
2263
+ capAmount: number | null;
2264
+ meterId: string | null;
2265
+ }[];
2266
+ }, ...{
2267
+ id: string;
2268
+ name: string;
2269
+ description: string | null;
2270
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2271
+ prices: {
2272
+ priceAmount: number | null;
2273
+ id: string;
2274
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2275
+ minimumAmount: number | null;
2276
+ maximumAmount: number | null;
2277
+ presetAmount: number | null;
2278
+ unitAmount: number | null;
2279
+ capAmount: number | null;
2280
+ meterId: string | null;
2281
+ }[];
2282
+ }[]];
2283
+ successUrl: string | null;
2284
+ allowDiscountCodes: boolean;
2285
+ customerName: string | null;
2286
+ customerEmail: string | null;
2287
+ customerIpAddress: string | null;
2288
+ customerExternalId: string | null;
2289
+ requireCustomerFields: {
2290
+ customerName?: boolean | undefined;
2291
+ customerEmail?: boolean | undefined;
2292
+ } | null;
2293
+ invoice: {
2294
+ currency: string;
2295
+ invoice: string;
2296
+ paymentHash: string;
2297
+ amountSats: number;
2298
+ expiresAt: Date;
2299
+ btcPrice: number;
2300
+ amountSatsReceived: number;
2301
+ fiatAmount: number;
2302
+ };
2303
+ id: string;
2304
+ createdAt: Date;
2305
+ clientSecret: string;
2306
+ organizationId: string;
2307
+ expiresAt: Date;
2308
+ userMetadata: Record<string, any> | null;
2309
+ customFieldData: Record<string, any> | null;
2310
+ customerMetadata: Record<string, any> | null;
2311
+ customerId: string | null;
2312
+ customerBillingAddress: Record<string, any> | null;
2313
+ providedAmount: number | null;
2314
+ totalAmount: number;
2315
+ discountAmount: number;
2316
+ netAmount: number;
2317
+ taxAmount: number;
2318
+ invoiceAmountSats: number;
2319
+ invoiceScid: string | null;
2320
+ btcPrice: number;
2321
+ } | {
2322
+ currency: string;
2323
+ type: "AMOUNT";
2324
+ status: "PAYMENT_RECEIVED";
2325
+ products: {
2326
+ id: string;
2327
+ name: string;
2328
+ description: string | null;
2329
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2330
+ prices: {
2331
+ priceAmount: number | null;
2332
+ id: string;
2333
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2334
+ minimumAmount: number | null;
2335
+ maximumAmount: number | null;
2336
+ presetAmount: number | null;
2337
+ unitAmount: number | null;
2338
+ capAmount: number | null;
2339
+ meterId: string | null;
2340
+ }[];
2341
+ }[] | null;
2342
+ successUrl: string | null;
2343
+ allowDiscountCodes: boolean;
2344
+ customerName: string | null;
2345
+ customerEmail: string | null;
2346
+ customerIpAddress: string | null;
2347
+ customerExternalId: string | null;
2348
+ requireCustomerFields: {
2349
+ customerName?: boolean | undefined;
2350
+ customerEmail?: boolean | undefined;
2351
+ } | null;
2352
+ invoice: {
2353
+ currency: string;
2354
+ invoice: string;
2355
+ paymentHash: string;
2356
+ amountSats: number;
2357
+ expiresAt: Date;
2358
+ btcPrice: number;
2359
+ amountSatsReceived: number;
2360
+ fiatAmount: number;
2361
+ };
2362
+ id: string;
2363
+ createdAt: Date;
2364
+ clientSecret: string;
2365
+ organizationId: string;
2366
+ expiresAt: Date;
2367
+ userMetadata: Record<string, any> | null;
2368
+ customFieldData: Record<string, any> | null;
2369
+ customerMetadata: Record<string, any> | null;
2370
+ customerId: string | null;
2371
+ customerBillingAddress: Record<string, any> | null;
2372
+ providedAmount: number;
2373
+ totalAmount: number;
2374
+ discountAmount: number;
2375
+ netAmount: number;
2376
+ taxAmount: number;
2377
+ invoiceAmountSats: number;
2378
+ invoiceScid: string | null;
2379
+ btcPrice: number;
2380
+ } | {
2381
+ currency: string;
2382
+ type: "TOP_UP";
2383
+ status: "PAYMENT_RECEIVED";
2384
+ products: {
2385
+ id: string;
2386
+ name: string;
2387
+ description: string | null;
2388
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2389
+ prices: {
2390
+ priceAmount: number | null;
2391
+ id: string;
2392
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2393
+ minimumAmount: number | null;
2394
+ maximumAmount: number | null;
2395
+ presetAmount: number | null;
2396
+ unitAmount: number | null;
2397
+ capAmount: number | null;
2398
+ meterId: string | null;
2399
+ }[];
2400
+ }[] | null;
2401
+ successUrl: string | null;
2402
+ allowDiscountCodes: boolean;
2403
+ customerName: string | null;
2404
+ customerEmail: string | null;
2405
+ customerIpAddress: string | null;
2406
+ customerExternalId: string | null;
2407
+ requireCustomerFields: {
2408
+ customerName?: boolean | undefined;
2409
+ customerEmail?: boolean | undefined;
2410
+ } | null;
2411
+ invoice: {
2412
+ currency: string;
2413
+ invoice: string;
2414
+ paymentHash: string;
2415
+ amountSats: number;
2416
+ expiresAt: Date;
2417
+ btcPrice: number;
2418
+ amountSatsReceived: number;
2419
+ fiatAmount: number;
2420
+ };
2421
+ id: string;
2422
+ createdAt: Date;
2423
+ clientSecret: string;
2424
+ organizationId: string;
2425
+ expiresAt: Date;
2426
+ userMetadata: Record<string, any> | null;
2427
+ customFieldData: Record<string, any> | null;
2428
+ customerMetadata: Record<string, any> | null;
2429
+ customerId: string | null;
2430
+ customerBillingAddress: Record<string, any> | null;
2431
+ providedAmount: number | null;
2432
+ totalAmount: number;
2433
+ discountAmount: number;
2434
+ netAmount: number;
2435
+ taxAmount: number;
2436
+ invoiceAmountSats: number;
2437
+ invoiceScid: string | null;
2438
+ btcPrice: number;
2439
+ } | {
2440
+ currency: string;
2441
+ type: "PRODUCTS" | "AMOUNT" | "TOP_UP";
2442
+ status: "EXPIRED";
2443
+ products: {
2444
+ id: string;
2445
+ name: string;
2446
+ description: string | null;
2447
+ recurringInterval: "MONTH" | "QUARTER" | "YEAR" | null;
2448
+ prices: {
2449
+ priceAmount: number | null;
2450
+ id: string;
2451
+ amountType: "FIXED" | "CUSTOM" | "FREE" | "METERED";
2452
+ minimumAmount: number | null;
2453
+ maximumAmount: number | null;
2454
+ presetAmount: number | null;
2455
+ unitAmount: number | null;
2456
+ capAmount: number | null;
2457
+ meterId: string | null;
2458
+ }[];
2459
+ }[] | null;
2460
+ successUrl: string | null;
2461
+ allowDiscountCodes: boolean;
2462
+ customerName: string | null;
2463
+ customerEmail: string | null;
2464
+ customerIpAddress: string | null;
2465
+ customerExternalId: string | null;
2466
+ requireCustomerFields: {
2467
+ customerName?: boolean | undefined;
2468
+ customerEmail?: boolean | undefined;
2469
+ } | null;
2470
+ invoice: {
2471
+ currency: string;
2472
+ invoice: string;
2473
+ paymentHash: string;
2474
+ amountSats: number | null;
2475
+ expiresAt: Date;
2476
+ btcPrice: number | null;
2477
+ amountSatsReceived: number | null;
2478
+ fiatAmount: number | null;
2479
+ } | null;
2480
+ id: string;
2481
+ createdAt: Date;
2482
+ clientSecret: string;
2483
+ organizationId: string;
2484
+ expiresAt: Date;
2485
+ userMetadata: Record<string, any> | null;
2486
+ customFieldData: Record<string, any> | null;
2487
+ customerMetadata: Record<string, any> | null;
2488
+ customerId: string | null;
2489
+ customerBillingAddress: Record<string, any> | null;
2490
+ providedAmount: number | null;
2491
+ totalAmount: number | null;
2492
+ discountAmount: number | null;
2493
+ netAmount: number | null;
2494
+ taxAmount: number | null;
2495
+ invoiceAmountSats: number | null;
2496
+ invoiceScid: string | null;
2497
+ btcPrice: number | null;
2498
+ }>;