@sezzle/sezzle-react-widget 3.1.6 → 3.2.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/README.md +97 -51
- package/dist/index.cjs +741 -546
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +741 -546
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,93 +26,139 @@ The following props can be specified in the element to customize the widget's co
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`price` (required)
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
**Purpose**: The price value from which to calculate the installment amount, including currency.
|
|
32
|
+
**Type**: string
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
`merchantId` (required)
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
**Purpose**: Site's 36-character Merchant ID, found in the Business Settings of Sezzle Merchant Dashboard.
|
|
37
|
+
**Type**: string
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
`theme` (optional)
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
**Purpose**: To control the Sezzle image variant. Use light or black-flat for light backgrounds, dark or white-flat for dark backgrounds.
|
|
42
|
+
**Type**: string
|
|
43
|
+
**Options**: light, dark, white-flat, black-flat
|
|
44
|
+
**Default**: light
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
`alignment` (optional)
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
**Type**: string
|
|
49
|
+
**Options**: auto, left, center, right
|
|
50
|
+
**Default**: auto
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
`fontWeight` (optional)
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
**Type**: number
|
|
55
|
+
**Default**: 500
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
`fontFamily` (optional)
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
**Type**: string
|
|
60
|
+
**Default**: inherit
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
`fontSize` (optional)
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
**Type**: number
|
|
65
|
+
**Default**: 14
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
`textColor` (optional)
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
**Type**: string
|
|
70
|
+
**Default**: inherit
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
`logoSize` (optional)
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
**Purpose**: To scale the logo (1 = 100%)
|
|
75
|
+
**Type**: number
|
|
76
|
+
**Default**: 1
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
`includeAPModal` (optional)
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
**Purpose**: To enable Afterpay's logo within the Sezzle widget
|
|
81
|
+
**Type**: boolean
|
|
82
|
+
**Default**: false
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
`numberOfPayments` (optional)
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
**Purpose**: Number of installments by which the shopper will pay the total, calculates installment amount.
|
|
87
|
+
**Type**: number
|
|
88
|
+
**Options**: 4, 5
|
|
89
|
+
**Default**: 5
|
|
90
|
+
**Additional Details**: Default 5 installments will appear above $50, and 4 installments will show below that amount. If override reflects `4`, 5 installments will never show in the widget or modal.
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
`minPrice` (optional)
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
**Purpose**: to display a checkout minimum within the Sezzle widget
|
|
95
|
+
**Type**: number
|
|
96
|
+
**Default**: 0
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
`maxPrice` (optional)
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
**Purpose**: the threshold at which to not show biweekly installments within the Sezzle widget
|
|
101
|
+
**Type**: number
|
|
102
|
+
**Default**: 2500
|
|
101
103
|
|
|
102
104
|
## <b>The following are reserved for merchants enrolled in our long-term payment program. Please discuss with Sezzle point of contact before using the below config options:</b>
|
|
103
105
|
|
|
106
|
+
The default values listed below for each long-term option correspond to the `LTgroup: "a"` preset. Setting `LTgroup` to a different value shifts those defaults to that group's preset (see each option's **Additional Details**). Individual options always take precedence over both the LTgroup preset and the listed default. All long-term prices are in whole currency units (e.g. dollars), matching `minPrice` and `maxPrice`.
|
|
107
|
+
|
|
108
|
+
`LTgroup` (optional)
|
|
109
|
+
|
|
110
|
+
**Purpose**: Applies long-term settings based on your lending package. Please confirm the applicable value for your enrollment with your account manager.
|
|
111
|
+
**Type**: string
|
|
112
|
+
**Options**: `a` or `b`
|
|
113
|
+
**Default**: null
|
|
114
|
+
**Additional Details**: This is the crucial config option for enabling long-term widgets.
|
|
115
|
+
|
|
104
116
|
`minPriceLT` (optional)
|
|
105
117
|
|
|
106
|
-
**Purpose**: Minimum price for which purchase is eligible for long-term lending. Above this amount, the monthly installments with interest will be reflected in the widget and modal. Below this amount, the
|
|
118
|
+
**Purpose**: Minimum price override for which purchase is eligible for long-term lending. Above this amount, the monthly installments with interest will be reflected in the widget and modal. Below this amount, the bi-weekly widget and modal will render.
|
|
107
119
|
**Type**: number
|
|
108
120
|
**Default**: 0
|
|
109
|
-
**Additional Details**:
|
|
121
|
+
**Additional Details**: When `LTgroup` is set, defaults to `150` for `a` or `400` for `b`.
|
|
122
|
+
|
|
123
|
+
Deprecation notice: This was previously the crucial config option for enabling long-term widgets. For backwards compatibility, if this value is set but `LTgroup` is unset, `LTgroup` automatically resolves to `a`.
|
|
110
124
|
|
|
111
|
-
`
|
|
125
|
+
`maxPriceLT` (optional)
|
|
112
126
|
|
|
113
|
-
**Purpose**:
|
|
127
|
+
**Purpose**: Maximum price override for which purchase is eligible for long-term lending. Below this amount, the monthly installments with interest will be reflected in the widget and modal. Above this amount, the widget and modal will not render.
|
|
128
|
+
**Type**: number
|
|
129
|
+
**Default**: 15000
|
|
130
|
+
**Additional Details**: When `LTgroup` is set, defaults to `15000` for `a` or `8000` for `b`.
|
|
131
|
+
|
|
132
|
+
The `maxPrice` option corresponds to the bi-weekly installments only. Between these two prices, the long-term widget will render, and the bi-weekly installments will not show in the modal.
|
|
133
|
+
|
|
134
|
+
`minAPR` (optional)
|
|
135
|
+
|
|
136
|
+
**Purpose**: Lowest APR offered by the lending partner. Displayed as the lower bound of the APR range in the modal disclaimer.
|
|
137
|
+
**Type**: number
|
|
138
|
+
**Default**: 9.99
|
|
139
|
+
**Additional Details**: When `LTgroup` is set, defaults to `9.99` for `a` or `24.99` for `b`.
|
|
140
|
+
|
|
141
|
+
`medianAPR` (optional)
|
|
142
|
+
|
|
143
|
+
**Purpose**: Representative APR used to calculate the monthly installment amount shown in the widget and on each long-term installment card in the modal.
|
|
114
144
|
**Type**: number
|
|
115
145
|
**Default**: 21.99
|
|
146
|
+
**Additional Details**: When `LTgroup` is set, defaults to `21.99` for `a` or `29.99` for `b`.
|
|
147
|
+
|
|
148
|
+
`maxAPR` (optional)
|
|
149
|
+
|
|
150
|
+
**Purpose**: Highest APR offered by the lending partner. Displayed as the upper bound of the APR range in the modal disclaimer.
|
|
151
|
+
**Type**: number
|
|
152
|
+
**Default**: 34.99
|
|
153
|
+
**Additional Details**: When `LTgroup` is set, defaults to `34.99` for `a` or `35.99` for `b`.
|
|
154
|
+
|
|
155
|
+
`termsToShow` (optional)
|
|
156
|
+
|
|
157
|
+
**Purpose**: Defines which loan term lengths (in months) appear in the modal based on the order amount. Keys are price thresholds; the widget picks the term array whose threshold the price exceeds (highest match wins). The `default` key is used when no threshold matches. The min and max term lengths shown in the modal disclaimer are derived from the union of all term arrays.
|
|
158
|
+
**Type**: object
|
|
159
|
+
**Default**: LTgroup preset.
|
|
160
|
+
- `a`: `{ 1000: [24, 36, 48], 500: [12, 18, 24], 300: [6, 9, 12], default: [3, 6, 9] }`
|
|
161
|
+
- `b`: `{ 1000: [12, 24, 36], 800: [9, 12, 24], 600: [6, 9, 12], default: [3, 6, 9] }`
|
|
116
162
|
|
|
117
163
|
# Example
|
|
118
164
|
|