@odus/checkout 1.11.3 → 1.12.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
@@ -1,6 +1,6 @@
1
1
  # Checkout SDK
2
2
 
3
- The Odus Checkout is a flexible, easy-to-implement JavaScript SDK that allows merchants to accept payments on their websites with minimal integration effort. This documentation provides all the necessary information to successfully implement the Odus Checkout on your website.
3
+ The ODUS Checkout is a flexible, easy-to-implement JavaScript SDK that allows merchants to accept payments on their websites with minimal integration effort. This documentation provides all the necessary information to successfully implement the ODUS Checkout on your website.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -92,7 +92,7 @@ import { OdusCheckout, CheckoutConfig, CheckoutInstance, Locale } from '@odus/ch
92
92
 
93
93
  // Now you can use these types in your code
94
94
  const config: CheckoutConfig = {
95
- apiKey: 'your_api_key',
95
+ apiKey: 'pk_retired',
96
96
  paymentId: 'your_payment_id',
97
97
  checkoutKey: 'your_unique_checkout_key',
98
98
  returnUrl: 'https://your-website.com/payment-complete',
@@ -108,7 +108,7 @@ const checkout: CheckoutInstance = new OdusCheckout(config);
108
108
 
109
109
  ### Basic Implementation
110
110
 
111
- Here's a simple example of how to implement the Odus Checkout in your application:
111
+ Here's a simple example of how to implement the ODUS Checkout in your application:
112
112
 
113
113
  ```javascript
114
114
  import { OdusCheckout } from '@odus/checkout';
@@ -117,7 +117,7 @@ import '@odus/checkout/styles';
117
117
 
118
118
  // Initialize the checkout
119
119
  const checkout = new OdusCheckout({
120
- apiKey: 'your_api_key',
120
+ apiKey: 'pk_retired',
121
121
  paymentId: 'your_payment_id',
122
122
  checkoutKey: 'your_unique_checkout_key',
123
123
  returnUrl: 'https://your-website.com/payment-complete',
@@ -157,11 +157,11 @@ Make sure you have a container element in your HTML:
157
157
 
158
158
  ## Configuration Options
159
159
 
160
- When initializing the Odus Checkout, you can configure various options:
160
+ When initializing the ODUS Checkout, you can configure various options:
161
161
 
162
162
  | Option | Type | Required | Description |
163
163
  | ---------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
164
- | `apiKey` | string | ✅ | Your Odus API key obtained from the dashboard's API Keys page |
164
+ | `apiKey` | string | ✅ | Required, but not used since version 0.14.0. Pass `'pk_retired'`. |
165
165
  | `checkoutKey` | string | ✅ | Unique checkout key for this payment session |
166
166
  | `paymentId` | string | ✅ | The ID of the payment being processed |
167
167
  | `environment` | string | ✅ | API environment to use - either 'test' or 'live' |
@@ -173,7 +173,7 @@ When initializing the Odus Checkout, you can configure various options:
173
173
 
174
174
  ## Payment Methods
175
175
 
176
- The Odus Checkout automatically displays payment methods based on your account configuration and the checkout profile. The following payment methods are supported:
176
+ The ODUS Checkout automatically displays payment methods based on your account configuration and the checkout profile. The following payment methods are supported:
177
177
 
178
178
  - Credit/Debit Cards (Visa, Mastercard, American Express, Discover, JCB, Diners)
179
179
  - PayPal
@@ -181,7 +181,7 @@ The Odus Checkout automatically displays payment methods based on your account c
181
181
 
182
182
  ## Callbacks and Event Handling
183
183
 
184
- The Odus Checkout SDK provides callback functions to handle different payment scenarios:
184
+ The ODUS Checkout SDK provides callback functions to handle different payment scenarios:
185
185
 
186
186
  ### onPaymentSucceeded
187
187
 
@@ -224,7 +224,7 @@ onActionRequired: (redirectUrl) => {
224
224
 
225
225
  Called when the loading state of the checkout form changes. This is useful for showing or hiding custom loading indicators in your UI.
226
226
 
227
- This callback is optional. If not provided, Odus will automatically render its default spinner during loading states.
227
+ This callback is optional. If not provided, ODUS will automatically render its default spinner during loading states.
228
228
 
229
229
  ```javascript
230
230
  onLoadingStateChange: (isLoading) => {
@@ -241,20 +241,20 @@ onLoadingStateChange: (isLoading) => {
241
241
  };
242
242
  ```
243
243
 
244
- **Note:** Implementing this callback will override the default Odus loading indicator, giving you complete control over the loading experience.
244
+ **Note:** Implementing this callback will override the default ODUS loading indicator, giving you complete control over the loading experience.
245
245
 
246
246
  ## Localization Support
247
247
 
248
- Odus provides localized payment experiences in 33 languages, helping you better serve your global customer base.
248
+ ODUS provides localized payment experiences in 33 languages, helping you better serve your global customer base.
249
249
 
250
250
  ### How it works
251
251
 
252
- - **Automatic Detection**: By default, Odus detects your customer's browser locale and displays the payment page in that language if supported.
252
+ - **Automatic Detection**: By default, ODUS detects your customer's browser locale and displays the payment page in that language if supported.
253
253
  - **Manual Override**: You can specify a particular language by passing the locale parameter when creating a Checkout Session.
254
254
 
255
255
  ### Supported Languages
256
256
 
257
- Odus currently supports localization for 33 languages, ensuring broad international coverage for your payment processing needs.
257
+ ODUS currently supports localization for 33 languages, ensuring broad international coverage for your payment processing needs.
258
258
 
259
259
  ## Advanced Usage
260
260
 
@@ -272,7 +272,7 @@ checkout.unmount();
272
272
 
273
273
  ### Custom 3DS Redirect Handling
274
274
 
275
- By default, Odus Checkout automatically redirects customers to the 3DS authentication page when required. However, you can take control of this process for a more customized experience:
275
+ By default, ODUS Checkout automatically redirects customers to the 3DS authentication page when required. However, you can take control of this process for a more customized experience:
276
276
 
277
277
  ```javascript
278
278
  const checkout = new OdusCheckout({
@@ -391,13 +391,13 @@ interface CheckoutInstance {
391
391
  - Ensure the container element exists before calling `mount()`
392
392
  - Check that styles are imported with `import '@odus/checkout/styles'` when using npm/module approach
393
393
  - Check browser console for errors
394
- - Verify your API key and profile ID are correct
394
+ - Verify your checkout key and payment ID are correct
395
395
  - Confirm that you're using the correct environment ('test' or 'live')
396
396
 
397
397
  #### 3DS Authentication Issues
398
398
 
399
399
  - Ensure your `returnUrl` is properly configured
400
- - Verify your domain is whitelisted in your Odus account settings
400
+ - Verify your domain is whitelisted in your ODUS account settings
401
401
  - If using `manualActionHandling: true`, make sure the `onActionRequired` callback is properly implemented
402
402
 
403
403
  #### Manual 3DS Handling Not Working
@@ -1 +1 @@
1
- {"version":3,"file":"createApplePaySession.mutation.d.ts","sourceRoot":"","sources":["../../src/api/createApplePaySession.mutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGzE,eAAO,MAAM,qBAAqB,GAAU,4DAMzC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CAC1B,iBAuBA,CAAC"}
1
+ {"version":3,"file":"createApplePaySession.mutation.d.ts","sourceRoot":"","sources":["../../src/api/createApplePaySession.mutation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGzE,eAAO,MAAM,qBAAqB,GAAU,4DAMzC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CAC1B,iBAoBA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCheckoutDetails.query.d.ts","sourceRoot":"","sources":["../../src/api/getCheckoutDetails.query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGzE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,GAAU,mCAItC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CAC1B,KAAG,OAAO,CAAC,eAAe,CAgB1B,CAAC"}
1
+ {"version":3,"file":"getCheckoutDetails.query.d.ts","sourceRoot":"","sources":["../../src/api/getCheckoutDetails.query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGzE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,GAAU,mCAItC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;CAC1B,KAAG,OAAO,CAAC,eAAe,CAgB1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutAPI.service.d.ts","sourceRoot":"","sources":["../../../src/core/api/CheckoutAPI.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAEV,YAAY,EACZ,QAAQ,EACT,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAuBhE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,MACA,CAAC;AAE5C,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAOjB;gBAGA,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,OAAO,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,WAA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AAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9C,GAAG,OAAO,CAAC,OAAO,CAAC;CAmJrB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Every Orchestration API route the SDK calls, relative to `getBaseUrl()`.
3
+ *
4
+ * All of them carry the `/v2` prefix. An unprefixed route resolves to v1, which
5
+ * stops on 4 November 2026, and a published SDK version keeps calling the
6
+ * routes it shipped with. Keep every call here so no route can drift back to
7
+ * an unprefixed path.
8
+ */
9
+ export declare const API_ROUTES: {
10
+ readonly checkoutDetails: (paymentId: string) => string;
11
+ readonly authorize: (paymentId: string) => string;
12
+ readonly applePaySessions: (paymentId: string) => string;
13
+ };
14
+ //# sourceMappingURL=apiRoutes.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiRoutes.constants.d.ts","sourceRoot":"","sources":["../../../src/core/constants/apiRoutes.constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;0CACQ,MAAM;oCAEZ,MAAM;2CACC,MAAM;CAE5B,CAAC"}