@bigcommerce/checkout-sdk 1.272.3 → 1.275.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/CHANGELOG.md +26 -0
- package/dist/checkout-button.d.ts +168 -101
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +562 -453
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/hosted-form.js.map +1 -1
- package/dist/hosted-form.umd.js.map +1 -1
- package/docs/README.md +44 -4
- package/docs/classes/CheckoutButtonInitializer.md +1 -1
- package/docs/classes/CheckoutService.md +2 -2
- package/docs/enums/AdyenV2CardFields.md +29 -0
- package/docs/enums/AdyenV3CardFields.md +29 -0
- package/docs/enums/AmazonPayV2ButtonColor.md +29 -0
- package/docs/interfaces/AdyenComponentEvents.md +2 -2
- package/docs/interfaces/AdyenComponentEvents_2.md +2 -2
- package/docs/interfaces/AdyenCreditCardComponentOptions.md +2 -2
- package/docs/interfaces/AdyenV2PaymentInitializeOptions.md +2 -2
- package/docs/interfaces/AdyenV2ValidationState.md +57 -0
- package/docs/interfaces/AdyenV3CreditCardComponentOptions.md +2 -2
- package/docs/interfaces/AdyenV3PaymentInitializeOptions.md +2 -2
- package/docs/interfaces/AdyenV3ValidationState.md +57 -0
- package/docs/interfaces/AmazonPayV2ButtonConfig.md +80 -0
- package/docs/interfaces/AmazonPayV2ButtonParams.md +45 -1
- package/docs/interfaces/AmazonPayV2CheckoutSessionConfig.md +36 -0
- package/docs/interfaces/AmazonPayV2NewButtonParams.md +125 -0
- package/docs/interfaces/ApplePayButtonInitializeOptions_2.md +38 -0
- package/docs/interfaces/{CheckoutButtonInitializeOptions.md → BaseCheckoutButtonInitializeOptions.md} +26 -26
- package/docs/interfaces/{CustomerInitializeOptions.md → BaseCustomerInitializeOptions.md} +21 -31
- package/docs/interfaces/{PaymentInitializeOptions.md → BasePaymentInitializeOptions.md} +39 -49
- package/docs/interfaces/CheckoutButtonOptions.md +1 -1
- package/docs/interfaces/CustomerRequestOptions.md +1 -1
- package/docs/interfaces/PaymentRequestOptions.md +1 -1
- package/docs/interfaces/WithApplePayButtonInitializeOptions.md +15 -0
- package/docs/interfaces/WithApplePayCustomerInitializeOptions.md +18 -0
- package/docs/interfaces/WithApplePayPaymentInitializeOptions.md +18 -0
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -147,8 +147,8 @@ declare interface AdyenComponentEvents {
|
|
|
147
147
|
* Called in case of an invalid card number, invalid expiry date, or
|
|
148
148
|
* incomplete field. Called again when errors are cleared.
|
|
149
149
|
*/
|
|
150
|
-
onError?(state:
|
|
151
|
-
onFieldValid?(state:
|
|
150
|
+
onError?(state: AdyenV2ValidationState, component: AdyenComponent): void;
|
|
151
|
+
onFieldValid?(state: AdyenV2ValidationState, component: AdyenComponent): void;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
declare interface AdyenComponentEvents_2 {
|
|
@@ -161,8 +161,8 @@ declare interface AdyenComponentEvents_2 {
|
|
|
161
161
|
* Called in case of an invalid card number, invalid expiry date, or
|
|
162
162
|
* incomplete field. Called again when errors are cleared.
|
|
163
163
|
*/
|
|
164
|
-
onError?(state:
|
|
165
|
-
onFieldValid?(state:
|
|
164
|
+
onError?(state: AdyenV3ValidationState, component: AdyenComponent_2): void;
|
|
165
|
+
onFieldValid?(state: AdyenV3ValidationState, component: AdyenComponent_2): void;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
declare type AdyenComponentState = (CardState | WechatState);
|
|
@@ -267,6 +267,12 @@ declare interface AdyenThreeDS2Options extends AdyenAdditionalActionCallbacks {
|
|
|
267
267
|
widgetSize?: string;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
declare enum AdyenV2CardFields {
|
|
271
|
+
CardNumber = "encryptedCardNumber",
|
|
272
|
+
SecurityCode = "encryptedSecurityCode",
|
|
273
|
+
ExpiryDate = "encryptedExpiryDate"
|
|
274
|
+
}
|
|
275
|
+
|
|
270
276
|
/**
|
|
271
277
|
* A set of options that are required to initialize the AdyenV2 payment method.
|
|
272
278
|
*
|
|
@@ -361,7 +367,23 @@ declare interface AdyenV2PaymentInitializeOptions {
|
|
|
361
367
|
*/
|
|
362
368
|
options?: Omit<AdyenCreditCardComponentOptions, 'onChange'> | AdyenIdealComponentOptions;
|
|
363
369
|
shouldShowNumberField?: boolean;
|
|
364
|
-
validateCardFields(
|
|
370
|
+
validateCardFields(validateState: AdyenV2ValidationState): void;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare interface AdyenV2ValidationState {
|
|
374
|
+
valid: boolean;
|
|
375
|
+
fieldType?: AdyenV2CardFields;
|
|
376
|
+
endDigits?: string;
|
|
377
|
+
encryptedFieldName?: string;
|
|
378
|
+
i18n?: string;
|
|
379
|
+
error?: string;
|
|
380
|
+
errorKey?: string;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
declare enum AdyenV3CardFields {
|
|
384
|
+
CardNumber = "encryptedCardNumber",
|
|
385
|
+
SecurityCode = "encryptedSecurityCode",
|
|
386
|
+
ExpiryDate = "encryptedExpiryDate"
|
|
365
387
|
}
|
|
366
388
|
|
|
367
389
|
declare type AdyenV3ComponentState = CardState_2 | WechatState_2;
|
|
@@ -479,7 +501,17 @@ declare interface AdyenV3PaymentInitializeOptions {
|
|
|
479
501
|
*/
|
|
480
502
|
options?: Omit<AdyenV3CreditCardComponentOptions, 'onChange'>;
|
|
481
503
|
shouldShowNumberField?: boolean;
|
|
482
|
-
validateCardFields(
|
|
504
|
+
validateCardFields(validateState: AdyenV3ValidationState): void;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
declare interface AdyenV3ValidationState {
|
|
508
|
+
valid: boolean;
|
|
509
|
+
fieldType?: AdyenV3CardFields;
|
|
510
|
+
endDigits?: string;
|
|
511
|
+
encryptedFieldName?: string;
|
|
512
|
+
i18n?: string;
|
|
513
|
+
error?: string;
|
|
514
|
+
errorKey?: string;
|
|
483
515
|
}
|
|
484
516
|
|
|
485
517
|
/**
|
|
@@ -600,20 +632,17 @@ declare interface AmazonPayShippingInitializeOptions {
|
|
|
600
632
|
onReady?(reference: AmazonPayOrderReference): void;
|
|
601
633
|
}
|
|
602
634
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
635
|
+
declare enum AmazonPayV2ButtonColor {
|
|
636
|
+
Gold = "Gold",
|
|
637
|
+
LightGray = "LightGray",
|
|
638
|
+
DarkGray = "DarkGray"
|
|
639
|
+
}
|
|
607
640
|
|
|
608
|
-
declare interface
|
|
641
|
+
declare interface AmazonPayV2ButtonConfig {
|
|
609
642
|
/**
|
|
610
643
|
* Amazon Pay merchant account identifier.
|
|
611
644
|
*/
|
|
612
645
|
merchantId: string;
|
|
613
|
-
/**
|
|
614
|
-
* Configuration for calling the endpoint to Create Checkout Session.
|
|
615
|
-
*/
|
|
616
|
-
createCheckoutSession: AmazonPayV2CheckoutSession;
|
|
617
646
|
/**
|
|
618
647
|
* Placement of the Amazon Pay button on your website.
|
|
619
648
|
*/
|
|
@@ -626,16 +655,35 @@ declare interface AmazonPayV2ButtonParams {
|
|
|
626
655
|
* Product type selected for checkout. Default is 'PayAndShip'.
|
|
627
656
|
*/
|
|
628
657
|
productType?: AmazonPayV2PayOptions;
|
|
658
|
+
/**
|
|
659
|
+
* Color of the Amazon Pay button.
|
|
660
|
+
*/
|
|
661
|
+
buttonColor?: AmazonPayV2ButtonColor;
|
|
629
662
|
/**
|
|
630
663
|
* Language used to render the button and text on Amazon Pay hosted pages.
|
|
631
664
|
*/
|
|
632
665
|
checkoutLanguage?: AmazonPayV2CheckoutLanguage;
|
|
633
666
|
/**
|
|
634
|
-
* Sets button to Sandbox environment.
|
|
667
|
+
* Sets button to Sandbox environment. You do not have to set this parameter
|
|
668
|
+
* if your `publicKeyId` has an environment prefix. Default is false.
|
|
635
669
|
*/
|
|
636
670
|
sandbox?: boolean;
|
|
637
671
|
}
|
|
638
672
|
|
|
673
|
+
/**
|
|
674
|
+
* The required config to render the AmazonPayV2 buttton.
|
|
675
|
+
*/
|
|
676
|
+
declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters;
|
|
677
|
+
|
|
678
|
+
declare type AmazonPayV2ButtonParameters = AmazonPayV2ButtonParams | AmazonPayV2NewButtonParams;
|
|
679
|
+
|
|
680
|
+
declare interface AmazonPayV2ButtonParams extends AmazonPayV2ButtonConfig {
|
|
681
|
+
/**
|
|
682
|
+
* Configuration for calling the endpoint to Create Checkout Session.
|
|
683
|
+
*/
|
|
684
|
+
createCheckoutSession: AmazonPayV2CheckoutSession;
|
|
685
|
+
}
|
|
686
|
+
|
|
639
687
|
declare enum AmazonPayV2CheckoutLanguage {
|
|
640
688
|
en_US = "en_US",
|
|
641
689
|
en_GB = "en_GB",
|
|
@@ -661,6 +709,22 @@ declare interface AmazonPayV2CheckoutSession {
|
|
|
661
709
|
extractAmazonCheckoutSessionId?: string;
|
|
662
710
|
}
|
|
663
711
|
|
|
712
|
+
declare interface AmazonPayV2CheckoutSessionConfig {
|
|
713
|
+
/**
|
|
714
|
+
* A payload that Amazon Pay will use to create a Checkout Session object.
|
|
715
|
+
*/
|
|
716
|
+
payloadJSON: string;
|
|
717
|
+
/**
|
|
718
|
+
* Payload's signature.
|
|
719
|
+
*/
|
|
720
|
+
signature: string;
|
|
721
|
+
/**
|
|
722
|
+
* Credential provided by Amazon Pay. You do not have to set this parameter
|
|
723
|
+
* if your `publicKeyId` has an environment prefix.
|
|
724
|
+
*/
|
|
725
|
+
publicKeyId?: string;
|
|
726
|
+
}
|
|
727
|
+
|
|
664
728
|
/**
|
|
665
729
|
* A set of options that are required to initialize the customer step of
|
|
666
730
|
* checkout in order to support AmazonPayV2.
|
|
@@ -683,6 +747,18 @@ declare enum AmazonPayV2LedgerCurrency {
|
|
|
683
747
|
JPY = "JPY"
|
|
684
748
|
}
|
|
685
749
|
|
|
750
|
+
declare interface AmazonPayV2NewButtonParams extends AmazonPayV2ButtonConfig {
|
|
751
|
+
/**
|
|
752
|
+
* Credential provided by Amazon Pay. You must also set the `sandbox`
|
|
753
|
+
* parameter if your `publicKeyId` does not have an environment prefix.
|
|
754
|
+
*/
|
|
755
|
+
publicKeyId?: string;
|
|
756
|
+
/**
|
|
757
|
+
* Create Checkout Session configuration.
|
|
758
|
+
*/
|
|
759
|
+
createCheckoutSessionConfig: AmazonPayV2CheckoutSessionConfig;
|
|
760
|
+
}
|
|
761
|
+
|
|
686
762
|
declare enum AmazonPayV2PayOptions {
|
|
687
763
|
/** Select this product type if you need the buyer's shipping details. */
|
|
688
764
|
PayAndShip = "PayAndShip",
|
|
@@ -773,6 +849,23 @@ declare interface ApplePayButtonInitializeOptions {
|
|
|
773
849
|
onPaymentAuthorize(): void;
|
|
774
850
|
}
|
|
775
851
|
|
|
852
|
+
/**
|
|
853
|
+
* A set of options that are required to initialize ApplePay in cart.
|
|
854
|
+
*
|
|
855
|
+
* When ApplePay is initialized, an ApplePay button will be inserted into the
|
|
856
|
+
* DOM. When a customer clicks on it, it will trigger Apple sheet.
|
|
857
|
+
*/
|
|
858
|
+
declare interface ApplePayButtonInitializeOptions_2 {
|
|
859
|
+
/**
|
|
860
|
+
* The class name of the ApplePay button style.
|
|
861
|
+
*/
|
|
862
|
+
buttonClassName?: string;
|
|
863
|
+
/**
|
|
864
|
+
* A callback that gets called when a payment is successfully completed.
|
|
865
|
+
*/
|
|
866
|
+
onPaymentAuthorize(): void;
|
|
867
|
+
}
|
|
868
|
+
|
|
776
869
|
/**
|
|
777
870
|
* A set of options that are required to initialize the customer step of
|
|
778
871
|
* checkout in order to support ApplePay.
|
|
@@ -851,6 +944,190 @@ declare interface BaseAccountInstrument extends BaseInstrument {
|
|
|
851
944
|
type: 'account' | 'bank';
|
|
852
945
|
}
|
|
853
946
|
|
|
947
|
+
declare interface BaseCheckoutButtonInitializeOptions extends CheckoutButtonOptions {
|
|
948
|
+
/**
|
|
949
|
+
* The options that are required to initialize the ApplePay payment method.
|
|
950
|
+
* They can be omitted unless you need to support ApplePay in cart.
|
|
951
|
+
*/
|
|
952
|
+
applepay?: ApplePayButtonInitializeOptions;
|
|
953
|
+
/**
|
|
954
|
+
* The options that are required to facilitate AmazonPayV2. They can be
|
|
955
|
+
* omitted unless you need to support AmazonPayV2.
|
|
956
|
+
*/
|
|
957
|
+
amazonpay?: AmazonPayV2ButtonInitializeOptions;
|
|
958
|
+
/**
|
|
959
|
+
* The options that are required to facilitate Braintree PayPal. They can be
|
|
960
|
+
* omitted unless you need to support Braintree PayPal.
|
|
961
|
+
*/
|
|
962
|
+
braintreepaypal?: BraintreePaypalButtonInitializeOptions;
|
|
963
|
+
/**
|
|
964
|
+
* The options that are required to facilitate Braintree Credit. They can be
|
|
965
|
+
* omitted unless you need to support Braintree Credit.
|
|
966
|
+
*/
|
|
967
|
+
braintreepaypalcredit?: BraintreePaypalCreditButtonInitializeOptions;
|
|
968
|
+
/**
|
|
969
|
+
* The options that are required to facilitate Braintree Venmo. They can be
|
|
970
|
+
* omitted unless you need to support Braintree Venmo.
|
|
971
|
+
*/
|
|
972
|
+
braintreevenmo?: BraintreeVenmoButtonInitializeOptions;
|
|
973
|
+
/**
|
|
974
|
+
* The ID of a container which the checkout button should be inserted.
|
|
975
|
+
*/
|
|
976
|
+
containerId: string;
|
|
977
|
+
/**
|
|
978
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
979
|
+
* They can be omitted unless you need to support adyenv2 GooglePay.
|
|
980
|
+
*/
|
|
981
|
+
googlepayadyenv2?: GooglePayButtonInitializeOptions;
|
|
982
|
+
/**
|
|
983
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
984
|
+
* They can be omitted unless you need to support adyenv2 GooglePay.
|
|
985
|
+
*/
|
|
986
|
+
googlepayadyenv3?: GooglePayButtonInitializeOptions;
|
|
987
|
+
/**
|
|
988
|
+
* The options that are required to facilitate Braintree GooglePay. They can be
|
|
989
|
+
* omitted unless you need to support Braintree GooglePay.
|
|
990
|
+
*/
|
|
991
|
+
googlepaybraintree?: GooglePayButtonInitializeOptions;
|
|
992
|
+
/**
|
|
993
|
+
* The options that are required to facilitate Checkout.com GooglePay. They can be
|
|
994
|
+
* omitted unless you need to support Checkout.com GooglePay.
|
|
995
|
+
*/
|
|
996
|
+
googlepaycheckoutcom?: GooglePayButtonInitializeOptions;
|
|
997
|
+
/**
|
|
998
|
+
* The options that are required to facilitate CybersourceV2 GooglePay. They can be
|
|
999
|
+
* omitted unless you need to support CybersourceV2 GooglePay.
|
|
1000
|
+
*/
|
|
1001
|
+
googlepaycybersourcev2?: GooglePayButtonInitializeOptions;
|
|
1002
|
+
/**
|
|
1003
|
+
* The options that are required to facilitate Orbital GooglePay. They can be
|
|
1004
|
+
* omitted unless you need to support Orbital GooglePay.
|
|
1005
|
+
*/
|
|
1006
|
+
googlepayorbital?: GooglePayButtonInitializeOptions;
|
|
1007
|
+
/**
|
|
1008
|
+
* The options that are required to facilitate Stripe GooglePay. They can be
|
|
1009
|
+
* omitted unless you need to support Stripe GooglePay.
|
|
1010
|
+
*/
|
|
1011
|
+
googlepaystripe?: GooglePayButtonInitializeOptions;
|
|
1012
|
+
/**
|
|
1013
|
+
* The options that are required to facilitate Stripe GooglePay. They can be
|
|
1014
|
+
* omitted unless you need to support Stripe GooglePay.
|
|
1015
|
+
*/
|
|
1016
|
+
googlepaystripeupe?: GooglePayButtonInitializeOptions;
|
|
1017
|
+
/**
|
|
1018
|
+
* The options that are required to facilitate Authorize.Net GooglePay.
|
|
1019
|
+
* They can be omitted unless you need to support Authorize.Net GooglePay.
|
|
1020
|
+
*/
|
|
1021
|
+
googlepayauthorizenet?: GooglePayButtonInitializeOptions;
|
|
1022
|
+
/**
|
|
1023
|
+
* The options that are required to facilitate PayPal. They can be omitted
|
|
1024
|
+
* unless you need to support Paypal.
|
|
1025
|
+
*/
|
|
1026
|
+
paypal?: PaypalButtonInitializeOptions;
|
|
1027
|
+
/**
|
|
1028
|
+
* The options that are required to facilitate PayPal Commerce. They can be omitted
|
|
1029
|
+
* unless you need to support Paypal.
|
|
1030
|
+
*/
|
|
1031
|
+
paypalCommerce?: PaypalCommerceButtonInitializeOptions;
|
|
1032
|
+
/**
|
|
1033
|
+
* The options that are required to facilitate PayPal Commerce. They can be omitted
|
|
1034
|
+
* unless you need to support PayPal Commerce Alternative Payment Methods.
|
|
1035
|
+
*/
|
|
1036
|
+
paypalcommercealternativemethods?: PaypalCommerceAlternativeMethodsButtonOptions;
|
|
1037
|
+
/**
|
|
1038
|
+
* The options that are required to facilitate PayPal Commerce Venmo. They can be omitted
|
|
1039
|
+
* unless you need to support PayPal Commerce Venmo.
|
|
1040
|
+
*/
|
|
1041
|
+
paypalcommercevenmo?: PaypalCommerceVenmoButtonInitializeOptions;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* A set of options that are required to initialize the customer step of the
|
|
1046
|
+
* current checkout flow.
|
|
1047
|
+
*
|
|
1048
|
+
* Some payment methods have specific requirements for setting the customer
|
|
1049
|
+
* details for checkout. For example, Amazon Pay requires the customer to sign in
|
|
1050
|
+
* using their sign-in button. As a result, you may need to provide additional
|
|
1051
|
+
* information in order to initialize the customer step of checkout.
|
|
1052
|
+
*/
|
|
1053
|
+
declare interface BaseCustomerInitializeOptions extends CustomerRequestOptions {
|
|
1054
|
+
/**
|
|
1055
|
+
* The options that are required to initialize the customer step of checkout
|
|
1056
|
+
* when using Amazon Pay.
|
|
1057
|
+
*/
|
|
1058
|
+
amazon?: AmazonPayCustomerInitializeOptions;
|
|
1059
|
+
/**
|
|
1060
|
+
* The options that are required to initialize the customer step of checkout
|
|
1061
|
+
* when using AmazonPayV2.
|
|
1062
|
+
*/
|
|
1063
|
+
amazonpay?: AmazonPayV2CustomerInitializeOptions;
|
|
1064
|
+
/**
|
|
1065
|
+
* The options that are required to initialize the customer step of checkout
|
|
1066
|
+
* when using Visa Checkout provided by Braintree.
|
|
1067
|
+
*/
|
|
1068
|
+
braintreevisacheckout?: BraintreeVisaCheckoutCustomerInitializeOptions;
|
|
1069
|
+
/**
|
|
1070
|
+
* The options that are required to initialize the customer step of checkout
|
|
1071
|
+
* when using Bolt.
|
|
1072
|
+
*/
|
|
1073
|
+
bolt?: BoltCustomerInitializeOptions;
|
|
1074
|
+
/**
|
|
1075
|
+
* The options that are required to initialize the Chasepay payment method.
|
|
1076
|
+
* They can be omitted unless you need to support Chasepay.
|
|
1077
|
+
*/
|
|
1078
|
+
chasepay?: ChasePayCustomerInitializeOptions;
|
|
1079
|
+
/**
|
|
1080
|
+
* The options that are required to initialize the Masterpass payment method.
|
|
1081
|
+
* They can be omitted unless you need to support Masterpass.
|
|
1082
|
+
*/
|
|
1083
|
+
masterpass?: MasterpassCustomerInitializeOptions;
|
|
1084
|
+
/**
|
|
1085
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1086
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1087
|
+
*/
|
|
1088
|
+
googlepayadyenv2?: GooglePayCustomerInitializeOptions;
|
|
1089
|
+
/**
|
|
1090
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1091
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1092
|
+
*/
|
|
1093
|
+
googlepayadyenv3?: GooglePayCustomerInitializeOptions;
|
|
1094
|
+
/**
|
|
1095
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1096
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1097
|
+
*/
|
|
1098
|
+
googlepayauthorizenet?: GooglePayCustomerInitializeOptions;
|
|
1099
|
+
/**
|
|
1100
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1101
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1102
|
+
*/
|
|
1103
|
+
googlepaybraintree?: GooglePayCustomerInitializeOptions;
|
|
1104
|
+
/**
|
|
1105
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1106
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1107
|
+
*/
|
|
1108
|
+
googlepaycheckoutcom?: GooglePayCustomerInitializeOptions;
|
|
1109
|
+
/**
|
|
1110
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1111
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1112
|
+
*/
|
|
1113
|
+
googlepaycybersourcev2?: GooglePayCustomerInitializeOptions;
|
|
1114
|
+
/**
|
|
1115
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1116
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1117
|
+
*/
|
|
1118
|
+
googlepayorbital?: GooglePayCustomerInitializeOptions;
|
|
1119
|
+
/**
|
|
1120
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1121
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1122
|
+
*/
|
|
1123
|
+
googlepaystripe?: GooglePayCustomerInitializeOptions;
|
|
1124
|
+
/**
|
|
1125
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1126
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1127
|
+
*/
|
|
1128
|
+
googlepaystripeupe?: GooglePayCustomerInitializeOptions;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
854
1131
|
declare interface BaseElementOptions {
|
|
855
1132
|
/**
|
|
856
1133
|
* Set custom class names on the container DOM element when the Digital River element is in a particular state.
|
|
@@ -871,20 +1148,190 @@ declare interface BaseElementOptions_2 {
|
|
|
871
1148
|
/**
|
|
872
1149
|
* Applies a disabled state to the Element such that user input is not accepted. Default is false.
|
|
873
1150
|
*/
|
|
874
|
-
disabled?: boolean;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
declare interface BaseIndividualElementOptions extends BaseElementOptions_2 {
|
|
878
|
-
containerId: string;
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
declare interface BaseInstrument {
|
|
882
|
-
bigpayToken: string;
|
|
883
|
-
defaultInstrument: boolean;
|
|
884
|
-
provider: string;
|
|
885
|
-
trustedShippingAddress: boolean;
|
|
886
|
-
method: string;
|
|
887
|
-
type: string;
|
|
1151
|
+
disabled?: boolean;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
declare interface BaseIndividualElementOptions extends BaseElementOptions_2 {
|
|
1155
|
+
containerId: string;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
declare interface BaseInstrument {
|
|
1159
|
+
bigpayToken: string;
|
|
1160
|
+
defaultInstrument: boolean;
|
|
1161
|
+
provider: string;
|
|
1162
|
+
trustedShippingAddress: boolean;
|
|
1163
|
+
method: string;
|
|
1164
|
+
type: string;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* A set of options that are required to initialize the payment step of the
|
|
1169
|
+
* current checkout flow.
|
|
1170
|
+
*/
|
|
1171
|
+
declare interface BasePaymentInitializeOptions extends PaymentRequestOptions {
|
|
1172
|
+
/**
|
|
1173
|
+
* @alpha
|
|
1174
|
+
* Please note that this option is currently in an early stage of
|
|
1175
|
+
* development. Therefore the API is unstable and not ready for public
|
|
1176
|
+
* consumption.
|
|
1177
|
+
*/
|
|
1178
|
+
creditCard?: CreditCardPaymentInitializeOptions;
|
|
1179
|
+
/**
|
|
1180
|
+
* The options that are required to initialize the AdyenV2 payment
|
|
1181
|
+
* method. They can be omitted unless you need to support AdyenV2.
|
|
1182
|
+
*/
|
|
1183
|
+
adyenv2?: AdyenV2PaymentInitializeOptions;
|
|
1184
|
+
/**
|
|
1185
|
+
* The options that are required to initialize the AdyenV3 payment
|
|
1186
|
+
* method. They can be omitted unless you need to support AdyenV3.
|
|
1187
|
+
*/
|
|
1188
|
+
adyenv3?: AdyenV3PaymentInitializeOptions;
|
|
1189
|
+
/**
|
|
1190
|
+
* The options that are required to initialize the Amazon Pay payment
|
|
1191
|
+
* method. They can be omitted unless you need to support AmazonPay.
|
|
1192
|
+
*/
|
|
1193
|
+
amazon?: AmazonPayPaymentInitializeOptions;
|
|
1194
|
+
/**
|
|
1195
|
+
* The options that are required to initialize the AmazonPayV2 payment
|
|
1196
|
+
* method. They can be omitted unless you need to support AmazonPayV2.
|
|
1197
|
+
*/
|
|
1198
|
+
amazonpay?: AmazonPayV2PaymentInitializeOptions;
|
|
1199
|
+
/**
|
|
1200
|
+
* The options that are required to initialize the BlueSnapV2 payment method.
|
|
1201
|
+
* They can be omitted unless you need to support BlueSnapV2.
|
|
1202
|
+
*/
|
|
1203
|
+
bluesnapv2?: BlueSnapV2PaymentInitializeOptions;
|
|
1204
|
+
/**
|
|
1205
|
+
* The options that allow Bolt to load the client script and handle the checkout.
|
|
1206
|
+
* They can be omitted if Bolt's full checkout take over is intended.
|
|
1207
|
+
*/
|
|
1208
|
+
bolt?: BoltPaymentInitializeOptions;
|
|
1209
|
+
/**
|
|
1210
|
+
* The options that are required to initialize the Braintree payment method.
|
|
1211
|
+
* They can be omitted unless you need to support Braintree.
|
|
1212
|
+
*/
|
|
1213
|
+
braintree?: BraintreePaymentInitializeOptions;
|
|
1214
|
+
/**
|
|
1215
|
+
* The options that are required to initialize the Visa Checkout payment
|
|
1216
|
+
* method provided by Braintree. They can be omitted unless you need to
|
|
1217
|
+
* support Visa Checkout.
|
|
1218
|
+
*/
|
|
1219
|
+
braintreevisacheckout?: BraintreeVisaCheckoutPaymentInitializeOptions;
|
|
1220
|
+
/**
|
|
1221
|
+
* The options that are required to initialize the Digital River payment method.
|
|
1222
|
+
* They can be omitted unless you need to support Digital River.
|
|
1223
|
+
*/
|
|
1224
|
+
digitalriver?: DigitalRiverPaymentInitializeOptions;
|
|
1225
|
+
/**
|
|
1226
|
+
* The options that are required to initialize the Klarna payment method.
|
|
1227
|
+
* They can be omitted unless you need to support Klarna.
|
|
1228
|
+
*/
|
|
1229
|
+
klarna?: KlarnaPaymentInitializeOptions;
|
|
1230
|
+
/**
|
|
1231
|
+
* The options that are required to initialize the KlarnaV2 payment method.
|
|
1232
|
+
* They can be omitted unless you need to support KlarnaV2.
|
|
1233
|
+
*/
|
|
1234
|
+
klarnav2?: KlarnaV2PaymentInitializeOptions;
|
|
1235
|
+
/**
|
|
1236
|
+
* The options that are required to initialize the Masterpass payment method.
|
|
1237
|
+
* They can be omitted unless you need to support Masterpass.
|
|
1238
|
+
*/
|
|
1239
|
+
masterpass?: MasterpassPaymentInitializeOptions;
|
|
1240
|
+
/**
|
|
1241
|
+
* The options that are required to initialize the Moneris payment method.
|
|
1242
|
+
* They can be omitted unless you need to support Moneris.
|
|
1243
|
+
*/
|
|
1244
|
+
moneris?: MonerisPaymentInitializeOptions;
|
|
1245
|
+
/**
|
|
1246
|
+
* The options that are required to initialize the Opy payment
|
|
1247
|
+
* method. They can be omitted unless you need to support Opy.
|
|
1248
|
+
*/
|
|
1249
|
+
opy?: OpyPaymentInitializeOptions;
|
|
1250
|
+
/**
|
|
1251
|
+
* The options that are required to initialize the PayPal Express payment method.
|
|
1252
|
+
* They can be omitted unless you need to support PayPal Express.
|
|
1253
|
+
*/
|
|
1254
|
+
paypalexpress?: PaypalExpressPaymentInitializeOptions;
|
|
1255
|
+
/**
|
|
1256
|
+
* The options that are required to initialize the PayPal Commerce payment method.
|
|
1257
|
+
* They can be omitted unless you need to support PayPal Commerce.
|
|
1258
|
+
*/
|
|
1259
|
+
paypalcommerce?: PaypalCommerceInitializeOptions;
|
|
1260
|
+
/**
|
|
1261
|
+
* The options that are required to initialize the Square payment method.
|
|
1262
|
+
* They can be omitted unless you need to support Square.
|
|
1263
|
+
*/
|
|
1264
|
+
square?: SquarePaymentInitializeOptions;
|
|
1265
|
+
/**
|
|
1266
|
+
* The options that are required to initialize the Chasepay payment method.
|
|
1267
|
+
* They can be omitted unless you need to support Chasepay.
|
|
1268
|
+
*/
|
|
1269
|
+
chasepay?: ChasePayInitializeOptions;
|
|
1270
|
+
/**
|
|
1271
|
+
* The options that are required to initialize the GooglePay Authorize.Net
|
|
1272
|
+
* payment method. They can be omitted unless you need to support GooglePay.
|
|
1273
|
+
*/
|
|
1274
|
+
googlepayadyenv2?: GooglePayPaymentInitializeOptions;
|
|
1275
|
+
/**
|
|
1276
|
+
* The options that are required to initialize the GooglePay Authorize.Net
|
|
1277
|
+
* payment method. They can be omitted unless you need to support GooglePay.
|
|
1278
|
+
*/
|
|
1279
|
+
googlepayadyenv3?: GooglePayPaymentInitializeOptions;
|
|
1280
|
+
/**
|
|
1281
|
+
* The options that are required to initialize the GooglePay Authorize.Net
|
|
1282
|
+
* payment method. They can be omitted unless you need to support GooglePay.
|
|
1283
|
+
*/
|
|
1284
|
+
googlepayauthorizenet?: GooglePayPaymentInitializeOptions;
|
|
1285
|
+
/**
|
|
1286
|
+
* The options that are required to initialize the GooglePay Braintree payment method.
|
|
1287
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1288
|
+
*/
|
|
1289
|
+
googlepaybraintree?: GooglePayPaymentInitializeOptions;
|
|
1290
|
+
/**
|
|
1291
|
+
* The options that are required to initialize the GooglePay Checkout.com payment method.
|
|
1292
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1293
|
+
*/
|
|
1294
|
+
googlepaycheckoutcom?: GooglePayPaymentInitializeOptions;
|
|
1295
|
+
/**
|
|
1296
|
+
* The options that are required to initialize the GooglePay CybersourceV2 payment method.
|
|
1297
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1298
|
+
*/
|
|
1299
|
+
googlepaycybersourcev2?: GooglePayPaymentInitializeOptions;
|
|
1300
|
+
/**
|
|
1301
|
+
* The options that are required to initialize the GooglePay payment method.
|
|
1302
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1303
|
+
*/
|
|
1304
|
+
googlepayorbital?: GooglePayPaymentInitializeOptions;
|
|
1305
|
+
/**
|
|
1306
|
+
* The options that are required to initialize the GooglePay Stripe payment method.
|
|
1307
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1308
|
+
*/
|
|
1309
|
+
googlepaystripe?: GooglePayPaymentInitializeOptions;
|
|
1310
|
+
/**
|
|
1311
|
+
* The options that are required to initialize the GooglePay Stripe payment method.
|
|
1312
|
+
* They can be omitted unless you need to support GooglePay.
|
|
1313
|
+
*/
|
|
1314
|
+
googlepaystripeupe?: GooglePayPaymentInitializeOptions;
|
|
1315
|
+
/**
|
|
1316
|
+
* The options that are required to initialize the Stripe payment method.
|
|
1317
|
+
* They can be omitted unless you need to support StripeV3.
|
|
1318
|
+
*/
|
|
1319
|
+
stripev3?: StripeV3PaymentInitializeOptions;
|
|
1320
|
+
/**
|
|
1321
|
+
* The options that are required to initialize the StripeUPE payment method.
|
|
1322
|
+
* They can be omitted unless you need to support StripeUPE.
|
|
1323
|
+
*/
|
|
1324
|
+
stripeupe?: StripeUPEPaymentInitializeOptions;
|
|
1325
|
+
/**
|
|
1326
|
+
* The options that are required to initialize the Mollie payment method.
|
|
1327
|
+
* They can be omitted unless you need to support Mollie.
|
|
1328
|
+
*/
|
|
1329
|
+
mollie?: MolliePaymentInitializeOptions;
|
|
1330
|
+
/**
|
|
1331
|
+
* The options that are required to initialize the Worldpay payment method.
|
|
1332
|
+
* They can be omitted unless you need to support Worldpay.
|
|
1333
|
+
*/
|
|
1334
|
+
worldpay?: WorldpayPaymentInitializeOptions;
|
|
888
1335
|
}
|
|
889
1336
|
|
|
890
1337
|
declare interface BillingAddress extends Address {
|
|
@@ -1650,102 +2097,7 @@ declare class CheckoutButtonErrorSelector {
|
|
|
1650
2097
|
getDeinitializeButtonError(methodId?: CheckoutButtonMethodType): Error | undefined;
|
|
1651
2098
|
}
|
|
1652
2099
|
|
|
1653
|
-
declare
|
|
1654
|
-
/**
|
|
1655
|
-
* The options that are required to initialize the ApplePay payment method.
|
|
1656
|
-
* They can be omitted unless you need to support ApplePay in cart.
|
|
1657
|
-
*/
|
|
1658
|
-
applepay?: ApplePayButtonInitializeOptions;
|
|
1659
|
-
/**
|
|
1660
|
-
* The options that are required to facilitate AmazonPayV2. They can be
|
|
1661
|
-
* omitted unless you need to support AmazonPayV2.
|
|
1662
|
-
*/
|
|
1663
|
-
amazonpay?: AmazonPayV2ButtonInitializeOptions;
|
|
1664
|
-
/**
|
|
1665
|
-
* The options that are required to facilitate Braintree PayPal. They can be
|
|
1666
|
-
* omitted unless you need to support Braintree PayPal.
|
|
1667
|
-
*/
|
|
1668
|
-
braintreepaypal?: BraintreePaypalButtonInitializeOptions;
|
|
1669
|
-
/**
|
|
1670
|
-
* The options that are required to facilitate Braintree Credit. They can be
|
|
1671
|
-
* omitted unless you need to support Braintree Credit.
|
|
1672
|
-
*/
|
|
1673
|
-
braintreepaypalcredit?: BraintreePaypalCreditButtonInitializeOptions;
|
|
1674
|
-
/**
|
|
1675
|
-
* The options that are required to facilitate Braintree Venmo. They can be
|
|
1676
|
-
* omitted unless you need to support Braintree Venmo.
|
|
1677
|
-
*/
|
|
1678
|
-
braintreevenmo?: BraintreeVenmoButtonInitializeOptions;
|
|
1679
|
-
/**
|
|
1680
|
-
* The ID of a container which the checkout button should be inserted.
|
|
1681
|
-
*/
|
|
1682
|
-
containerId: string;
|
|
1683
|
-
/**
|
|
1684
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
1685
|
-
* They can be omitted unless you need to support adyenv2 GooglePay.
|
|
1686
|
-
*/
|
|
1687
|
-
googlepayadyenv2?: GooglePayButtonInitializeOptions;
|
|
1688
|
-
/**
|
|
1689
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
1690
|
-
* They can be omitted unless you need to support adyenv2 GooglePay.
|
|
1691
|
-
*/
|
|
1692
|
-
googlepayadyenv3?: GooglePayButtonInitializeOptions;
|
|
1693
|
-
/**
|
|
1694
|
-
* The options that are required to facilitate Braintree GooglePay. They can be
|
|
1695
|
-
* omitted unless you need to support Braintree GooglePay.
|
|
1696
|
-
*/
|
|
1697
|
-
googlepaybraintree?: GooglePayButtonInitializeOptions;
|
|
1698
|
-
/**
|
|
1699
|
-
* The options that are required to facilitate Checkout.com GooglePay. They can be
|
|
1700
|
-
* omitted unless you need to support Checkout.com GooglePay.
|
|
1701
|
-
*/
|
|
1702
|
-
googlepaycheckoutcom?: GooglePayButtonInitializeOptions;
|
|
1703
|
-
/**
|
|
1704
|
-
* The options that are required to facilitate CybersourceV2 GooglePay. They can be
|
|
1705
|
-
* omitted unless you need to support CybersourceV2 GooglePay.
|
|
1706
|
-
*/
|
|
1707
|
-
googlepaycybersourcev2?: GooglePayButtonInitializeOptions;
|
|
1708
|
-
/**
|
|
1709
|
-
* The options that are required to facilitate Orbital GooglePay. They can be
|
|
1710
|
-
* omitted unless you need to support Orbital GooglePay.
|
|
1711
|
-
*/
|
|
1712
|
-
googlepayorbital?: GooglePayButtonInitializeOptions;
|
|
1713
|
-
/**
|
|
1714
|
-
* The options that are required to facilitate Stripe GooglePay. They can be
|
|
1715
|
-
* omitted unless you need to support Stripe GooglePay.
|
|
1716
|
-
*/
|
|
1717
|
-
googlepaystripe?: GooglePayButtonInitializeOptions;
|
|
1718
|
-
/**
|
|
1719
|
-
* The options that are required to facilitate Stripe GooglePay. They can be
|
|
1720
|
-
* omitted unless you need to support Stripe GooglePay.
|
|
1721
|
-
*/
|
|
1722
|
-
googlepaystripeupe?: GooglePayButtonInitializeOptions;
|
|
1723
|
-
/**
|
|
1724
|
-
* The options that are required to facilitate Authorize.Net GooglePay.
|
|
1725
|
-
* They can be omitted unless you need to support Authorize.Net GooglePay.
|
|
1726
|
-
*/
|
|
1727
|
-
googlepayauthorizenet?: GooglePayButtonInitializeOptions;
|
|
1728
|
-
/**
|
|
1729
|
-
* The options that are required to facilitate PayPal. They can be omitted
|
|
1730
|
-
* unless you need to support Paypal.
|
|
1731
|
-
*/
|
|
1732
|
-
paypal?: PaypalButtonInitializeOptions;
|
|
1733
|
-
/**
|
|
1734
|
-
* The options that are required to facilitate PayPal Commerce. They can be omitted
|
|
1735
|
-
* unless you need to support Paypal.
|
|
1736
|
-
*/
|
|
1737
|
-
paypalCommerce?: PaypalCommerceButtonInitializeOptions;
|
|
1738
|
-
/**
|
|
1739
|
-
* The options that are required to facilitate PayPal Commerce. They can be omitted
|
|
1740
|
-
* unless you need to support PayPal Commerce Alternative Payment Methods.
|
|
1741
|
-
*/
|
|
1742
|
-
paypalcommercealternativemethods?: PaypalCommerceAlternativeMethodsButtonOptions;
|
|
1743
|
-
/**
|
|
1744
|
-
* The options that are required to facilitate PayPal Commerce Venmo. They can be omitted
|
|
1745
|
-
* unless you need to support PayPal Commerce Venmo.
|
|
1746
|
-
*/
|
|
1747
|
-
paypalcommercevenmo?: PaypalCommerceVenmoButtonInitializeOptions;
|
|
1748
|
-
}
|
|
2100
|
+
declare type CheckoutButtonInitializeOptions = BaseCheckoutButtonInitializeOptions & WithApplePayButtonInitializeOptions;
|
|
1749
2101
|
|
|
1750
2102
|
declare class CheckoutButtonInitializer {
|
|
1751
2103
|
private _store;
|
|
@@ -4002,165 +4354,75 @@ declare class CurrencyService {
|
|
|
4002
4354
|
private _storeFormatter;
|
|
4003
4355
|
toCustomerCurrency(amount: number): string;
|
|
4004
4356
|
toStoreCurrency(amount: number): string;
|
|
4005
|
-
}
|
|
4006
|
-
|
|
4007
|
-
declare interface CustomError extends Error {
|
|
4008
|
-
message: string;
|
|
4009
|
-
type: string;
|
|
4010
|
-
subtype?: string;
|
|
4011
|
-
}
|
|
4012
|
-
|
|
4013
|
-
declare interface CustomItem {
|
|
4014
|
-
id: string;
|
|
4015
|
-
listPrice: number;
|
|
4016
|
-
extendedListPrice: number;
|
|
4017
|
-
name: string;
|
|
4018
|
-
quantity: number;
|
|
4019
|
-
sku: string;
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
declare interface Customer {
|
|
4023
|
-
id: number;
|
|
4024
|
-
addresses: CustomerAddress[];
|
|
4025
|
-
storeCredit: number;
|
|
4026
|
-
/**
|
|
4027
|
-
* The email address of the signed in customer.
|
|
4028
|
-
*/
|
|
4029
|
-
email: string;
|
|
4030
|
-
firstName: string;
|
|
4031
|
-
fullName: string;
|
|
4032
|
-
isGuest: boolean;
|
|
4033
|
-
lastName: string;
|
|
4034
|
-
/**
|
|
4035
|
-
* Indicates whether the customer should be prompted to sign-in.
|
|
4036
|
-
*
|
|
4037
|
-
* Note: You need to enable "Prompt existing accounts to sign in" in your Checkout Settings.
|
|
4038
|
-
*/
|
|
4039
|
-
shouldEncourageSignIn: boolean;
|
|
4040
|
-
customerGroup?: CustomerGroup;
|
|
4041
|
-
}
|
|
4042
|
-
|
|
4043
|
-
declare interface CustomerAccountRequestBody {
|
|
4044
|
-
firstName: string;
|
|
4045
|
-
lastName: string;
|
|
4046
|
-
email: string;
|
|
4047
|
-
password: string;
|
|
4048
|
-
acceptsMarketingEmails?: boolean;
|
|
4049
|
-
customFields?: Array<{
|
|
4050
|
-
fieldId: string;
|
|
4051
|
-
fieldValue: string | number | string[];
|
|
4052
|
-
}>;
|
|
4053
|
-
}
|
|
4054
|
-
|
|
4055
|
-
declare interface CustomerAddress extends Address {
|
|
4056
|
-
id: number;
|
|
4057
|
-
type: string;
|
|
4058
|
-
}
|
|
4059
|
-
|
|
4060
|
-
declare type CustomerAddressRequestBody = AddressRequestBody;
|
|
4061
|
-
|
|
4062
|
-
declare interface CustomerCredentials {
|
|
4063
|
-
email: string;
|
|
4064
|
-
password: string;
|
|
4065
|
-
}
|
|
4066
|
-
|
|
4067
|
-
declare interface CustomerGroup {
|
|
4068
|
-
id: number;
|
|
4069
|
-
name: string;
|
|
4070
|
-
}
|
|
4071
|
-
|
|
4072
|
-
/**
|
|
4073
|
-
* A set of options that are required to initialize the customer step of the
|
|
4074
|
-
* current checkout flow.
|
|
4075
|
-
*
|
|
4076
|
-
* Some payment methods have specific requirements for setting the customer
|
|
4077
|
-
* details for checkout. For example, Amazon Pay requires the customer to sign in
|
|
4078
|
-
* using their sign-in button. As a result, you may need to provide additional
|
|
4079
|
-
* information in order to initialize the customer step of checkout.
|
|
4080
|
-
*/
|
|
4081
|
-
declare interface CustomerInitializeOptions extends CustomerRequestOptions {
|
|
4082
|
-
/**
|
|
4083
|
-
* The options that are required to initialize the customer step of checkout
|
|
4084
|
-
* when using Amazon Pay.
|
|
4085
|
-
*/
|
|
4086
|
-
amazon?: AmazonPayCustomerInitializeOptions;
|
|
4087
|
-
/**
|
|
4088
|
-
* The options that are required to initialize the customer step of checkout
|
|
4089
|
-
* when using AmazonPayV2.
|
|
4090
|
-
*/
|
|
4091
|
-
amazonpay?: AmazonPayV2CustomerInitializeOptions;
|
|
4092
|
-
/**
|
|
4093
|
-
* The options that are required to initialize the customer step of checkout
|
|
4094
|
-
* when using ApplePay.
|
|
4095
|
-
*/
|
|
4096
|
-
applepay?: ApplePayCustomerInitializeOptions;
|
|
4097
|
-
/**
|
|
4098
|
-
* The options that are required to initialize the customer step of checkout
|
|
4099
|
-
* when using Visa Checkout provided by Braintree.
|
|
4100
|
-
*/
|
|
4101
|
-
braintreevisacheckout?: BraintreeVisaCheckoutCustomerInitializeOptions;
|
|
4102
|
-
/**
|
|
4103
|
-
* The options that are required to initialize the customer step of checkout
|
|
4104
|
-
* when using Bolt.
|
|
4105
|
-
*/
|
|
4106
|
-
bolt?: BoltCustomerInitializeOptions;
|
|
4107
|
-
/**
|
|
4108
|
-
* The options that are required to initialize the Chasepay payment method.
|
|
4109
|
-
* They can be omitted unless you need to support Chasepay.
|
|
4110
|
-
*/
|
|
4111
|
-
chasepay?: ChasePayCustomerInitializeOptions;
|
|
4112
|
-
/**
|
|
4113
|
-
* The options that are required to initialize the Masterpass payment method.
|
|
4114
|
-
* They can be omitted unless you need to support Masterpass.
|
|
4115
|
-
*/
|
|
4116
|
-
masterpass?: MasterpassCustomerInitializeOptions;
|
|
4117
|
-
/**
|
|
4118
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4119
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4120
|
-
*/
|
|
4121
|
-
googlepayadyenv2?: GooglePayCustomerInitializeOptions;
|
|
4122
|
-
/**
|
|
4123
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4124
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4125
|
-
*/
|
|
4126
|
-
googlepayadyenv3?: GooglePayCustomerInitializeOptions;
|
|
4127
|
-
/**
|
|
4128
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4129
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4130
|
-
*/
|
|
4131
|
-
googlepayauthorizenet?: GooglePayCustomerInitializeOptions;
|
|
4132
|
-
/**
|
|
4133
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4134
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4135
|
-
*/
|
|
4136
|
-
googlepaybraintree?: GooglePayCustomerInitializeOptions;
|
|
4137
|
-
/**
|
|
4138
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4139
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4140
|
-
*/
|
|
4141
|
-
googlepaycheckoutcom?: GooglePayCustomerInitializeOptions;
|
|
4142
|
-
/**
|
|
4143
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4144
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4145
|
-
*/
|
|
4146
|
-
googlepaycybersourcev2?: GooglePayCustomerInitializeOptions;
|
|
4147
|
-
/**
|
|
4148
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
4149
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4150
|
-
*/
|
|
4151
|
-
googlepayorbital?: GooglePayCustomerInitializeOptions;
|
|
4357
|
+
}
|
|
4358
|
+
|
|
4359
|
+
declare interface CustomError extends Error {
|
|
4360
|
+
message: string;
|
|
4361
|
+
type: string;
|
|
4362
|
+
subtype?: string;
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4365
|
+
declare interface CustomItem {
|
|
4366
|
+
id: string;
|
|
4367
|
+
listPrice: number;
|
|
4368
|
+
extendedListPrice: number;
|
|
4369
|
+
name: string;
|
|
4370
|
+
quantity: number;
|
|
4371
|
+
sku: string;
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4374
|
+
declare interface Customer {
|
|
4375
|
+
id: number;
|
|
4376
|
+
addresses: CustomerAddress[];
|
|
4377
|
+
storeCredit: number;
|
|
4152
4378
|
/**
|
|
4153
|
-
* The
|
|
4154
|
-
* They can be omitted unless you need to support GooglePay.
|
|
4379
|
+
* The email address of the signed in customer.
|
|
4155
4380
|
*/
|
|
4156
|
-
|
|
4381
|
+
email: string;
|
|
4382
|
+
firstName: string;
|
|
4383
|
+
fullName: string;
|
|
4384
|
+
isGuest: boolean;
|
|
4385
|
+
lastName: string;
|
|
4157
4386
|
/**
|
|
4158
|
-
*
|
|
4159
|
-
*
|
|
4387
|
+
* Indicates whether the customer should be prompted to sign-in.
|
|
4388
|
+
*
|
|
4389
|
+
* Note: You need to enable "Prompt existing accounts to sign in" in your Checkout Settings.
|
|
4160
4390
|
*/
|
|
4161
|
-
|
|
4391
|
+
shouldEncourageSignIn: boolean;
|
|
4392
|
+
customerGroup?: CustomerGroup;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
declare interface CustomerAccountRequestBody {
|
|
4396
|
+
firstName: string;
|
|
4397
|
+
lastName: string;
|
|
4398
|
+
email: string;
|
|
4399
|
+
password: string;
|
|
4400
|
+
acceptsMarketingEmails?: boolean;
|
|
4401
|
+
customFields?: Array<{
|
|
4402
|
+
fieldId: string;
|
|
4403
|
+
fieldValue: string | number | string[];
|
|
4404
|
+
}>;
|
|
4405
|
+
}
|
|
4406
|
+
|
|
4407
|
+
declare interface CustomerAddress extends Address {
|
|
4408
|
+
id: number;
|
|
4409
|
+
type: string;
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
declare type CustomerAddressRequestBody = AddressRequestBody;
|
|
4413
|
+
|
|
4414
|
+
declare interface CustomerCredentials {
|
|
4415
|
+
email: string;
|
|
4416
|
+
password: string;
|
|
4417
|
+
}
|
|
4418
|
+
|
|
4419
|
+
declare interface CustomerGroup {
|
|
4420
|
+
id: number;
|
|
4421
|
+
name: string;
|
|
4162
4422
|
}
|
|
4163
4423
|
|
|
4424
|
+
declare type CustomerInitializeOptions = BaseCustomerInitializeOptions & WithApplePayCustomerInitializeOptions;
|
|
4425
|
+
|
|
4164
4426
|
declare interface CustomerPasswordRequirements {
|
|
4165
4427
|
alpha: string;
|
|
4166
4428
|
numeric: string;
|
|
@@ -5599,180 +5861,7 @@ declare interface PayPalInstrument extends BaseAccountInstrument {
|
|
|
5599
5861
|
method: 'paypal';
|
|
5600
5862
|
}
|
|
5601
5863
|
|
|
5602
|
-
|
|
5603
|
-
* A set of options that are required to initialize the payment step of the
|
|
5604
|
-
* current checkout flow.
|
|
5605
|
-
*/
|
|
5606
|
-
declare interface PaymentInitializeOptions extends PaymentRequestOptions {
|
|
5607
|
-
/**
|
|
5608
|
-
* @alpha
|
|
5609
|
-
* Please note that this option is currently in an early stage of
|
|
5610
|
-
* development. Therefore the API is unstable and not ready for public
|
|
5611
|
-
* consumption.
|
|
5612
|
-
*/
|
|
5613
|
-
creditCard?: CreditCardPaymentInitializeOptions;
|
|
5614
|
-
/**
|
|
5615
|
-
* The options that are required to initialize the AdyenV2 payment
|
|
5616
|
-
* method. They can be omitted unless you need to support AdyenV2.
|
|
5617
|
-
*/
|
|
5618
|
-
adyenv2?: AdyenV2PaymentInitializeOptions;
|
|
5619
|
-
/**
|
|
5620
|
-
* The options that are required to initialize the AdyenV3 payment
|
|
5621
|
-
* method. They can be omitted unless you need to support AdyenV3.
|
|
5622
|
-
*/
|
|
5623
|
-
adyenv3?: AdyenV3PaymentInitializeOptions;
|
|
5624
|
-
/**
|
|
5625
|
-
* The options that are required to initialize the Amazon Pay payment
|
|
5626
|
-
* method. They can be omitted unless you need to support AmazonPay.
|
|
5627
|
-
*/
|
|
5628
|
-
amazon?: AmazonPayPaymentInitializeOptions;
|
|
5629
|
-
/**
|
|
5630
|
-
* The options that are required to initialize the Apple Pay payment
|
|
5631
|
-
* method. They can be omitted unless you need to support AmazonPay.
|
|
5632
|
-
*/
|
|
5633
|
-
applepay?: ApplePayPaymentInitializeOptions;
|
|
5634
|
-
/**
|
|
5635
|
-
* The options that are required to initialize the AmazonPayV2 payment
|
|
5636
|
-
* method. They can be omitted unless you need to support AmazonPayV2.
|
|
5637
|
-
*/
|
|
5638
|
-
amazonpay?: AmazonPayV2PaymentInitializeOptions;
|
|
5639
|
-
/**
|
|
5640
|
-
* The options that are required to initialize the BlueSnapV2 payment method.
|
|
5641
|
-
* They can be omitted unless you need to support BlueSnapV2.
|
|
5642
|
-
*/
|
|
5643
|
-
bluesnapv2?: BlueSnapV2PaymentInitializeOptions;
|
|
5644
|
-
/**
|
|
5645
|
-
* The options that allow Bolt to load the client script and handle the checkout.
|
|
5646
|
-
* They can be omitted if Bolt's full checkout take over is intended.
|
|
5647
|
-
*/
|
|
5648
|
-
bolt?: BoltPaymentInitializeOptions;
|
|
5649
|
-
/**
|
|
5650
|
-
* The options that are required to initialize the Braintree payment method.
|
|
5651
|
-
* They can be omitted unless you need to support Braintree.
|
|
5652
|
-
*/
|
|
5653
|
-
braintree?: BraintreePaymentInitializeOptions;
|
|
5654
|
-
/**
|
|
5655
|
-
* The options that are required to initialize the Visa Checkout payment
|
|
5656
|
-
* method provided by Braintree. They can be omitted unless you need to
|
|
5657
|
-
* support Visa Checkout.
|
|
5658
|
-
*/
|
|
5659
|
-
braintreevisacheckout?: BraintreeVisaCheckoutPaymentInitializeOptions;
|
|
5660
|
-
/**
|
|
5661
|
-
* The options that are required to initialize the Digital River payment method.
|
|
5662
|
-
* They can be omitted unless you need to support Digital River.
|
|
5663
|
-
*/
|
|
5664
|
-
digitalriver?: DigitalRiverPaymentInitializeOptions;
|
|
5665
|
-
/**
|
|
5666
|
-
* The options that are required to initialize the Klarna payment method.
|
|
5667
|
-
* They can be omitted unless you need to support Klarna.
|
|
5668
|
-
*/
|
|
5669
|
-
klarna?: KlarnaPaymentInitializeOptions;
|
|
5670
|
-
/**
|
|
5671
|
-
* The options that are required to initialize the KlarnaV2 payment method.
|
|
5672
|
-
* They can be omitted unless you need to support KlarnaV2.
|
|
5673
|
-
*/
|
|
5674
|
-
klarnav2?: KlarnaV2PaymentInitializeOptions;
|
|
5675
|
-
/**
|
|
5676
|
-
* The options that are required to initialize the Masterpass payment method.
|
|
5677
|
-
* They can be omitted unless you need to support Masterpass.
|
|
5678
|
-
*/
|
|
5679
|
-
masterpass?: MasterpassPaymentInitializeOptions;
|
|
5680
|
-
/**
|
|
5681
|
-
* The options that are required to initialize the Moneris payment method.
|
|
5682
|
-
* They can be omitted unless you need to support Moneris.
|
|
5683
|
-
*/
|
|
5684
|
-
moneris?: MonerisPaymentInitializeOptions;
|
|
5685
|
-
/**
|
|
5686
|
-
* The options that are required to initialize the Opy payment
|
|
5687
|
-
* method. They can be omitted unless you need to support Opy.
|
|
5688
|
-
*/
|
|
5689
|
-
opy?: OpyPaymentInitializeOptions;
|
|
5690
|
-
/**
|
|
5691
|
-
* The options that are required to initialize the PayPal Express payment method.
|
|
5692
|
-
* They can be omitted unless you need to support PayPal Express.
|
|
5693
|
-
*/
|
|
5694
|
-
paypalexpress?: PaypalExpressPaymentInitializeOptions;
|
|
5695
|
-
/**
|
|
5696
|
-
* The options that are required to initialize the PayPal Commerce payment method.
|
|
5697
|
-
* They can be omitted unless you need to support PayPal Commerce.
|
|
5698
|
-
*/
|
|
5699
|
-
paypalcommerce?: PaypalCommerceInitializeOptions;
|
|
5700
|
-
/**
|
|
5701
|
-
* The options that are required to initialize the Square payment method.
|
|
5702
|
-
* They can be omitted unless you need to support Square.
|
|
5703
|
-
*/
|
|
5704
|
-
square?: SquarePaymentInitializeOptions;
|
|
5705
|
-
/**
|
|
5706
|
-
* The options that are required to initialize the Chasepay payment method.
|
|
5707
|
-
* They can be omitted unless you need to support Chasepay.
|
|
5708
|
-
*/
|
|
5709
|
-
chasepay?: ChasePayInitializeOptions;
|
|
5710
|
-
/**
|
|
5711
|
-
* The options that are required to initialize the GooglePay Authorize.Net
|
|
5712
|
-
* payment method. They can be omitted unless you need to support GooglePay.
|
|
5713
|
-
*/
|
|
5714
|
-
googlepayadyenv2?: GooglePayPaymentInitializeOptions;
|
|
5715
|
-
/**
|
|
5716
|
-
* The options that are required to initialize the GooglePay Authorize.Net
|
|
5717
|
-
* payment method. They can be omitted unless you need to support GooglePay.
|
|
5718
|
-
*/
|
|
5719
|
-
googlepayadyenv3?: GooglePayPaymentInitializeOptions;
|
|
5720
|
-
/**
|
|
5721
|
-
* The options that are required to initialize the GooglePay Authorize.Net
|
|
5722
|
-
* payment method. They can be omitted unless you need to support GooglePay.
|
|
5723
|
-
*/
|
|
5724
|
-
googlepayauthorizenet?: GooglePayPaymentInitializeOptions;
|
|
5725
|
-
/**
|
|
5726
|
-
* The options that are required to initialize the GooglePay Braintree payment method.
|
|
5727
|
-
* They can be omitted unless you need to support GooglePay.
|
|
5728
|
-
*/
|
|
5729
|
-
googlepaybraintree?: GooglePayPaymentInitializeOptions;
|
|
5730
|
-
/**
|
|
5731
|
-
* The options that are required to initialize the GooglePay Checkout.com payment method.
|
|
5732
|
-
* They can be omitted unless you need to support GooglePay.
|
|
5733
|
-
*/
|
|
5734
|
-
googlepaycheckoutcom?: GooglePayPaymentInitializeOptions;
|
|
5735
|
-
/**
|
|
5736
|
-
* The options that are required to initialize the GooglePay CybersourceV2 payment method.
|
|
5737
|
-
* They can be omitted unless you need to support GooglePay.
|
|
5738
|
-
*/
|
|
5739
|
-
googlepaycybersourcev2?: GooglePayPaymentInitializeOptions;
|
|
5740
|
-
/**
|
|
5741
|
-
* The options that are required to initialize the GooglePay payment method.
|
|
5742
|
-
* They can be omitted unless you need to support GooglePay.
|
|
5743
|
-
*/
|
|
5744
|
-
googlepayorbital?: GooglePayPaymentInitializeOptions;
|
|
5745
|
-
/**
|
|
5746
|
-
* The options that are required to initialize the GooglePay Stripe payment method.
|
|
5747
|
-
* They can be omitted unless you need to support GooglePay.
|
|
5748
|
-
*/
|
|
5749
|
-
googlepaystripe?: GooglePayPaymentInitializeOptions;
|
|
5750
|
-
/**
|
|
5751
|
-
* The options that are required to initialize the GooglePay Stripe payment method.
|
|
5752
|
-
* They can be omitted unless you need to support GooglePay.
|
|
5753
|
-
*/
|
|
5754
|
-
googlepaystripeupe?: GooglePayPaymentInitializeOptions;
|
|
5755
|
-
/**
|
|
5756
|
-
* The options that are required to initialize the Stripe payment method.
|
|
5757
|
-
* They can be omitted unless you need to support StripeV3.
|
|
5758
|
-
*/
|
|
5759
|
-
stripev3?: StripeV3PaymentInitializeOptions;
|
|
5760
|
-
/**
|
|
5761
|
-
* The options that are required to initialize the StripeUPE payment method.
|
|
5762
|
-
* They can be omitted unless you need to support StripeUPE.
|
|
5763
|
-
*/
|
|
5764
|
-
stripeupe?: StripeUPEPaymentInitializeOptions;
|
|
5765
|
-
/**
|
|
5766
|
-
* The options that are required to initialize the Mollie payment method.
|
|
5767
|
-
* They can be omitted unless you need to support Mollie.
|
|
5768
|
-
*/
|
|
5769
|
-
mollie?: MolliePaymentInitializeOptions;
|
|
5770
|
-
/**
|
|
5771
|
-
* The options that are required to initialize the Worldpay payment method.
|
|
5772
|
-
* They can be omitted unless you need to support Worldpay.
|
|
5773
|
-
*/
|
|
5774
|
-
worldpay?: WorldpayPaymentInitializeOptions;
|
|
5775
|
-
}
|
|
5864
|
+
declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithApplePayPaymentInitializeOptions;
|
|
5776
5865
|
|
|
5777
5866
|
declare type PaymentInstrument = CardInstrument | AccountInstrument;
|
|
5778
5867
|
|
|
@@ -7089,6 +7178,26 @@ declare interface WithAccountCreation {
|
|
|
7089
7178
|
shouldCreateAccount?: boolean;
|
|
7090
7179
|
}
|
|
7091
7180
|
|
|
7181
|
+
declare interface WithApplePayButtonInitializeOptions {
|
|
7182
|
+
applepay?: ApplePayButtonInitializeOptions_2;
|
|
7183
|
+
}
|
|
7184
|
+
|
|
7185
|
+
declare interface WithApplePayCustomerInitializeOptions {
|
|
7186
|
+
/**
|
|
7187
|
+
* The options that are required to initialize the customer step of checkout
|
|
7188
|
+
* when using ApplePay.
|
|
7189
|
+
*/
|
|
7190
|
+
applepay?: ApplePayCustomerInitializeOptions;
|
|
7191
|
+
}
|
|
7192
|
+
|
|
7193
|
+
declare interface WithApplePayPaymentInitializeOptions {
|
|
7194
|
+
/**
|
|
7195
|
+
* The options that are required to initialize the Apple Pay payment
|
|
7196
|
+
* method. They can be omitted unless you need to support Apple Pay.
|
|
7197
|
+
*/
|
|
7198
|
+
applepay?: ApplePayPaymentInitializeOptions;
|
|
7199
|
+
}
|
|
7200
|
+
|
|
7092
7201
|
declare interface WithCheckoutcomFawryInstrument {
|
|
7093
7202
|
customerMobile: string;
|
|
7094
7203
|
customerEmail: string;
|