@fractalpay/fractalpay-next-dev 0.0.1

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/.eslintrc.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": ["next/core-web-vitals", "next/typescript"]
3
+ }
package/README.md ADDED
@@ -0,0 +1,154 @@
1
+ # 🧩 FractalPay React Components
2
+
3
+ A collection of React components to easily integrate FractalPay payment flows into your React applications.
4
+
5
+ ---
6
+
7
+ ## 📦 Installation
8
+
9
+ ```bash
10
+ npm install fractalpay-react
11
+ ```
12
+
13
+ or
14
+
15
+ ```bash
16
+ yarn add fractalpay-react
17
+ ```
18
+
19
+ ---
20
+
21
+ ## 🧪 Components
22
+
23
+ ### 1. `RequestPayment`
24
+
25
+ Initiate a payment request with optional customer and order details.
26
+
27
+ ```tsx
28
+ import { RequestPayment } from 'fractalpay-react';
29
+
30
+ <RequestPayment
31
+ fractalpayClientKey="your-client-key"
32
+ amount="100.00"
33
+ customerId="cust_123"
34
+ orderID="order_001"
35
+ name="John Doe"
36
+ email="john@example.com"
37
+ phone="+11234567890"
38
+ from="checkout"
39
+ webname="MyWebsite"
40
+ discount="10"
41
+ tax="5"
42
+ surcharge="2"
43
+ require_3ds={true}
44
+ />
45
+ ```
46
+
47
+ ---
48
+
49
+ ### 2. `RequestPreAuthPayment`
50
+
51
+ Initiate a pre-authorization payment.
52
+
53
+ ```tsx
54
+ import { RequestPreAuthPayment } from 'fractalpay-react';
55
+
56
+ <RequestPreAuthPayment
57
+ fractalpayClientKey="your-client-key"
58
+ amount="100.00"
59
+ customerId="cust_123"
60
+ orderID="order_001"
61
+ />
62
+ ```
63
+
64
+ ---
65
+
66
+ ### 3. `GetPaymentPage`
67
+
68
+ Render a payment page interface with full customization.
69
+
70
+ ```tsx
71
+ import { GetPaymentPage } from 'fractalpay-react';
72
+
73
+ <GetPaymentPage
74
+ fractalpayClientKey="your-client-key"
75
+ amount="150.00"
76
+ name="Alice"
77
+ email="alice@example.com"
78
+ phone="+19876543210"
79
+ />
80
+ ```
81
+
82
+ ---
83
+
84
+ ### 4. `PreAuthPayment`
85
+
86
+ Render a pre-auth payment page interface.
87
+
88
+ ```tsx
89
+ import { PreAuthPayment } from 'fractalpay-react';
90
+
91
+ <PreAuthPayment
92
+ fractalpayClientKey="your-client-key"
93
+ amount="75.00"
94
+ />
95
+ ```
96
+
97
+ ---
98
+
99
+ ### 5. `AddCard`
100
+
101
+ Add a new payment card for a customer.
102
+
103
+ ```tsx
104
+ import { AddCard } from 'fractalpay-react';
105
+
106
+ <AddCard
107
+ fractalpayClientKey="your-client-key"
108
+ customerId="cust_456"
109
+ />
110
+ ```
111
+
112
+ ---
113
+
114
+ ### 6. `AddCardEasyPay`
115
+
116
+ Add a card with a simplified experience.
117
+
118
+ ```tsx
119
+ import { AddCardEasyPay } from 'fractalpay-react';
120
+
121
+ <AddCardEasyPay
122
+ fractalpayClientKey="your-client-key"
123
+ customerId="cust_456"
124
+ name="Jane Smith"
125
+ email="jane@example.com"
126
+ phone="+10987654321"
127
+ />
128
+ ```
129
+
130
+ ---
131
+
132
+ ## ⚙️ Props Overview
133
+
134
+ | Prop | Type | Required | Description |
135
+ |-----------------------|-----------|----------|--------------------------------------|
136
+ | `fractalpayClientKey` | `string` | ✅ | Your unique FractalPay client key |
137
+ | `customerId` | `string` | ❌ | Customer identifier |
138
+ | `orderID` | `string` | ❌ | Order identifier |
139
+ | `name` | `string` | ❌ | Customer name |
140
+ | `email` | `string` | ❌ | Customer email |
141
+ | `phone` | `string` | ❌ | Customer phone number |
142
+ | `from` | `string` | ❌ | Origin of the payment request |
143
+ | `amount` | `string` | ✅ | Amount to be charged |
144
+ | `webname` | `string` | ❌ | Website name |
145
+ | `discount` | `string` | ❌ | Discount amount |
146
+ | `tax` | `string` | ❌ | Tax amount |
147
+ | `surcharge` | `string` | ❌ | Additional surcharge |
148
+ | `require_3ds` | `boolean` | ❌ | Enable 3D Secure authentication |
149
+
150
+ ---
151
+
152
+ ## 📄 License
153
+
154
+ MIT License © 2025 FractalPay Inc.
@@ -0,0 +1,84 @@
1
+ import React from 'react';
2
+
3
+ interface Props$5 {
4
+ fractalpayClientKey: string;
5
+ customerId?: string;
6
+ orderID?: string;
7
+ name?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ from?: string;
11
+ amount: string;
12
+ webname?: string;
13
+ discount?: string;
14
+ tax?: string;
15
+ surcharge?: string;
16
+ require_3ds?: boolean;
17
+ }
18
+ declare function RequestPayment(props: Props$5): React.JSX.Element;
19
+
20
+ interface Props$4 {
21
+ fractalpayClientKey: string;
22
+ customerId?: string;
23
+ orderID?: string;
24
+ name?: string;
25
+ email?: string;
26
+ phone?: string;
27
+ from?: string;
28
+ amount: string;
29
+ webname?: string;
30
+ discount?: string;
31
+ tax?: string;
32
+ surcharge?: string;
33
+ require_3ds?: boolean;
34
+ }
35
+ declare function RequestPreAuthPayment(props: Props$4): React.JSX.Element;
36
+
37
+ type Props$3 = {
38
+ fractalpayClientKey: string;
39
+ customerId?: string;
40
+ orderID?: string;
41
+ name?: string;
42
+ email?: string;
43
+ phone?: string;
44
+ from?: string;
45
+ amount: string;
46
+ webname?: string;
47
+ discount?: string;
48
+ tax?: string;
49
+ surcharge?: string;
50
+ };
51
+ declare function GetPaymentPage(props: Props$3): React.JSX.Element;
52
+
53
+ type Props$2 = {
54
+ fractalpayClientKey: string;
55
+ customerId?: string;
56
+ orderID?: string;
57
+ name?: string;
58
+ email?: string;
59
+ phone?: string;
60
+ from?: string;
61
+ amount: string;
62
+ webname?: string;
63
+ discount?: string;
64
+ tax?: string;
65
+ surcharge?: string;
66
+ };
67
+ declare function PreAuthPayment(props: Props$2): React.JSX.Element;
68
+
69
+ type Props$1 = {
70
+ fractalpayClientKey: string;
71
+ customerId?: string;
72
+ };
73
+ declare function AddCard(props: Props$1): React.JSX.Element;
74
+
75
+ type Props = {
76
+ fractalpayClientKey: string;
77
+ customerId?: string;
78
+ name?: string;
79
+ email?: string;
80
+ phone?: string;
81
+ };
82
+ declare function AddCardEasyPay(props: Props): React.JSX.Element;
83
+
84
+ export { AddCard, AddCardEasyPay, GetPaymentPage, PreAuthPayment, RequestPayment, RequestPreAuthPayment };
@@ -0,0 +1,84 @@
1
+ import React from 'react';
2
+
3
+ interface Props$5 {
4
+ fractalpayClientKey: string;
5
+ customerId?: string;
6
+ orderID?: string;
7
+ name?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ from?: string;
11
+ amount: string;
12
+ webname?: string;
13
+ discount?: string;
14
+ tax?: string;
15
+ surcharge?: string;
16
+ require_3ds?: boolean;
17
+ }
18
+ declare function RequestPayment(props: Props$5): React.JSX.Element;
19
+
20
+ interface Props$4 {
21
+ fractalpayClientKey: string;
22
+ customerId?: string;
23
+ orderID?: string;
24
+ name?: string;
25
+ email?: string;
26
+ phone?: string;
27
+ from?: string;
28
+ amount: string;
29
+ webname?: string;
30
+ discount?: string;
31
+ tax?: string;
32
+ surcharge?: string;
33
+ require_3ds?: boolean;
34
+ }
35
+ declare function RequestPreAuthPayment(props: Props$4): React.JSX.Element;
36
+
37
+ type Props$3 = {
38
+ fractalpayClientKey: string;
39
+ customerId?: string;
40
+ orderID?: string;
41
+ name?: string;
42
+ email?: string;
43
+ phone?: string;
44
+ from?: string;
45
+ amount: string;
46
+ webname?: string;
47
+ discount?: string;
48
+ tax?: string;
49
+ surcharge?: string;
50
+ };
51
+ declare function GetPaymentPage(props: Props$3): React.JSX.Element;
52
+
53
+ type Props$2 = {
54
+ fractalpayClientKey: string;
55
+ customerId?: string;
56
+ orderID?: string;
57
+ name?: string;
58
+ email?: string;
59
+ phone?: string;
60
+ from?: string;
61
+ amount: string;
62
+ webname?: string;
63
+ discount?: string;
64
+ tax?: string;
65
+ surcharge?: string;
66
+ };
67
+ declare function PreAuthPayment(props: Props$2): React.JSX.Element;
68
+
69
+ type Props$1 = {
70
+ fractalpayClientKey: string;
71
+ customerId?: string;
72
+ };
73
+ declare function AddCard(props: Props$1): React.JSX.Element;
74
+
75
+ type Props = {
76
+ fractalpayClientKey: string;
77
+ customerId?: string;
78
+ name?: string;
79
+ email?: string;
80
+ phone?: string;
81
+ };
82
+ declare function AddCardEasyPay(props: Props): React.JSX.Element;
83
+
84
+ export { AddCard, AddCardEasyPay, GetPaymentPage, PreAuthPayment, RequestPayment, RequestPreAuthPayment };