@paydock/client-sdk 1.105.1 → 1.106.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.
Files changed (54) hide show
  1. package/README.md +255 -246
  2. package/bundles/widget.umd.js +1197 -1724
  3. package/bundles/widget.umd.min.js +1 -1
  4. package/lib/api/api-service-internal.d.ts +2 -1
  5. package/lib/api/api-service-internal.js +1 -0
  6. package/lib/api/api-service-internal.js.map +1 -1
  7. package/lib/components/iframe-event.d.ts +2 -0
  8. package/lib/components/iframe-event.js +2 -0
  9. package/lib/components/iframe-event.js.map +1 -1
  10. package/lib/components/link.d.ts +3 -2
  11. package/lib/components/link.js +1 -0
  12. package/lib/components/link.js.map +1 -1
  13. package/lib/components/param.d.ts +2 -2
  14. package/lib/components/param.js.map +1 -1
  15. package/lib/components/wallet-background.js +12 -0
  16. package/lib/components/wallet-background.js.map +1 -1
  17. package/lib/configs/sdk.js +1 -1
  18. package/lib/secure-remote-commerce/index.d.ts +102 -1
  19. package/lib/secure-remote-commerce/index.js +102 -1
  20. package/lib/secure-remote-commerce/index.js.map +1 -1
  21. package/lib/secure-remote-commerce/interfaces.d.ts +109 -32
  22. package/lib/secure-remote-commerce/interfaces.js +31 -11
  23. package/lib/secure-remote-commerce/interfaces.js.map +1 -1
  24. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +30 -0
  25. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +40 -0
  26. package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +1 -0
  27. package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -0
  28. package/lib/secure-remote-commerce/providers/mastercard-src/index.js +2 -0
  29. package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +1 -0
  30. package/lib/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +4 -7
  31. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +89 -0
  32. package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -0
  33. package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
  34. package/lib/secure-remote-commerce/secure-remote-commerce.js +15 -99
  35. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -1
  36. package/lib/wallet-buttons/flypay-v2.wallet-service.d.ts +0 -1
  37. package/lib/wallet-buttons/flypay-v2.wallet-service.js +28 -30
  38. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -1
  39. package/package.json +2 -2
  40. package/slate.md +69 -131
  41. package/typings/index.d.ts +0 -1
  42. package/vendors/zipmoney.js +1 -2
  43. package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -7
  44. package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
  45. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
  46. package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
  47. package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
  48. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
  49. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
  50. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
  51. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -8
  52. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
  53. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
  54. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
package/README.md CHANGED
@@ -6381,54 +6381,42 @@ List of available event's name in the wallet button lifecycle
6381
6381
  | ON_CLICK | <code>string</code> | <code>&quot;onClick&quot;</code> |
6382
6382
 
6383
6383
 
6384
- ## Secure Remote Commerce
6385
- You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
6386
-
6387
- This widget provides you with the ability to easily integrate with SRC providers. Currently Visa SRC is supported.
6388
-
6384
+ # Secure Remote Commerce
6385
+ ## Overview
6386
+ Integrate with Mastercard SRC using Paydock's Mastercard SRC widget.
6387
+ For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
6389
6388
  ## SRC simple example
6390
-
6391
- ### Container
6392
-
6389
+ The following section provides an example use case and integration for the widget.
6390
+ ### Create a Container
6391
+ To integrate the SRC checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
6393
6392
  ```html
6394
- <div id="checkoutButton"></div>
6395
6393
  <div id="checkoutIframe"></div>
6396
6394
  ```
6397
-
6398
- You must create a container for the initial checkout button, and a different one for the checkout iFrame. Inside the first tag the button will be initialized, and inside the second one the iFrame will be loaded once the button is clicked.
6399
-
6400
-
6401
- ### Initialization
6395
+ ### Initialize the Widget
6396
+ Use the following code to initialize your widget:
6402
6397
  ```javascript
6403
- var src = new paydock.SRC(
6404
- "#checkoutButton",
6398
+ var src = new paydock.MastercardSRCClickToPay(
6405
6399
  "#checkoutIframe",
6406
- "scheme_service_id",
6400
+ "service_id",
6407
6401
  "paydock_public_key_or_access_token",
6408
6402
  {}, // meta
6409
6403
  );
6410
6404
  src.load();
6411
6405
  ```
6412
-
6413
6406
  ```javascript--es2015
6414
6407
  // ES2015 | TypeScript
6415
-
6416
- import { SRC } from '@paydock/client-sdk';
6417
-
6418
- var src = new SRC(
6419
- "#checkoutButton",
6408
+ import { MastercardSRCClickToPay } from '@paydock/client-sdk';
6409
+ var src = new MastercardSRCClickToPay(
6420
6410
  "#checkoutIframe",
6421
- "scheme_service_id",
6411
+ "service_id",
6422
6412
  "paydock_public_key_or_access_token",
6423
6413
  {}, // meta
6424
6414
  );
6425
6415
  src.load();
6426
6416
  ```
6427
-
6428
- *NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons. When creating it, you will need to enable the `Secure Remote Commerce` and add a whiteliste for the domain of your checkout screen.
6429
-
6417
+ *NOTE:* Paydock recommends that you use a Paydock Access Token instead of a public key for security reasons in production environments. When creating your access token, you must enable the `Secure Remote Commerce` and add a whitelist for the domain of your checkout screen.
6430
6418
  ### Full example
6431
-
6419
+ A full example of the container and the initialized widget is as follows:
6432
6420
  ```html
6433
6421
  <!DOCTYPE html>
6434
6422
  <html lang="en">
@@ -6438,14 +6426,12 @@ src.load();
6438
6426
  <style>iframe {border: 0;width: 40%;height: 300px;}</style>
6439
6427
  </head>
6440
6428
  <body>
6441
- <div id="checkoutButton"></div>
6442
6429
  <div id="checkoutIframe"></div>
6443
6430
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
6444
6431
  <script>
6445
- var src = new paydock.SRC(
6446
- "#checkoutButton",
6432
+ var src = new paydock.MastercardSRCClickToPay(
6447
6433
  "#checkoutIframe",
6448
- "scheme_service_id",
6434
+ "service_id",
6449
6435
  "paydock_public_key_or_access_token",
6450
6436
  {},
6451
6437
  );
@@ -6454,53 +6440,27 @@ src.load();
6454
6440
  </body>
6455
6441
  </html>
6456
6442
  ```
6457
-
6458
-
6459
- ## SRC advanced example
6460
-
6443
+ ## Customize your SRC Checkout
6444
+ The following is an advanced example that includes customization. You can use these methods to enhance your checkout experience.
6461
6445
  ### Settings
6462
-
6463
6446
  ```javascript
6464
-
6465
- src.setEnv('sandbox'); // set enviroment
6466
-
6467
- src.hideButton(); // hide button
6468
-
6469
- src.showButton(); // show button
6470
-
6447
+ src.setEnv('sandbox'); // set environment
6471
6448
  src.hideCheckout(); // hide checkout iframe
6472
-
6473
6449
  src.showCheckout(); // show checkout iframe
6474
-
6475
- src.on('checkoutButtonLoaded', () => {
6476
- console.log("Button loaded");
6477
- });
6478
-
6479
- src.on('checkoutButtonClicked', () => {
6480
- console.log("Button clicked");
6481
- });
6482
-
6483
6450
  src.on('iframeLoaded', () => {
6484
6451
  console.log("Initial iframe loaded");
6485
6452
  });
6486
-
6487
6453
  src.on('checkoutReady', () => {
6488
6454
  console.log("Checkout ready to be used");
6489
6455
  });
6490
-
6491
6456
  src.on('checkoutCompleted', (token) => {
6492
6457
  console.log(token);
6493
6458
  });
6494
-
6495
6459
  src.on('checkoutError', (error) => {
6496
6460
  console.log(error);
6497
6461
  });
6498
6462
  ```
6499
-
6500
- Here you can see how you can use this methods to customize your checkout experience
6501
-
6502
6463
  ### Full example
6503
-
6504
6464
  ```html
6505
6465
  <!DOCTYPE html>
6506
6466
  <html lang="en">
@@ -6510,64 +6470,67 @@ Here you can see how you can use this methods to customize your checkout experie
6510
6470
  <style>iframe {border: 0;width: 40%;height: 450px;}</style>
6511
6471
  </head>
6512
6472
  <body>
6513
- <div id="checkoutButton"></div>
6514
6473
  <div id="checkoutIframe"></div>
6515
6474
  <script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
6516
6475
  <script>
6517
- var src = new paydock.SRC(
6518
- "#checkoutButton",
6476
+ var src = new paydock.MastercardSRCClickToPay(
6519
6477
  "#checkoutIframe",
6520
- "scheme_service_id",
6478
+ "service_id",
6521
6479
  "paydock_public_key_or_access_token",
6522
6480
  {},
6523
6481
  );
6524
-
6482
+ src.on('iframeLoaded', () => {
6483
+ console.log("Initial iframe loaded");
6484
+ });
6525
6485
  src.on('checkoutReady', () => {
6526
6486
  console.log("Checkout ready to be used");
6527
6487
  });
6528
-
6529
6488
  src.on('checkoutCompleted', (token) => {
6530
6489
  console.log(token);
6531
6490
  });
6491
+ src.on('checkoutError', (error) => {
6492
+ console.log(error);
6493
+ });
6532
6494
  src.load();
6533
6495
  </script>
6534
6496
  </body>
6535
6497
  </html>
6536
6498
  ```
6537
-
6538
- ## Customization options for address fields
6539
- ### Shipping address:
6540
-
6541
- To customize shipping address experience we use a flag that manages how VisaSRC requires or not shipping address to the customer. Options are NONE (default option), POSTAL_COUNTRY or ALL.
6542
-
6499
+ ## Customize your billing address fields
6500
+ To customize your billing address experience, Paydock uses a flag that manages whether a customer's billing address is mandatory.
6501
+ The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
6543
6502
  ```
6544
- var src = new paydock.SRC(
6545
- "#checkoutButton",
6503
+ var src = new paydock.MastercardSRCClickToPay(
6546
6504
  "#checkoutIframe",
6547
- "scheme_service_id",
6505
+ "service_id",
6548
6506
  "paydock_public_key_or_access_token",
6549
6507
  {
6550
6508
  "dpa_transaction_options": {
6551
- "dpa_shipping_preference": "ALL"
6509
+ "dpa_billing_preference": "FULL"
6552
6510
  }
6553
6511
  },
6554
6512
  );
6555
6513
  ```
6556
-
6557
- With this the Visa popup requires the shipping address from consumer, and these information will be stored in the Paydock charge.
6558
-
6559
- Another option is at time of creating the charge. Say that you have a different way of collecting the shipping address (outside Paydock checkout), you can then disable the shipping address on our SRC widget and send it when creating the charge creation after getting the One Time Token out of the SRC widget:
6560
-
6514
+ The SRC checkout in the example requires the billing address from the customer, which is then returned as a part of the checkout data. The data is then stored and leveraged in the Paydock charge.
6515
+ You can also provide the billing address at the time of creating the charge. For example, if you have a different method for collecting the billing address, such as outside of the SRC checkout, you can provide it alongside other information at the charge creation step:
6516
+ 1. Disable the billing address in Paydock's SRC widget.
6517
+ 2. Get your One Time Token from the SRC widget alongside other details that may have been collected outside the SRC checkout as the shipping address.
6518
+ 3. Send the billing address when creating the charge.
6561
6519
  ```
6562
6520
  POST v1/charges
6563
-
6564
6521
  {
6565
6522
  "amount": "10.00",
6566
6523
  "currency": "AUD",
6567
- "token": "token",
6524
+ "token": "one_time_token",
6568
6525
  "customer": {
6569
6526
  "payment_source": {
6570
- "gateway_id": "gateway_id"
6527
+ "gateway_id": "gateway_id",
6528
+ "address_line1": "address_line1",
6529
+ "address_line2": "address_line2",
6530
+ "address_city": "address_city",
6531
+ "address_postcode": "address_postcode",
6532
+ "address_state": "address_state",
6533
+ "address_country": "address_country"
6571
6534
  }
6572
6535
  },
6573
6536
  "shipping": {
@@ -6581,202 +6544,254 @@ POST v1/charges
6581
6544
  }
6582
6545
  }
6583
6546
  ```
6584
-
6585
- - Billing address:
6586
-
6587
- Billing address fields are always present on the checkout and required when adding a new credit card (or for new consumer checkout). You can send billing fields on the meta data to pre-fill these fields inside the customer object:
6588
-
6547
+ ## How to customize accepted cards
6548
+ You can send a flag `unaccepted_card_type` to block the usage of a specific card type. The available options are 'DEBIT' and 'CREDIT'.
6549
+ ### Example code
6550
+ The following example demonstrates how to block the card:
6589
6551
  ```
6590
- var src = new paydock.SRC(
6591
- "#checkoutButton",
6552
+ var src = new paydock.MastercardSRCClickToPay(
6592
6553
  "#checkoutIframe",
6593
- "scheme_service_id",
6594
- "paydock_public_key_or_access_token",
6554
+ "service_id",
6555
+ "paydock_public_key",
6595
6556
  {
6596
- "customer": {
6597
- "email": "test@email.com",
6598
- "first_name": "Name",
6599
- "last_name": "Surname",
6600
- "phone": {
6601
- "country_code": "1",
6602
- "phone": "2124567890"
6603
- },
6604
- "payment_source": {
6605
- "address_line1": "Line 1",
6606
- "address_line2": "Line 2",
6607
- "address_city": "Miami",
6608
- "address_postcode": "33126",
6609
- "address_state": "FL",
6610
- "address_country": "US"
6611
- }
6612
- }
6557
+ unaccepted_card_type: 'DEBIT'
6613
6558
  },
6614
6559
  );
6615
6560
  ```
6616
-
6617
- ## Personalization Styling
6618
-
6619
- To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
6620
-
6561
+ ## Personalize the Style
6562
+ Customize the look and feel of your UI. The following example demonstrates changes in the styling of the buttons.
6621
6563
  ### Example code
6622
-
6623
6564
  ```
6624
- var src = new paydock.SRC(
6625
- "#checkoutButton",
6565
+ var src = new paydock.MastercardSRCClickToPay(
6626
6566
  "#checkoutIframe",
6627
- "scheme_service_id",
6567
+ "service_id",
6628
6568
  "paydock_public_key",
6569
+ {},
6629
6570
  );
6630
-
6631
- button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_family":"sans-serif"})
6632
-
6571
+ src.setStyles({
6572
+ enable_src_popup: true,
6573
+ primary_button_color: 'red',
6574
+ secondary_button_color: 'red',
6575
+ primary_button_text_color: 'red',
6576
+ secondary_button_text_color: 'red',
6577
+ font_family: 'Arial',
6578
+ });
6633
6579
  ```
6634
- ## Event and Values
6635
-
6636
- | Event Value | Type | Description |
6637
- | ------------------- | ------------------- | -------------------------------------------------------------- |
6638
- | primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
6639
- | button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
6640
- | font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
6641
- | card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
6642
6580
 
6643
6581
  ## Classes
6644
6582
 
6645
6583
  <dl>
6646
- <dt><a href="#SRC">SRC</a></dt>
6647
- <dd><p>Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC</p>
6584
+ <dt><a href="#MastercardSRCClickToPay">MastercardSRCClickToPay</a> ⇐ <code>SRC</code></dt>
6585
+ <dd><p>Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option</p>
6648
6586
  </dd>
6649
6587
  </dl>
6650
6588
 
6651
6589
  ## Interfaces
6652
6590
 
6653
6591
  <dl>
6654
- <dt><a href="#IVisaSRCMeta">IVisaSRCMeta</a> : <code>object</code></dt>
6655
- <dd><p>Interface of data used for the Visa Checkout.</p>
6592
+ <dt><a href="#IMastercardSRCMeta">IMastercardSRCMeta</a> : <code>object</code></dt>
6593
+ <dd><p>Interface of data used for the Mastercard Checkout. For further information refer to <a href="https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init">the documentation</a>.</p>
6594
+ </dd>
6595
+ <dt><a href="#EventData">EventData</a> : <code>object</code></dt>
6596
+ <dd><p>Interface for data returned in callbacks</p>
6597
+ </dd>
6598
+ <dt><a href="#EventDataCheckoutCompletedData">EventDataCheckoutCompletedData</a> : <code>object</code></dt>
6599
+ <dd><p>Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
6600
+ When the flow type is src, masked checkoutData available is also returned</p>
6601
+ </dd>
6602
+ <dt><a href="#IStyles">IStyles</a> : <code>object</code></dt>
6603
+ <dd><p>Interface for style configs inyected to the SRC checkout</p>
6656
6604
  </dd>
6657
6605
  </dl>
6658
6606
 
6659
- <a name="IVisaSRCMeta" id="IVisaSRCMeta" href="#IVisaSRCMeta">&nbsp;</a>
6607
+ <a name="IMastercardSRCMeta" id="IMastercardSRCMeta" href="#IMastercardSRCMeta">&nbsp;</a>
6660
6608
 
6661
- ## IVisaSRCMeta : <code>object</code>
6662
- Interface of data used for the Visa Checkout.
6609
+ ## IMastercardSRCMeta : <code>object</code>
6610
+ Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
6663
6611
 
6664
6612
  **Kind**: global interface
6665
6613
 
6666
6614
  | Param | Type | Description |
6667
6615
  | --- | --- | --- |
6668
- | [srci_transaction_id] | <code>string</code> | Used to identify the SRC Id. |
6616
+ | [disable_summary_screen] | <code>boolean</code> | Boolean flag that controls if a final summary screen is presented in the checkout flow. |
6669
6617
  | [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
6670
- | [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented in. |
6618
+ | [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented. |
6671
6619
  | [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
6672
- | [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a trasaction with DPA. |
6620
+ | [dpa_data.dpa_address] | <code>string</code> | Address associated with the DPA. |
6621
+ | [dpa_data.dpa_email_address] | <code>string</code> | Email address for DPA communication. |
6622
+ | [dpa_data.dpa_phone_number] | <code>object</code> | Phone number structure for DPA communication. |
6623
+ | [dpa_data.dpa_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
6624
+ | [dpa_data.dpa_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
6625
+ | [dpa_data.dpa_logo_uri] | <code>string</code> | URI for the DPA logo. |
6626
+ | [dpa_data.dpa_supported_email_address] | <code>string</code> | Supported email address for DPA support. |
6627
+ | [dpa_data.dpa_supported_phone_number] | <code>object</code> | Supported phone number for DPA support. |
6628
+ | [dpa_data.dpa_supported_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
6629
+ | [dpa_data.dpa_supported_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
6630
+ | [dpa_data.dpa_support_uri] | <code>string</code> | URI for DPA support. |
6631
+ | [dpa_data.application_type] | <code>string</code> | Application type, either 'WEB_BROWSER' or 'MOBILE_APP'. |
6632
+ | [co_brand_names] | <code>Array.&lt;string&gt;</code> | List of co-brand names associated with the SRC experience. |
6633
+ | [checkout_experience] | <code>string</code> | Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'. |
6634
+ | [services] | <code>string</code> | Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'. |
6635
+ | [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a transaction with DPA. |
6673
6636
  | [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
6674
- | [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array</code> | Used to indicate list of accepted billing countries for DPA. |
6675
- | [dpa_transaction_options.dpa_accepted_shipping_countries] | <code>Array</code> | Used to indicate list of accepted shipping countries for DPA. |
6676
- | [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
6677
- | [dpa_transaction_options.dpa_shipping_preference] | <code>string</code> | Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
6678
- | [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Used to check if the name of the consumer is needed. |
6679
- | [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Used to check if the email of the consumer is needed. |
6680
- | [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Used to check if the phone number of the consumer is needed. |
6681
- | [dpa_transaction_options.payment_options] | <code>object</code> | Object used to check the payment options that are included. |
6682
- | [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] | <code>number</code> | The minimum requested validity period for the transaction credentials. |
6683
- | [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'. |
6684
- | [dpa_transaction_options.payment_options.dpa_pan_requested] | <code>boolean</code> | Used to check if PAN number was requested. |
6685
- | [dpa_transaction_options.review_action] | <code>string</code> | Used for listing the enumeration of review actions. Options are 'pay' and 'continue'. |
6686
- | [dpa_transaction_options.checkout_description] | <code>string</code> | Used for indicating the description of the checkout. |
6687
- | [dpa_transaction_options.transaction_type] | <code>string</code> | Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER' |
6688
- | [dpa_transaction_options.order_type] | <code>string</code> | Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'. |
6689
- | [dpa_transaction_options.transaction_amount] | <code>object</code> | Object used to describe the details of the transaction. |
6690
- | [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Used to indicate the amount of the transaction. |
6691
- | [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Used to indicate the currency code of the transaction. 3 letter ISO code format. |
6692
- | [dpa_transaction_options.merchant_order_id] | <code>string</code> | Used to indicate the merchants order Id. |
6693
- | [dpa_transaction_options.merchant_category_code] | <code>string</code> | Used to indicate the merchants category code. |
6694
- | [dpa_transaction_options.merchant_country_code] | <code>string</code> | Used to indicate the merchants country code. 2 letter ISO code format. |
6637
+ | [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array.&lt;string&gt;</code> | List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format. |
6638
+ | [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'. |
6639
+ | [dpa_transaction_options.payment_options] | <code>Array.&lt;object&gt;</code> | Payment options included in the transaction. |
6640
+ | [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Dynamic data types. |
6641
+ | [dpa_transaction_options.order_type] | <code>string</code> | Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'. |
6642
+ | [dpa_transaction_options.three_ds_preference] | <code>string</code> | Preference for 3DS usage in the transaction. |
6643
+ | [dpa_transaction_options.confirm_payment] | <code>boolean</code> | Indicates if payment confirmation is required. |
6644
+ | [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Indicates if consumer name is requested. |
6645
+ | [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Indicates if consumer email address is requested. |
6646
+ | [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Indicates if consumer phone number is requested. |
6647
+ | [dpa_transaction_options.transaction_amount] | <code>object</code> | Details of the transaction amount. |
6648
+ | [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Amount of the transaction. |
6649
+ | [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Currency code of the transaction in 3 letter ISO code format. |
6650
+ | [dpa_transaction_options.merchant_order_id] | <code>string</code> | Merchant's order ID. |
6651
+ | [dpa_transaction_options.merchant_category_code] | <code>string</code> | Merchant's category code. |
6652
+ | [dpa_transaction_options.merchant_country_code] | <code>string</code> | Merchant's country code in ISO 3166-1 alpha-2 format. |
6695
6653
  | [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
6696
6654
  | [customer.email] | <code>string</code> | Customer email. |
6697
6655
  | [customer.first_name] | <code>string</code> | Customer first name. |
6698
6656
  | [customer.last_name] | <code>string</code> | Customer last name. |
6699
6657
  | [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
6700
- | [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
6658
+ | [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). // TODO: Confirm if it can be removed! |
6701
6659
  | [customer.phone.phone] | <code>string</code> | Customer phone number. |
6702
- | [customer.payment_source] | <code>object</code> | Object where the customer billing address data is stored. |
6703
- | [customer.payment_source.address_line1] | <code>string</code> | Customer billing address line 1. |
6704
- | [customer.payment_source.address_line2] | <code>string</code> | Customer billing address line 2. |
6705
- | [customer.payment_source.address_city] | <code>string</code> | Customer billing address city. |
6706
- | [customer.payment_source.address_postcode] | <code>string</code> | Customer billing address postcode. |
6707
- | [customer.payment_source.address_state] | <code>string</code> | Customer billing address state code (if applicable for the country, example "FL" for Florida). |
6708
- | [customer.payment_source.address_country] | <code>string</code> | Customer billing address country code (example "US"). |
6660
+ | [unaccepted_card_type] | <code>string</code> | Used to block a specific card type. Options are 'CREDIT', 'DEBIT'. |
6661
+
6662
+ <a name="EventData" id="EventData" href="#EventData">&nbsp;</a>
6709
6663
 
6710
- <a name="SRC" id="SRC" href="#SRC">&nbsp;</a>
6664
+ ## EventData : <code>object</code>
6665
+ Interface for data returned in callbacks
6711
6666
 
6712
- ## SRC
6713
- Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
6667
+ **Kind**: global interface
6668
+
6669
+ | Param | Type | Description |
6670
+ | --- | --- | --- |
6671
+ | type | [<code>EVENT\_DATA\_TYPE</code>](#EVENT_DATA_TYPE) | Event type of type [EVENT_DATA_TYPE](#EVENT_DATA_TYPE) |
6672
+ | data | <code>string</code> \| [<code>EventDataCheckoutCompletedData</code>](#EventDataCheckoutCompletedData) | optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData](#EventDataCheckoutCompletedData) for checkoutCompleted |
6673
+
6674
+ <a name="EventDataCheckoutCompletedData" id="EventDataCheckoutCompletedData" href="#EventDataCheckoutCompletedData">&nbsp;</a>
6675
+
6676
+ ## EventDataCheckoutCompletedData : <code>object</code>
6677
+ Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
6678
+ When the flow type is src, masked checkoutData available is also returned
6679
+
6680
+ **Kind**: global interface
6681
+
6682
+ | Param | Type | Description |
6683
+ | --- | --- | --- |
6684
+ | type | <code>string</code> | type of the checkout, can be `src` or `manual`. |
6685
+ | token | <code>string</code> | one time token value. |
6686
+ | [checkoutData] | <code>object</code> | Optional checkout data related to the checkout information. Only available on src flow. |
6687
+ | [checkoutData.card_number_bin] | <code>string</code> | The BIN of the card used for the transaction. |
6688
+ | [checkoutData.card_number_last4] | <code>string</code> | The last four digits of the card number. |
6689
+ | [checkoutData.card_scheme] | <code>string</code> | The card scheme. Values: visa, mastercard, amex, diners, discover. |
6690
+ | [checkoutData.card_type] | <code>string</code> | The type of card. Values: credit, debit, prepaid, combo, flex. |
6691
+ | [checkoutData.address_line1] | <code>string</code> | Address line 1 for billing address. |
6692
+ | [checkoutData.address_line2] | <code>string</code> | Address line 2 for billing address. |
6693
+ | [checkoutData.address_line3] | <code>string</code> | Address line 3 for billing address. |
6694
+ | [checkoutData.address_city] | <code>string</code> | City for billing address. |
6695
+ | [checkoutData.address_postcode] | <code>string</code> | Postal code for billing address. |
6696
+ | [checkoutData.address_state] | <code>string</code> | State or province for billing address. |
6697
+ | [checkoutData.address_country] | <code>string</code> | Country for billing address. |
6698
+ | [checkoutData.shipping] | <code>object</code> | Optional shipping information. |
6699
+ | [checkoutData.shipping.address_line1] | <code>string</code> | Address line 1 for shipping address. |
6700
+ | [checkoutData.shipping.address_line2] | <code>string</code> | Address line 2 for shipping address. |
6701
+ | [checkoutData.shipping.address_line3] | <code>string</code> | Address line 3 for shipping address. |
6702
+ | [checkoutData.shipping.address_city] | <code>string</code> | City for shipping address. |
6703
+ | [checkoutData.shipping.address_postcode] | <code>string</code> | Postal code for shipping address. |
6704
+ | [checkoutData.shipping.address_state] | <code>string</code> | State or province for shipping address. |
6705
+ | [checkoutData.shipping.address_country] | <code>string</code> | Country for shipping address. |
6706
+
6707
+ <a name="IStyles" id="IStyles" href="#IStyles">&nbsp;</a>
6708
+
6709
+ ## IStyles : <code>object</code>
6710
+ Interface for style configs inyected to the SRC checkout
6711
+
6712
+ **Kind**: global interface
6713
+
6714
+ | Param | Type | Description |
6715
+ | --- | --- | --- |
6716
+ | [primary_button_color] | <code>string</code> | Color Code for primary button. |
6717
+ | [primary_button_text_color] | <code>string</code> | Color Code for primary button text. |
6718
+ | [secondary_button_color] | <code>string</code> | Color Code for secondary button. |
6719
+ | [secondary_button_text_color] | <code>string</code> | Color Code for secondary button text. |
6720
+ | [font_family] | <code>string</code> | Font family to be used. |
6721
+ | [enable_src_popup] | <code>boolean</code> | Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe. |
6722
+
6723
+ <a name="MastercardSRCClickToPay" id="MastercardSRCClickToPay" href="#MastercardSRCClickToPay">&nbsp;</a>
6724
+
6725
+ ## MastercardSRCClickToPay ⇐ <code>SRC</code>
6726
+ Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
6714
6727
 
6715
6728
  **Kind**: global class
6729
+ **Extends**: <code>SRC</code>
6716
6730
 
6717
- * [SRC](#SRC)
6718
- * [new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)](#new_SRC_new)
6731
+ * [MastercardSRCClickToPay](#MastercardSRCClickToPay) ⇐ <code>SRC</code>
6732
+ * [new MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)](#new_MastercardSRCClickToPay_new)
6733
+ * [.load()](#MastercardSRCClickToPay+load)
6719
6734
  * [.setStyles(fields)](#SRC+setStyles)
6720
- * [.load()](#SRC+load)
6721
6735
  * [.setEnv(env, [alias])](#SRC+setEnv)
6722
6736
  * [.getEnv()](#SRC+getEnv)
6723
6737
  * [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.&lt;any&gt;</code> \| <code>void</code>
6724
- * [.hideButton([saveSize])](#SRC+hideButton)
6725
- * [.showButton()](#SRC+showButton)
6726
6738
  * [.hideCheckout([saveSize])](#SRC+hideCheckout)
6727
6739
  * [.showCheckout()](#SRC+showCheckout)
6728
6740
  * [.reload()](#SRC+reload)
6729
6741
  * [.useAutoResize()](#SRC+useAutoResize)
6730
6742
 
6731
- <a name="new_SRC_new" id="new_SRC_new" href="#new_SRC_new">&nbsp;</a>
6743
+ <a name="new_MastercardSRCClickToPay_new" id="new_MastercardSRCClickToPay_new" href="#new_MastercardSRCClickToPay_new">&nbsp;</a>
6732
6744
 
6733
- ### new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)
6745
+ ### new MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)
6734
6746
 
6735
6747
  | Param | Type | Description |
6736
6748
  | --- | --- | --- |
6737
- | button_selector | <code>string</code> | Selector of html element. Container for SRC checkout button. |
6738
6749
  | iframe_selector | <code>string</code> | Selector of html element. Container for SRC checkout iFrame. |
6739
6750
  | service_id | <code>string</code> | Card Scheme Service ID |
6740
6751
  | public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
6741
- | meta | [<code>IVisaSRCMeta</code>](#IVisaSRCMeta) | Data that configures the SRC checkout |
6752
+ | meta | [<code>IMastercardSRCMeta</code>](#IMastercardSRCMeta) | Data that configures the SRC checkout |
6742
6753
 
6743
6754
  **Example**
6744
6755
  ```js
6745
- var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
6756
+ var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
6746
6757
  ```
6758
+ <a name="MastercardSRCClickToPay+load" id="MastercardSRCClickToPay+load" href="#MastercardSRCClickToPay+load">&nbsp;</a>
6759
+
6760
+ ### mastercardSRCClickToPay.load()
6761
+ The final method after configuring the SRC to start the load process of SRC checkout
6762
+
6763
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6747
6764
  <a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles">&nbsp;</a>
6748
6765
 
6749
- ### srC.setStyles(fields)
6766
+ ### mastercardSRCClickToPay.setStyles(fields)
6750
6767
  Object contain styles for widget - call before `.load()`.
6751
6768
 
6752
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6769
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6770
+ **Overrides**: [<code>setStyles</code>](#SRC+setStyles)
6753
6771
 
6754
6772
  | Param | Type | Description |
6755
6773
  | --- | --- | --- |
6756
- | fields | <code>IStyles</code> | name of styles which can be shown in widget [STYLE](STYLE) |
6774
+ | fields | [<code>IStyles</code>](#IStyles) | name of styles which can be shown in widget [STYLE](STYLE) |
6757
6775
 
6758
6776
  **Example**
6759
6777
  ```js
6760
6778
  widget.setStyles({
6761
- button_text_color: '#32a852',
6762
- primary_color: '#32a852',
6763
- font_family: 'sans-serif',
6764
- card_schemes: ['visa']
6765
- });
6779
+ enable_src_popup: true
6780
+ primary_button_color: 'red',
6781
+ secondary_button_color: 'blue',
6782
+ primary_button_text_color: 'white',
6783
+ secondary_button_text_color: 'white',
6784
+ font_family: 'Arial',
6785
+ });
6766
6786
  ```
6767
- <a name="SRC+load" id="SRC+load" href="#SRC+load">&nbsp;</a>
6768
-
6769
- ### srC.load()
6770
- The final method after configuring the SRC to start the load process of SRC checkout
6771
-
6772
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6773
6787
  <a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv">&nbsp;</a>
6774
6788
 
6775
- ### srC.setEnv(env, [alias])
6789
+ ### mastercardSRCClickToPay.setEnv(env, [alias])
6776
6790
  Current method can change environment. By default environment = sandbox.
6777
6791
  Also we can change domain alias for this environment. By default domain_alias = paydock.com
6778
6792
 
6779
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6793
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6794
+ **Overrides**: [<code>setEnv</code>](#SRC+setEnv)
6780
6795
 
6781
6796
  | Param | Type | Description |
6782
6797
  | --- | --- | --- |
@@ -6789,25 +6804,27 @@ SRC.setEnv('production');
6789
6804
  ```
6790
6805
  <a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv">&nbsp;</a>
6791
6806
 
6792
- ### srC.getEnv()
6807
+ ### mastercardSRCClickToPay.getEnv()
6793
6808
  Method to read the current environment
6794
6809
 
6795
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6810
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6811
+ **Overrides**: [<code>getEnv</code>](#SRC+getEnv)
6796
6812
  **Example**
6797
6813
  ```js
6798
6814
  SRC.getEnv();
6799
6815
  ```
6800
6816
  <a name="SRC+on" id="SRC+on" href="#SRC+on">&nbsp;</a>
6801
6817
 
6802
- ### srC.on(eventName, [cb]) ⇒ <code>Promise.&lt;any&gt;</code> \| <code>void</code>
6818
+ ### mastercardSRCClickToPay.on(eventName, [cb]) ⇒ <code>Promise.&lt;any&gt;</code> \| <code>void</code>
6803
6819
  Listen to events of SRC
6804
6820
 
6805
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6821
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6822
+ **Overrides**: [<code>on</code>](#SRC+on)
6806
6823
 
6807
6824
  | Param | Type | Description |
6808
6825
  | --- | --- | --- |
6809
6826
  | eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
6810
- | [cb] | <code>listener</code> | |
6827
+ | [cb] | <code>listener</code> | The callback to handle the event. When available, it will send back data of type [EventData](#EventData) |
6811
6828
 
6812
6829
  **Example**
6813
6830
  ```js
@@ -6819,37 +6836,13 @@ SRC.on('checkoutCompleted').then(function (token) {
6819
6836
  console.log(token);
6820
6837
  });
6821
6838
  ```
6822
- <a name="SRC+hideButton" id="SRC+hideButton" href="#SRC+hideButton">&nbsp;</a>
6823
-
6824
- ### srC.hideButton([saveSize])
6825
- Using this method you can hide button
6826
-
6827
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6828
-
6829
- | Param | Type | Default | Description |
6830
- | --- | --- | --- | --- |
6831
- | [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
6832
-
6833
- **Example**
6834
- ```js
6835
- SRC.hideButton();
6836
- ```
6837
- <a name="SRC+showButton" id="SRC+showButton" href="#SRC+showButton">&nbsp;</a>
6838
-
6839
- ### srC.showButton()
6840
- Using this method you can show the SRC button after using hideButton method
6841
-
6842
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6843
- **Example**
6844
- ```js
6845
- SRC.showButton();
6846
- ```
6847
6839
  <a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout">&nbsp;</a>
6848
6840
 
6849
- ### srC.hideCheckout([saveSize])
6841
+ ### mastercardSRCClickToPay.hideCheckout([saveSize])
6850
6842
  Using this method you can hide checkout after load and button click
6851
6843
 
6852
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6844
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6845
+ **Overrides**: [<code>hideCheckout</code>](#SRC+hideCheckout)
6853
6846
 
6854
6847
  | Param | Type | Default | Description |
6855
6848
  | --- | --- | --- | --- |
@@ -6861,30 +6854,33 @@ SRC.hideCheckout();
6861
6854
  ```
6862
6855
  <a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout">&nbsp;</a>
6863
6856
 
6864
- ### srC.showCheckout()
6857
+ ### mastercardSRCClickToPay.showCheckout()
6865
6858
  Using this method you can show checkout after using hideCheckout method
6866
6859
 
6867
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6860
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6861
+ **Overrides**: [<code>showCheckout</code>](#SRC+showCheckout)
6868
6862
  **Example**
6869
6863
  ```js
6870
6864
  SRC.showCheckout()
6871
6865
  ```
6872
6866
  <a name="SRC+reload" id="SRC+reload" href="#SRC+reload">&nbsp;</a>
6873
6867
 
6874
- ### srC.reload()
6868
+ ### mastercardSRCClickToPay.reload()
6875
6869
  Using this method you can reload the whole checkout
6876
6870
 
6877
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6871
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6872
+ **Overrides**: [<code>reload</code>](#SRC+reload)
6878
6873
  **Example**
6879
6874
  ```js
6880
6875
  SRC.reload()
6881
6876
  ```
6882
6877
  <a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize">&nbsp;</a>
6883
6878
 
6884
- ### srC.useAutoResize()
6879
+ ### mastercardSRCClickToPay.useAutoResize()
6885
6880
  Use this method for resize checkout iFrame according to content height, if applicable
6886
6881
 
6887
- **Kind**: instance method of [<code>SRC</code>](#SRC)
6882
+ **Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
6883
+ **Overrides**: [<code>useAutoResize</code>](#SRC+useAutoResize)
6888
6884
  **Example**
6889
6885
  ```js
6890
6886
  SRC.useAutoResize();
@@ -6896,15 +6892,28 @@ List of available event's name in the SRC checkout lifecycle
6896
6892
 
6897
6893
  **Kind**: global enum
6898
6894
 
6899
- | Param | Type | Default |
6900
- | --- | --- | --- |
6901
- | CHECKOUT_BUTTON_LOADED | <code>string</code> | <code>&quot;checkoutButtonLoaded&quot;</code> |
6902
- | CHECKOUT_BUTTON_CLICKED | <code>string</code> | <code>&quot;checkoutButtonClicked&quot;</code> |
6903
- | IFRAME_LOADED | <code>string</code> | <code>&quot;iframeLoaded&quot;</code> |
6904
- | CHECKOUT_READY | <code>string</code> | <code>&quot;checkoutReady&quot;</code> |
6905
- | CHECKOUT_COMPLETED | <code>string</code> | <code>&quot;checkoutCompleted&quot;</code> |
6906
- | CHECKOUT_ERROR | <code>string</code> | <code>&quot;checkoutError&quot;</code> |
6895
+ | Param | Type | Default | Description |
6896
+ | --- | --- | --- | --- |
6897
+ | IFRAME_LOADED | <code>string</code> | <code>&quot;iframeLoaded&quot;</code> | Initial event sent when IFrame is initially loaded. |
6898
+ | CHECKOUT_READY | <code>string</code> | <code>&quot;checkoutReady&quot;</code> | Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout). |
6899
+ | CHECKOUT_POPUP_OPEN | <code>string</code> | <code>&quot;checkoutPopupOpen&quot;</code> | Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode. |
6900
+ | CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>&quot;checkoutPopupClose&quot;</code> | Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode. |
6901
+ | CHECKOUT_COMPLETED | <code>string</code> | <code>&quot;checkoutCompleted&quot;</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
6902
+ | CHECKOUT_ERROR | <code>string</code> | <code>&quot;checkoutError&quot;</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
6903
+
6904
+ <a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE">&nbsp;</a>
6905
+
6906
+ ## EVENT\_DATA\_TYPE : <code>enum</code>
6907
+ List of available event data types
6908
+
6909
+ **Kind**: global enum
6910
+
6911
+ | Param | Type | Default | Description |
6912
+ | --- | --- | --- | --- |
6913
+ | CRITICAL_ERROR | <code>string</code> | <code>&quot;CriticalError&quot;</code> | in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user |
6914
+ | USER_ERROR | <code>string</code> | <code>&quot;UserError&quot;</code> | in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow |
6915
+ | SUCCESS | <code>string</code> | <code>&quot;Success&quot;</code> | |
6907
6916
 
6908
6917
 
6909
6918
  ## License
6910
- Copyright (c) 2023 paydock
6919
+ Copyright (c) 2024 paydock