@bigcommerce/checkout-sdk 1.273.0 → 1.275.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 (32) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/checkout-button.d.ts +168 -101
  3. package/dist/checkout-button.js +1 -1
  4. package/dist/checkout-button.js.map +1 -1
  5. package/dist/checkout-button.umd.js +1 -1
  6. package/dist/checkout-button.umd.js.map +1 -1
  7. package/dist/checkout-sdk.d.ts +525 -447
  8. package/dist/checkout-sdk.js +1 -1
  9. package/dist/checkout-sdk.js.map +1 -1
  10. package/dist/checkout-sdk.umd.js +1 -1
  11. package/dist/checkout-sdk.umd.js.map +1 -1
  12. package/dist/hosted-form.js.map +1 -1
  13. package/dist/hosted-form.umd.js.map +1 -1
  14. package/docs/README.md +40 -4
  15. package/docs/classes/CheckoutButtonInitializer.md +1 -1
  16. package/docs/classes/CheckoutService.md +2 -2
  17. package/docs/enums/AmazonPayV2ButtonColor.md +29 -0
  18. package/docs/interfaces/AmazonPayV2ButtonConfig.md +80 -0
  19. package/docs/interfaces/AmazonPayV2ButtonParams.md +45 -1
  20. package/docs/interfaces/AmazonPayV2CheckoutSessionConfig.md +36 -0
  21. package/docs/interfaces/AmazonPayV2NewButtonParams.md +125 -0
  22. package/docs/interfaces/ApplePayButtonInitializeOptions_2.md +38 -0
  23. package/docs/interfaces/{CheckoutButtonInitializeOptions.md → BaseCheckoutButtonInitializeOptions.md} +26 -26
  24. package/docs/interfaces/{CustomerInitializeOptions.md → BaseCustomerInitializeOptions.md} +25 -31
  25. package/docs/interfaces/{PaymentInitializeOptions.md → BasePaymentInitializeOptions.md} +39 -49
  26. package/docs/interfaces/CheckoutButtonOptions.md +1 -1
  27. package/docs/interfaces/CustomerRequestOptions.md +1 -1
  28. package/docs/interfaces/PaymentRequestOptions.md +1 -1
  29. package/docs/interfaces/WithApplePayButtonInitializeOptions.md +15 -0
  30. package/docs/interfaces/WithApplePayCustomerInitializeOptions.md +18 -0
  31. package/docs/interfaces/WithApplePayPaymentInitializeOptions.md +18 -0
  32. package/package.json +1 -1
@@ -632,20 +632,17 @@ declare interface AmazonPayShippingInitializeOptions {
632
632
  onReady?(reference: AmazonPayOrderReference): void;
633
633
  }
634
634
 
635
- /**
636
- * The required config to render the AmazonPayV2 buttton.
637
- */
638
- declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParams;
635
+ declare enum AmazonPayV2ButtonColor {
636
+ Gold = "Gold",
637
+ LightGray = "LightGray",
638
+ DarkGray = "DarkGray"
639
+ }
639
640
 
640
- declare interface AmazonPayV2ButtonParams {
641
+ declare interface AmazonPayV2ButtonConfig {
641
642
  /**
642
643
  * Amazon Pay merchant account identifier.
643
644
  */
644
645
  merchantId: string;
645
- /**
646
- * Configuration for calling the endpoint to Create Checkout Session.
647
- */
648
- createCheckoutSession: AmazonPayV2CheckoutSession;
649
646
  /**
650
647
  * Placement of the Amazon Pay button on your website.
651
648
  */
@@ -658,16 +655,35 @@ declare interface AmazonPayV2ButtonParams {
658
655
  * Product type selected for checkout. Default is 'PayAndShip'.
659
656
  */
660
657
  productType?: AmazonPayV2PayOptions;
658
+ /**
659
+ * Color of the Amazon Pay button.
660
+ */
661
+ buttonColor?: AmazonPayV2ButtonColor;
661
662
  /**
662
663
  * Language used to render the button and text on Amazon Pay hosted pages.
663
664
  */
664
665
  checkoutLanguage?: AmazonPayV2CheckoutLanguage;
665
666
  /**
666
- * Sets button to Sandbox environment. Default is false.
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.
667
669
  */
668
670
  sandbox?: boolean;
669
671
  }
670
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
+
671
687
  declare enum AmazonPayV2CheckoutLanguage {
672
688
  en_US = "en_US",
673
689
  en_GB = "en_GB",
@@ -693,6 +709,22 @@ declare interface AmazonPayV2CheckoutSession {
693
709
  extractAmazonCheckoutSessionId?: string;
694
710
  }
695
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
+
696
728
  /**
697
729
  * A set of options that are required to initialize the customer step of
698
730
  * checkout in order to support AmazonPayV2.
@@ -715,6 +747,18 @@ declare enum AmazonPayV2LedgerCurrency {
715
747
  JPY = "JPY"
716
748
  }
717
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
+
718
762
  declare enum AmazonPayV2PayOptions {
719
763
  /** Select this product type if you need the buyer's shipping details. */
720
764
  PayAndShip = "PayAndShip",
@@ -805,6 +849,23 @@ declare interface ApplePayButtonInitializeOptions {
805
849
  onPaymentAuthorize(): void;
806
850
  }
807
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
+
808
869
  /**
809
870
  * A set of options that are required to initialize the customer step of
810
871
  * checkout in order to support ApplePay.
@@ -883,6 +944,191 @@ declare interface BaseAccountInstrument extends BaseInstrument {
883
944
  type: 'account' | 'bank';
884
945
  }
885
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
+ [key: string]: unknown;
1055
+ /**
1056
+ * The options that are required to initialize the customer step of checkout
1057
+ * when using Amazon Pay.
1058
+ */
1059
+ amazon?: AmazonPayCustomerInitializeOptions;
1060
+ /**
1061
+ * The options that are required to initialize the customer step of checkout
1062
+ * when using AmazonPayV2.
1063
+ */
1064
+ amazonpay?: AmazonPayV2CustomerInitializeOptions;
1065
+ /**
1066
+ * The options that are required to initialize the customer step of checkout
1067
+ * when using Visa Checkout provided by Braintree.
1068
+ */
1069
+ braintreevisacheckout?: BraintreeVisaCheckoutCustomerInitializeOptions;
1070
+ /**
1071
+ * The options that are required to initialize the customer step of checkout
1072
+ * when using Bolt.
1073
+ */
1074
+ bolt?: BoltCustomerInitializeOptions;
1075
+ /**
1076
+ * The options that are required to initialize the Chasepay payment method.
1077
+ * They can be omitted unless you need to support Chasepay.
1078
+ */
1079
+ chasepay?: ChasePayCustomerInitializeOptions;
1080
+ /**
1081
+ * The options that are required to initialize the Masterpass payment method.
1082
+ * They can be omitted unless you need to support Masterpass.
1083
+ */
1084
+ masterpass?: MasterpassCustomerInitializeOptions;
1085
+ /**
1086
+ * The options that are required to initialize the GooglePay payment method.
1087
+ * They can be omitted unless you need to support GooglePay.
1088
+ */
1089
+ googlepayadyenv2?: GooglePayCustomerInitializeOptions;
1090
+ /**
1091
+ * The options that are required to initialize the GooglePay payment method.
1092
+ * They can be omitted unless you need to support GooglePay.
1093
+ */
1094
+ googlepayadyenv3?: GooglePayCustomerInitializeOptions;
1095
+ /**
1096
+ * The options that are required to initialize the GooglePay payment method.
1097
+ * They can be omitted unless you need to support GooglePay.
1098
+ */
1099
+ googlepayauthorizenet?: GooglePayCustomerInitializeOptions;
1100
+ /**
1101
+ * The options that are required to initialize the GooglePay payment method.
1102
+ * They can be omitted unless you need to support GooglePay.
1103
+ */
1104
+ googlepaybraintree?: GooglePayCustomerInitializeOptions;
1105
+ /**
1106
+ * The options that are required to initialize the GooglePay payment method.
1107
+ * They can be omitted unless you need to support GooglePay.
1108
+ */
1109
+ googlepaycheckoutcom?: GooglePayCustomerInitializeOptions;
1110
+ /**
1111
+ * The options that are required to initialize the GooglePay payment method.
1112
+ * They can be omitted unless you need to support GooglePay.
1113
+ */
1114
+ googlepaycybersourcev2?: GooglePayCustomerInitializeOptions;
1115
+ /**
1116
+ * The options that are required to initialize the GooglePay payment method.
1117
+ * They can be omitted unless you need to support GooglePay.
1118
+ */
1119
+ googlepayorbital?: GooglePayCustomerInitializeOptions;
1120
+ /**
1121
+ * The options that are required to initialize the GooglePay payment method.
1122
+ * They can be omitted unless you need to support GooglePay.
1123
+ */
1124
+ googlepaystripe?: GooglePayCustomerInitializeOptions;
1125
+ /**
1126
+ * The options that are required to initialize the GooglePay payment method.
1127
+ * They can be omitted unless you need to support GooglePay.
1128
+ */
1129
+ googlepaystripeupe?: GooglePayCustomerInitializeOptions;
1130
+ }
1131
+
886
1132
  declare interface BaseElementOptions {
887
1133
  /**
888
1134
  * Set custom class names on the container DOM element when the Digital River element is in a particular state.
@@ -903,20 +1149,190 @@ declare interface BaseElementOptions_2 {
903
1149
  /**
904
1150
  * Applies a disabled state to the Element such that user input is not accepted. Default is false.
905
1151
  */
906
- disabled?: boolean;
907
- }
908
-
909
- declare interface BaseIndividualElementOptions extends BaseElementOptions_2 {
910
- containerId: string;
911
- }
912
-
913
- declare interface BaseInstrument {
914
- bigpayToken: string;
915
- defaultInstrument: boolean;
916
- provider: string;
917
- trustedShippingAddress: boolean;
918
- method: string;
919
- type: string;
1152
+ disabled?: boolean;
1153
+ }
1154
+
1155
+ declare interface BaseIndividualElementOptions extends BaseElementOptions_2 {
1156
+ containerId: string;
1157
+ }
1158
+
1159
+ declare interface BaseInstrument {
1160
+ bigpayToken: string;
1161
+ defaultInstrument: boolean;
1162
+ provider: string;
1163
+ trustedShippingAddress: boolean;
1164
+ method: string;
1165
+ type: string;
1166
+ }
1167
+
1168
+ /**
1169
+ * A set of options that are required to initialize the payment step of the
1170
+ * current checkout flow.
1171
+ */
1172
+ declare interface BasePaymentInitializeOptions extends PaymentRequestOptions {
1173
+ /**
1174
+ * @alpha
1175
+ * Please note that this option is currently in an early stage of
1176
+ * development. Therefore the API is unstable and not ready for public
1177
+ * consumption.
1178
+ */
1179
+ creditCard?: CreditCardPaymentInitializeOptions;
1180
+ /**
1181
+ * The options that are required to initialize the AdyenV2 payment
1182
+ * method. They can be omitted unless you need to support AdyenV2.
1183
+ */
1184
+ adyenv2?: AdyenV2PaymentInitializeOptions;
1185
+ /**
1186
+ * The options that are required to initialize the AdyenV3 payment
1187
+ * method. They can be omitted unless you need to support AdyenV3.
1188
+ */
1189
+ adyenv3?: AdyenV3PaymentInitializeOptions;
1190
+ /**
1191
+ * The options that are required to initialize the Amazon Pay payment
1192
+ * method. They can be omitted unless you need to support AmazonPay.
1193
+ */
1194
+ amazon?: AmazonPayPaymentInitializeOptions;
1195
+ /**
1196
+ * The options that are required to initialize the AmazonPayV2 payment
1197
+ * method. They can be omitted unless you need to support AmazonPayV2.
1198
+ */
1199
+ amazonpay?: AmazonPayV2PaymentInitializeOptions;
1200
+ /**
1201
+ * The options that are required to initialize the BlueSnapV2 payment method.
1202
+ * They can be omitted unless you need to support BlueSnapV2.
1203
+ */
1204
+ bluesnapv2?: BlueSnapV2PaymentInitializeOptions;
1205
+ /**
1206
+ * The options that allow Bolt to load the client script and handle the checkout.
1207
+ * They can be omitted if Bolt's full checkout take over is intended.
1208
+ */
1209
+ bolt?: BoltPaymentInitializeOptions;
1210
+ /**
1211
+ * The options that are required to initialize the Braintree payment method.
1212
+ * They can be omitted unless you need to support Braintree.
1213
+ */
1214
+ braintree?: BraintreePaymentInitializeOptions;
1215
+ /**
1216
+ * The options that are required to initialize the Visa Checkout payment
1217
+ * method provided by Braintree. They can be omitted unless you need to
1218
+ * support Visa Checkout.
1219
+ */
1220
+ braintreevisacheckout?: BraintreeVisaCheckoutPaymentInitializeOptions;
1221
+ /**
1222
+ * The options that are required to initialize the Digital River payment method.
1223
+ * They can be omitted unless you need to support Digital River.
1224
+ */
1225
+ digitalriver?: DigitalRiverPaymentInitializeOptions;
1226
+ /**
1227
+ * The options that are required to initialize the Klarna payment method.
1228
+ * They can be omitted unless you need to support Klarna.
1229
+ */
1230
+ klarna?: KlarnaPaymentInitializeOptions;
1231
+ /**
1232
+ * The options that are required to initialize the KlarnaV2 payment method.
1233
+ * They can be omitted unless you need to support KlarnaV2.
1234
+ */
1235
+ klarnav2?: KlarnaV2PaymentInitializeOptions;
1236
+ /**
1237
+ * The options that are required to initialize the Masterpass payment method.
1238
+ * They can be omitted unless you need to support Masterpass.
1239
+ */
1240
+ masterpass?: MasterpassPaymentInitializeOptions;
1241
+ /**
1242
+ * The options that are required to initialize the Moneris payment method.
1243
+ * They can be omitted unless you need to support Moneris.
1244
+ */
1245
+ moneris?: MonerisPaymentInitializeOptions;
1246
+ /**
1247
+ * The options that are required to initialize the Opy payment
1248
+ * method. They can be omitted unless you need to support Opy.
1249
+ */
1250
+ opy?: OpyPaymentInitializeOptions;
1251
+ /**
1252
+ * The options that are required to initialize the PayPal Express payment method.
1253
+ * They can be omitted unless you need to support PayPal Express.
1254
+ */
1255
+ paypalexpress?: PaypalExpressPaymentInitializeOptions;
1256
+ /**
1257
+ * The options that are required to initialize the PayPal Commerce payment method.
1258
+ * They can be omitted unless you need to support PayPal Commerce.
1259
+ */
1260
+ paypalcommerce?: PaypalCommerceInitializeOptions;
1261
+ /**
1262
+ * The options that are required to initialize the Square payment method.
1263
+ * They can be omitted unless you need to support Square.
1264
+ */
1265
+ square?: SquarePaymentInitializeOptions;
1266
+ /**
1267
+ * The options that are required to initialize the Chasepay payment method.
1268
+ * They can be omitted unless you need to support Chasepay.
1269
+ */
1270
+ chasepay?: ChasePayInitializeOptions;
1271
+ /**
1272
+ * The options that are required to initialize the GooglePay Authorize.Net
1273
+ * payment method. They can be omitted unless you need to support GooglePay.
1274
+ */
1275
+ googlepayadyenv2?: GooglePayPaymentInitializeOptions;
1276
+ /**
1277
+ * The options that are required to initialize the GooglePay Authorize.Net
1278
+ * payment method. They can be omitted unless you need to support GooglePay.
1279
+ */
1280
+ googlepayadyenv3?: GooglePayPaymentInitializeOptions;
1281
+ /**
1282
+ * The options that are required to initialize the GooglePay Authorize.Net
1283
+ * payment method. They can be omitted unless you need to support GooglePay.
1284
+ */
1285
+ googlepayauthorizenet?: GooglePayPaymentInitializeOptions;
1286
+ /**
1287
+ * The options that are required to initialize the GooglePay Braintree payment method.
1288
+ * They can be omitted unless you need to support GooglePay.
1289
+ */
1290
+ googlepaybraintree?: GooglePayPaymentInitializeOptions;
1291
+ /**
1292
+ * The options that are required to initialize the GooglePay Checkout.com payment method.
1293
+ * They can be omitted unless you need to support GooglePay.
1294
+ */
1295
+ googlepaycheckoutcom?: GooglePayPaymentInitializeOptions;
1296
+ /**
1297
+ * The options that are required to initialize the GooglePay CybersourceV2 payment method.
1298
+ * They can be omitted unless you need to support GooglePay.
1299
+ */
1300
+ googlepaycybersourcev2?: GooglePayPaymentInitializeOptions;
1301
+ /**
1302
+ * The options that are required to initialize the GooglePay payment method.
1303
+ * They can be omitted unless you need to support GooglePay.
1304
+ */
1305
+ googlepayorbital?: GooglePayPaymentInitializeOptions;
1306
+ /**
1307
+ * The options that are required to initialize the GooglePay Stripe payment method.
1308
+ * They can be omitted unless you need to support GooglePay.
1309
+ */
1310
+ googlepaystripe?: GooglePayPaymentInitializeOptions;
1311
+ /**
1312
+ * The options that are required to initialize the GooglePay Stripe payment method.
1313
+ * They can be omitted unless you need to support GooglePay.
1314
+ */
1315
+ googlepaystripeupe?: GooglePayPaymentInitializeOptions;
1316
+ /**
1317
+ * The options that are required to initialize the Stripe payment method.
1318
+ * They can be omitted unless you need to support StripeV3.
1319
+ */
1320
+ stripev3?: StripeV3PaymentInitializeOptions;
1321
+ /**
1322
+ * The options that are required to initialize the StripeUPE payment method.
1323
+ * They can be omitted unless you need to support StripeUPE.
1324
+ */
1325
+ stripeupe?: StripeUPEPaymentInitializeOptions;
1326
+ /**
1327
+ * The options that are required to initialize the Mollie payment method.
1328
+ * They can be omitted unless you need to support Mollie.
1329
+ */
1330
+ mollie?: MolliePaymentInitializeOptions;
1331
+ /**
1332
+ * The options that are required to initialize the Worldpay payment method.
1333
+ * They can be omitted unless you need to support Worldpay.
1334
+ */
1335
+ worldpay?: WorldpayPaymentInitializeOptions;
920
1336
  }
921
1337
 
922
1338
  declare interface BillingAddress extends Address {
@@ -1682,102 +2098,7 @@ declare class CheckoutButtonErrorSelector {
1682
2098
  getDeinitializeButtonError(methodId?: CheckoutButtonMethodType): Error | undefined;
1683
2099
  }
1684
2100
 
1685
- declare interface CheckoutButtonInitializeOptions extends CheckoutButtonOptions {
1686
- /**
1687
- * The options that are required to initialize the ApplePay payment method.
1688
- * They can be omitted unless you need to support ApplePay in cart.
1689
- */
1690
- applepay?: ApplePayButtonInitializeOptions;
1691
- /**
1692
- * The options that are required to facilitate AmazonPayV2. They can be
1693
- * omitted unless you need to support AmazonPayV2.
1694
- */
1695
- amazonpay?: AmazonPayV2ButtonInitializeOptions;
1696
- /**
1697
- * The options that are required to facilitate Braintree PayPal. They can be
1698
- * omitted unless you need to support Braintree PayPal.
1699
- */
1700
- braintreepaypal?: BraintreePaypalButtonInitializeOptions;
1701
- /**
1702
- * The options that are required to facilitate Braintree Credit. They can be
1703
- * omitted unless you need to support Braintree Credit.
1704
- */
1705
- braintreepaypalcredit?: BraintreePaypalCreditButtonInitializeOptions;
1706
- /**
1707
- * The options that are required to facilitate Braintree Venmo. They can be
1708
- * omitted unless you need to support Braintree Venmo.
1709
- */
1710
- braintreevenmo?: BraintreeVenmoButtonInitializeOptions;
1711
- /**
1712
- * The ID of a container which the checkout button should be inserted.
1713
- */
1714
- containerId: string;
1715
- /**
1716
- * The options that are required to initialize the GooglePay payment method.
1717
- * They can be omitted unless you need to support adyenv2 GooglePay.
1718
- */
1719
- googlepayadyenv2?: GooglePayButtonInitializeOptions;
1720
- /**
1721
- * The options that are required to initialize the GooglePay payment method.
1722
- * They can be omitted unless you need to support adyenv2 GooglePay.
1723
- */
1724
- googlepayadyenv3?: GooglePayButtonInitializeOptions;
1725
- /**
1726
- * The options that are required to facilitate Braintree GooglePay. They can be
1727
- * omitted unless you need to support Braintree GooglePay.
1728
- */
1729
- googlepaybraintree?: GooglePayButtonInitializeOptions;
1730
- /**
1731
- * The options that are required to facilitate Checkout.com GooglePay. They can be
1732
- * omitted unless you need to support Checkout.com GooglePay.
1733
- */
1734
- googlepaycheckoutcom?: GooglePayButtonInitializeOptions;
1735
- /**
1736
- * The options that are required to facilitate CybersourceV2 GooglePay. They can be
1737
- * omitted unless you need to support CybersourceV2 GooglePay.
1738
- */
1739
- googlepaycybersourcev2?: GooglePayButtonInitializeOptions;
1740
- /**
1741
- * The options that are required to facilitate Orbital GooglePay. They can be
1742
- * omitted unless you need to support Orbital GooglePay.
1743
- */
1744
- googlepayorbital?: GooglePayButtonInitializeOptions;
1745
- /**
1746
- * The options that are required to facilitate Stripe GooglePay. They can be
1747
- * omitted unless you need to support Stripe GooglePay.
1748
- */
1749
- googlepaystripe?: GooglePayButtonInitializeOptions;
1750
- /**
1751
- * The options that are required to facilitate Stripe GooglePay. They can be
1752
- * omitted unless you need to support Stripe GooglePay.
1753
- */
1754
- googlepaystripeupe?: GooglePayButtonInitializeOptions;
1755
- /**
1756
- * The options that are required to facilitate Authorize.Net GooglePay.
1757
- * They can be omitted unless you need to support Authorize.Net GooglePay.
1758
- */
1759
- googlepayauthorizenet?: GooglePayButtonInitializeOptions;
1760
- /**
1761
- * The options that are required to facilitate PayPal. They can be omitted
1762
- * unless you need to support Paypal.
1763
- */
1764
- paypal?: PaypalButtonInitializeOptions;
1765
- /**
1766
- * The options that are required to facilitate PayPal Commerce. They can be omitted
1767
- * unless you need to support Paypal.
1768
- */
1769
- paypalCommerce?: PaypalCommerceButtonInitializeOptions;
1770
- /**
1771
- * The options that are required to facilitate PayPal Commerce. They can be omitted
1772
- * unless you need to support PayPal Commerce Alternative Payment Methods.
1773
- */
1774
- paypalcommercealternativemethods?: PaypalCommerceAlternativeMethodsButtonOptions;
1775
- /**
1776
- * The options that are required to facilitate PayPal Commerce Venmo. They can be omitted
1777
- * unless you need to support PayPal Commerce Venmo.
1778
- */
1779
- paypalcommercevenmo?: PaypalCommerceVenmoButtonInitializeOptions;
1780
- }
2101
+ declare type CheckoutButtonInitializeOptions = BaseCheckoutButtonInitializeOptions & WithApplePayButtonInitializeOptions;
1781
2102
 
1782
2103
  declare class CheckoutButtonInitializer {
1783
2104
  private _store;
@@ -4034,165 +4355,75 @@ declare class CurrencyService {
4034
4355
  private _storeFormatter;
4035
4356
  toCustomerCurrency(amount: number): string;
4036
4357
  toStoreCurrency(amount: number): string;
4037
- }
4038
-
4039
- declare interface CustomError extends Error {
4040
- message: string;
4041
- type: string;
4042
- subtype?: string;
4043
- }
4044
-
4045
- declare interface CustomItem {
4046
- id: string;
4047
- listPrice: number;
4048
- extendedListPrice: number;
4049
- name: string;
4050
- quantity: number;
4051
- sku: string;
4052
- }
4053
-
4054
- declare interface Customer {
4055
- id: number;
4056
- addresses: CustomerAddress[];
4057
- storeCredit: number;
4058
- /**
4059
- * The email address of the signed in customer.
4060
- */
4061
- email: string;
4062
- firstName: string;
4063
- fullName: string;
4064
- isGuest: boolean;
4065
- lastName: string;
4066
- /**
4067
- * Indicates whether the customer should be prompted to sign-in.
4068
- *
4069
- * Note: You need to enable "Prompt existing accounts to sign in" in your Checkout Settings.
4070
- */
4071
- shouldEncourageSignIn: boolean;
4072
- customerGroup?: CustomerGroup;
4073
- }
4074
-
4075
- declare interface CustomerAccountRequestBody {
4076
- firstName: string;
4077
- lastName: string;
4078
- email: string;
4079
- password: string;
4080
- acceptsMarketingEmails?: boolean;
4081
- customFields?: Array<{
4082
- fieldId: string;
4083
- fieldValue: string | number | string[];
4084
- }>;
4085
- }
4086
-
4087
- declare interface CustomerAddress extends Address {
4088
- id: number;
4089
- type: string;
4090
- }
4091
-
4092
- declare type CustomerAddressRequestBody = AddressRequestBody;
4093
-
4094
- declare interface CustomerCredentials {
4095
- email: string;
4096
- password: string;
4097
- }
4098
-
4099
- declare interface CustomerGroup {
4100
- id: number;
4101
- name: string;
4102
- }
4103
-
4104
- /**
4105
- * A set of options that are required to initialize the customer step of the
4106
- * current checkout flow.
4107
- *
4108
- * Some payment methods have specific requirements for setting the customer
4109
- * details for checkout. For example, Amazon Pay requires the customer to sign in
4110
- * using their sign-in button. As a result, you may need to provide additional
4111
- * information in order to initialize the customer step of checkout.
4112
- */
4113
- declare interface CustomerInitializeOptions extends CustomerRequestOptions {
4114
- /**
4115
- * The options that are required to initialize the customer step of checkout
4116
- * when using Amazon Pay.
4117
- */
4118
- amazon?: AmazonPayCustomerInitializeOptions;
4119
- /**
4120
- * The options that are required to initialize the customer step of checkout
4121
- * when using AmazonPayV2.
4122
- */
4123
- amazonpay?: AmazonPayV2CustomerInitializeOptions;
4124
- /**
4125
- * The options that are required to initialize the customer step of checkout
4126
- * when using ApplePay.
4127
- */
4128
- applepay?: ApplePayCustomerInitializeOptions;
4129
- /**
4130
- * The options that are required to initialize the customer step of checkout
4131
- * when using Visa Checkout provided by Braintree.
4132
- */
4133
- braintreevisacheckout?: BraintreeVisaCheckoutCustomerInitializeOptions;
4134
- /**
4135
- * The options that are required to initialize the customer step of checkout
4136
- * when using Bolt.
4137
- */
4138
- bolt?: BoltCustomerInitializeOptions;
4139
- /**
4140
- * The options that are required to initialize the Chasepay payment method.
4141
- * They can be omitted unless you need to support Chasepay.
4142
- */
4143
- chasepay?: ChasePayCustomerInitializeOptions;
4144
- /**
4145
- * The options that are required to initialize the Masterpass payment method.
4146
- * They can be omitted unless you need to support Masterpass.
4147
- */
4148
- masterpass?: MasterpassCustomerInitializeOptions;
4149
- /**
4150
- * The options that are required to initialize the GooglePay payment method.
4151
- * They can be omitted unless you need to support GooglePay.
4152
- */
4153
- googlepayadyenv2?: GooglePayCustomerInitializeOptions;
4154
- /**
4155
- * The options that are required to initialize the GooglePay payment method.
4156
- * They can be omitted unless you need to support GooglePay.
4157
- */
4158
- googlepayadyenv3?: GooglePayCustomerInitializeOptions;
4159
- /**
4160
- * The options that are required to initialize the GooglePay payment method.
4161
- * They can be omitted unless you need to support GooglePay.
4162
- */
4163
- googlepayauthorizenet?: GooglePayCustomerInitializeOptions;
4164
- /**
4165
- * The options that are required to initialize the GooglePay payment method.
4166
- * They can be omitted unless you need to support GooglePay.
4167
- */
4168
- googlepaybraintree?: GooglePayCustomerInitializeOptions;
4169
- /**
4170
- * The options that are required to initialize the GooglePay payment method.
4171
- * They can be omitted unless you need to support GooglePay.
4172
- */
4173
- googlepaycheckoutcom?: GooglePayCustomerInitializeOptions;
4174
- /**
4175
- * The options that are required to initialize the GooglePay payment method.
4176
- * They can be omitted unless you need to support GooglePay.
4177
- */
4178
- googlepaycybersourcev2?: GooglePayCustomerInitializeOptions;
4179
- /**
4180
- * The options that are required to initialize the GooglePay payment method.
4181
- * They can be omitted unless you need to support GooglePay.
4182
- */
4183
- googlepayorbital?: GooglePayCustomerInitializeOptions;
4358
+ }
4359
+
4360
+ declare interface CustomError extends Error {
4361
+ message: string;
4362
+ type: string;
4363
+ subtype?: string;
4364
+ }
4365
+
4366
+ declare interface CustomItem {
4367
+ id: string;
4368
+ listPrice: number;
4369
+ extendedListPrice: number;
4370
+ name: string;
4371
+ quantity: number;
4372
+ sku: string;
4373
+ }
4374
+
4375
+ declare interface Customer {
4376
+ id: number;
4377
+ addresses: CustomerAddress[];
4378
+ storeCredit: number;
4184
4379
  /**
4185
- * The options that are required to initialize the GooglePay payment method.
4186
- * They can be omitted unless you need to support GooglePay.
4380
+ * The email address of the signed in customer.
4187
4381
  */
4188
- googlepaystripe?: GooglePayCustomerInitializeOptions;
4382
+ email: string;
4383
+ firstName: string;
4384
+ fullName: string;
4385
+ isGuest: boolean;
4386
+ lastName: string;
4189
4387
  /**
4190
- * The options that are required to initialize the GooglePay payment method.
4191
- * They can be omitted unless you need to support GooglePay.
4388
+ * Indicates whether the customer should be prompted to sign-in.
4389
+ *
4390
+ * Note: You need to enable "Prompt existing accounts to sign in" in your Checkout Settings.
4192
4391
  */
4193
- googlepaystripeupe?: GooglePayCustomerInitializeOptions;
4392
+ shouldEncourageSignIn: boolean;
4393
+ customerGroup?: CustomerGroup;
4394
+ }
4395
+
4396
+ declare interface CustomerAccountRequestBody {
4397
+ firstName: string;
4398
+ lastName: string;
4399
+ email: string;
4400
+ password: string;
4401
+ acceptsMarketingEmails?: boolean;
4402
+ customFields?: Array<{
4403
+ fieldId: string;
4404
+ fieldValue: string | number | string[];
4405
+ }>;
4406
+ }
4407
+
4408
+ declare interface CustomerAddress extends Address {
4409
+ id: number;
4410
+ type: string;
4411
+ }
4412
+
4413
+ declare type CustomerAddressRequestBody = AddressRequestBody;
4414
+
4415
+ declare interface CustomerCredentials {
4416
+ email: string;
4417
+ password: string;
4418
+ }
4419
+
4420
+ declare interface CustomerGroup {
4421
+ id: number;
4422
+ name: string;
4194
4423
  }
4195
4424
 
4425
+ declare type CustomerInitializeOptions = BaseCustomerInitializeOptions & WithApplePayCustomerInitializeOptions;
4426
+
4196
4427
  declare interface CustomerPasswordRequirements {
4197
4428
  alpha: string;
4198
4429
  numeric: string;
@@ -5631,180 +5862,7 @@ declare interface PayPalInstrument extends BaseAccountInstrument {
5631
5862
  method: 'paypal';
5632
5863
  }
5633
5864
 
5634
- /**
5635
- * A set of options that are required to initialize the payment step of the
5636
- * current checkout flow.
5637
- */
5638
- declare interface PaymentInitializeOptions extends PaymentRequestOptions {
5639
- /**
5640
- * @alpha
5641
- * Please note that this option is currently in an early stage of
5642
- * development. Therefore the API is unstable and not ready for public
5643
- * consumption.
5644
- */
5645
- creditCard?: CreditCardPaymentInitializeOptions;
5646
- /**
5647
- * The options that are required to initialize the AdyenV2 payment
5648
- * method. They can be omitted unless you need to support AdyenV2.
5649
- */
5650
- adyenv2?: AdyenV2PaymentInitializeOptions;
5651
- /**
5652
- * The options that are required to initialize the AdyenV3 payment
5653
- * method. They can be omitted unless you need to support AdyenV3.
5654
- */
5655
- adyenv3?: AdyenV3PaymentInitializeOptions;
5656
- /**
5657
- * The options that are required to initialize the Amazon Pay payment
5658
- * method. They can be omitted unless you need to support AmazonPay.
5659
- */
5660
- amazon?: AmazonPayPaymentInitializeOptions;
5661
- /**
5662
- * The options that are required to initialize the Apple Pay payment
5663
- * method. They can be omitted unless you need to support AmazonPay.
5664
- */
5665
- applepay?: ApplePayPaymentInitializeOptions;
5666
- /**
5667
- * The options that are required to initialize the AmazonPayV2 payment
5668
- * method. They can be omitted unless you need to support AmazonPayV2.
5669
- */
5670
- amazonpay?: AmazonPayV2PaymentInitializeOptions;
5671
- /**
5672
- * The options that are required to initialize the BlueSnapV2 payment method.
5673
- * They can be omitted unless you need to support BlueSnapV2.
5674
- */
5675
- bluesnapv2?: BlueSnapV2PaymentInitializeOptions;
5676
- /**
5677
- * The options that allow Bolt to load the client script and handle the checkout.
5678
- * They can be omitted if Bolt's full checkout take over is intended.
5679
- */
5680
- bolt?: BoltPaymentInitializeOptions;
5681
- /**
5682
- * The options that are required to initialize the Braintree payment method.
5683
- * They can be omitted unless you need to support Braintree.
5684
- */
5685
- braintree?: BraintreePaymentInitializeOptions;
5686
- /**
5687
- * The options that are required to initialize the Visa Checkout payment
5688
- * method provided by Braintree. They can be omitted unless you need to
5689
- * support Visa Checkout.
5690
- */
5691
- braintreevisacheckout?: BraintreeVisaCheckoutPaymentInitializeOptions;
5692
- /**
5693
- * The options that are required to initialize the Digital River payment method.
5694
- * They can be omitted unless you need to support Digital River.
5695
- */
5696
- digitalriver?: DigitalRiverPaymentInitializeOptions;
5697
- /**
5698
- * The options that are required to initialize the Klarna payment method.
5699
- * They can be omitted unless you need to support Klarna.
5700
- */
5701
- klarna?: KlarnaPaymentInitializeOptions;
5702
- /**
5703
- * The options that are required to initialize the KlarnaV2 payment method.
5704
- * They can be omitted unless you need to support KlarnaV2.
5705
- */
5706
- klarnav2?: KlarnaV2PaymentInitializeOptions;
5707
- /**
5708
- * The options that are required to initialize the Masterpass payment method.
5709
- * They can be omitted unless you need to support Masterpass.
5710
- */
5711
- masterpass?: MasterpassPaymentInitializeOptions;
5712
- /**
5713
- * The options that are required to initialize the Moneris payment method.
5714
- * They can be omitted unless you need to support Moneris.
5715
- */
5716
- moneris?: MonerisPaymentInitializeOptions;
5717
- /**
5718
- * The options that are required to initialize the Opy payment
5719
- * method. They can be omitted unless you need to support Opy.
5720
- */
5721
- opy?: OpyPaymentInitializeOptions;
5722
- /**
5723
- * The options that are required to initialize the PayPal Express payment method.
5724
- * They can be omitted unless you need to support PayPal Express.
5725
- */
5726
- paypalexpress?: PaypalExpressPaymentInitializeOptions;
5727
- /**
5728
- * The options that are required to initialize the PayPal Commerce payment method.
5729
- * They can be omitted unless you need to support PayPal Commerce.
5730
- */
5731
- paypalcommerce?: PaypalCommerceInitializeOptions;
5732
- /**
5733
- * The options that are required to initialize the Square payment method.
5734
- * They can be omitted unless you need to support Square.
5735
- */
5736
- square?: SquarePaymentInitializeOptions;
5737
- /**
5738
- * The options that are required to initialize the Chasepay payment method.
5739
- * They can be omitted unless you need to support Chasepay.
5740
- */
5741
- chasepay?: ChasePayInitializeOptions;
5742
- /**
5743
- * The options that are required to initialize the GooglePay Authorize.Net
5744
- * payment method. They can be omitted unless you need to support GooglePay.
5745
- */
5746
- googlepayadyenv2?: GooglePayPaymentInitializeOptions;
5747
- /**
5748
- * The options that are required to initialize the GooglePay Authorize.Net
5749
- * payment method. They can be omitted unless you need to support GooglePay.
5750
- */
5751
- googlepayadyenv3?: GooglePayPaymentInitializeOptions;
5752
- /**
5753
- * The options that are required to initialize the GooglePay Authorize.Net
5754
- * payment method. They can be omitted unless you need to support GooglePay.
5755
- */
5756
- googlepayauthorizenet?: GooglePayPaymentInitializeOptions;
5757
- /**
5758
- * The options that are required to initialize the GooglePay Braintree payment method.
5759
- * They can be omitted unless you need to support GooglePay.
5760
- */
5761
- googlepaybraintree?: GooglePayPaymentInitializeOptions;
5762
- /**
5763
- * The options that are required to initialize the GooglePay Checkout.com payment method.
5764
- * They can be omitted unless you need to support GooglePay.
5765
- */
5766
- googlepaycheckoutcom?: GooglePayPaymentInitializeOptions;
5767
- /**
5768
- * The options that are required to initialize the GooglePay CybersourceV2 payment method.
5769
- * They can be omitted unless you need to support GooglePay.
5770
- */
5771
- googlepaycybersourcev2?: GooglePayPaymentInitializeOptions;
5772
- /**
5773
- * The options that are required to initialize the GooglePay payment method.
5774
- * They can be omitted unless you need to support GooglePay.
5775
- */
5776
- googlepayorbital?: GooglePayPaymentInitializeOptions;
5777
- /**
5778
- * The options that are required to initialize the GooglePay Stripe payment method.
5779
- * They can be omitted unless you need to support GooglePay.
5780
- */
5781
- googlepaystripe?: GooglePayPaymentInitializeOptions;
5782
- /**
5783
- * The options that are required to initialize the GooglePay Stripe payment method.
5784
- * They can be omitted unless you need to support GooglePay.
5785
- */
5786
- googlepaystripeupe?: GooglePayPaymentInitializeOptions;
5787
- /**
5788
- * The options that are required to initialize the Stripe payment method.
5789
- * They can be omitted unless you need to support StripeV3.
5790
- */
5791
- stripev3?: StripeV3PaymentInitializeOptions;
5792
- /**
5793
- * The options that are required to initialize the StripeUPE payment method.
5794
- * They can be omitted unless you need to support StripeUPE.
5795
- */
5796
- stripeupe?: StripeUPEPaymentInitializeOptions;
5797
- /**
5798
- * The options that are required to initialize the Mollie payment method.
5799
- * They can be omitted unless you need to support Mollie.
5800
- */
5801
- mollie?: MolliePaymentInitializeOptions;
5802
- /**
5803
- * The options that are required to initialize the Worldpay payment method.
5804
- * They can be omitted unless you need to support Worldpay.
5805
- */
5806
- worldpay?: WorldpayPaymentInitializeOptions;
5807
- }
5865
+ declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithApplePayPaymentInitializeOptions;
5808
5866
 
5809
5867
  declare type PaymentInstrument = CardInstrument | AccountInstrument;
5810
5868
 
@@ -7121,6 +7179,26 @@ declare interface WithAccountCreation {
7121
7179
  shouldCreateAccount?: boolean;
7122
7180
  }
7123
7181
 
7182
+ declare interface WithApplePayButtonInitializeOptions {
7183
+ applepay?: ApplePayButtonInitializeOptions_2;
7184
+ }
7185
+
7186
+ declare interface WithApplePayCustomerInitializeOptions {
7187
+ /**
7188
+ * The options that are required to initialize the customer step of checkout
7189
+ * when using ApplePay.
7190
+ */
7191
+ applepay?: ApplePayCustomerInitializeOptions;
7192
+ }
7193
+
7194
+ declare interface WithApplePayPaymentInitializeOptions {
7195
+ /**
7196
+ * The options that are required to initialize the Apple Pay payment
7197
+ * method. They can be omitted unless you need to support Apple Pay.
7198
+ */
7199
+ applepay?: ApplePayPaymentInitializeOptions;
7200
+ }
7201
+
7124
7202
  declare interface WithCheckoutcomFawryInstrument {
7125
7203
  customerMobile: string;
7126
7204
  customerEmail: string;