@sezzle/sezzle-react-widget 3.1.7 → 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 CHANGED
@@ -103,25 +103,62 @@ The following props can be specified in the element to customize the widget's co
103
103
 
104
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>
105
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
+
106
116
  `minPriceLT` (optional)
107
117
 
108
- **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 4-pay widget and modal will render.
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.
109
119
  **Type**: number
110
120
  **Default**: 0
111
- **Additional Details**: This is the primary indicator that long-term installments should be reflected in the widget.
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`.
112
124
 
113
125
  `maxPriceLT` (optional)
114
126
 
115
- **Purpose**: Maximum price for which purchase is eligible for long-term lending. Above this amount, the widget will not render.
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.
116
128
  **Type**: number
117
129
  **Default**: 15000
118
- **Additional Details**: Previously, `maxPrice` would be overridden. Now that field should only be used for biweekly installment maximum, and this should be used for long-term.
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)
119
135
 
120
- `bestAPR` (optional)
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)
121
142
 
122
- **Purpose**: Standard APR rate by which interest should be calculated. (Note: the key is a misnomer - our lending partner now requires the APR to be calculated based on average awarded APR)
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.
123
144
  **Type**: number
124
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] }`
125
162
 
126
163
  # Example
127
164