@bigcommerce/checkout-sdk 1.263.0 → 1.264.2

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 (652) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/checkout-button.js +1 -1
  3. package/dist/checkout-button.js.map +1 -1
  4. package/dist/checkout-button.umd.js +1 -1
  5. package/dist/checkout-button.umd.js.map +1 -1
  6. package/dist/checkout-sdk.js +1 -1
  7. package/dist/checkout-sdk.js.map +1 -1
  8. package/dist/checkout-sdk.umd.js +1 -1
  9. package/dist/checkout-sdk.umd.js.map +1 -1
  10. package/dist/hosted-form.js.map +1 -1
  11. package/dist/hosted-form.umd.js.map +1 -1
  12. package/docs/README.md +544 -525
  13. package/docs/classes/CartChangedError.md +76 -0
  14. package/docs/classes/CheckoutButtonErrorSelector.md +52 -0
  15. package/docs/classes/CheckoutButtonInitializer.md +177 -0
  16. package/docs/classes/CheckoutButtonStatusSelector.md +52 -0
  17. package/docs/classes/CheckoutService.md +1645 -0
  18. package/docs/classes/CurrencyService.md +54 -0
  19. package/docs/classes/EmbeddedCheckout.md +40 -0
  20. package/docs/classes/LanguageService.md +101 -0
  21. package/docs/classes/RequestError.md +106 -0
  22. package/docs/classes/StandardError.md +71 -0
  23. package/docs/enums/AmazonPayV2CheckoutLanguage.md +57 -0
  24. package/docs/enums/AmazonPayV2LedgerCurrency.md +36 -0
  25. package/docs/enums/AmazonPayV2PayOptions.md +26 -0
  26. package/docs/enums/AmazonPayV2Placement.md +53 -0
  27. package/docs/enums/BraintreeFormFieldType.md +50 -0
  28. package/docs/enums/ButtonColor.md +29 -0
  29. package/docs/enums/ButtonType.md +22 -0
  30. package/docs/enums/CheckoutButtonMethodType.md +134 -0
  31. package/docs/enums/CheckoutIncludes.md +29 -0
  32. package/docs/enums/EmbeddedCheckoutEventType.md +50 -0
  33. package/docs/enums/HostedFieldType.md +50 -0
  34. package/docs/enums/HostedInputEventType.md +85 -0
  35. package/docs/enums/IconStyle.md +22 -0
  36. package/docs/enums/PaypalButtonStyleColorOption.md +36 -0
  37. package/docs/enums/PaypalButtonStyleLabelOption.md +43 -0
  38. package/docs/enums/PaypalButtonStyleLayoutOption.md +22 -0
  39. package/docs/enums/PaypalButtonStyleShapeOption.md +22 -0
  40. package/docs/enums/PaypalButtonStyleSizeOption.md +36 -0
  41. package/docs/enums/PaypalCommerceFormFieldType.md +50 -0
  42. package/docs/enums/RadiusUnit.md +22 -0
  43. package/docs/enums/StyleButtonColor.md +43 -0
  44. package/docs/enums/StyleButtonLabel.md +43 -0
  45. package/docs/enums/StyleButtonLayout.md +22 -0
  46. package/docs/enums/StyleButtonShape.md +22 -0
  47. package/docs/interfaces/Address.md +164 -0
  48. package/docs/interfaces/AddressRequestBody.md +100 -0
  49. package/docs/interfaces/AdyenAdditionalActionCallbacks.md +68 -0
  50. package/docs/interfaces/AdyenAdditionalActionCallbacks_2.md +66 -0
  51. package/docs/interfaces/AdyenAdditionalActionOptions.md +106 -0
  52. package/docs/interfaces/AdyenAdditionalActionOptions_2.md +106 -0
  53. package/docs/interfaces/AdyenBaseCardComponentOptions.md +33 -0
  54. package/docs/interfaces/AdyenBaseCardComponentOptions_2.md +33 -0
  55. package/docs/interfaces/AdyenComponent.md +72 -0
  56. package/docs/interfaces/AdyenComponentEvents.md +74 -0
  57. package/docs/interfaces/AdyenComponentEvents_2.md +74 -0
  58. package/docs/interfaces/AdyenComponent_2.md +72 -0
  59. package/docs/interfaces/AdyenCreditCardComponentOptions.md +185 -0
  60. package/docs/interfaces/AdyenIdealComponentOptions.md +17 -0
  61. package/docs/interfaces/AdyenPaymentMethodState.md +21 -0
  62. package/docs/interfaces/AdyenPaymentMethodState_2.md +15 -0
  63. package/docs/interfaces/AdyenPlaceholderData.md +33 -0
  64. package/docs/interfaces/AdyenPlaceholderData_2.md +33 -0
  65. package/docs/interfaces/AdyenThreeDS2Options.md +97 -0
  66. package/docs/interfaces/{adyenv2paymentinitializeoptions.md → AdyenV2PaymentInitializeOptions.md} +37 -39
  67. package/docs/interfaces/AdyenV3CreditCardComponentOptions.md +185 -0
  68. package/docs/interfaces/{adyenv3paymentinitializeoptions.md → AdyenV3PaymentInitializeOptions.md} +30 -32
  69. package/docs/interfaces/AmazonPayCustomerInitializeOptions.md +65 -0
  70. package/docs/interfaces/AmazonPayOrderReference.md +30 -0
  71. package/docs/interfaces/AmazonPayPaymentInitializeOptions.md +100 -0
  72. package/docs/interfaces/AmazonPayShippingInitializeOptions.md +85 -0
  73. package/docs/interfaces/AmazonPayV2ButtonParams.md +71 -0
  74. package/docs/interfaces/AmazonPayV2CheckoutSession.md +35 -0
  75. package/docs/interfaces/{amazonpayv2customerinitializeoptions.md → AmazonPayV2CustomerInitializeOptions.md} +5 -9
  76. package/docs/interfaces/{amazonpayv2paymentinitializeoptions.md → AmazonPayV2PaymentInitializeOptions.md} +5 -9
  77. package/docs/interfaces/{amazonpayv2shippinginitializeoptions.md → AmazonPayV2ShippingInitializeOptions.md} +5 -9
  78. package/docs/interfaces/AmazonPayWidgetError.md +25 -0
  79. package/docs/interfaces/ApplePayButtonInitializeOptions.md +38 -0
  80. package/docs/interfaces/ApplePayCustomerInitializeOptions.md +77 -0
  81. package/docs/interfaces/ApplePayPaymentInitializeOptions.md +40 -0
  82. package/docs/interfaces/BankInstrument.md +112 -0
  83. package/docs/interfaces/Banner.md +22 -0
  84. package/docs/interfaces/BaseAccountInstrument.md +91 -0
  85. package/docs/interfaces/BaseElementOptions.md +17 -0
  86. package/docs/interfaces/BaseElementOptions_2.md +48 -0
  87. package/docs/interfaces/BaseIndividualElementOptions.md +67 -0
  88. package/docs/interfaces/BaseInstrument.md +58 -0
  89. package/docs/interfaces/BillingAddress.md +182 -0
  90. package/docs/interfaces/BillingAddressRequestBody.md +153 -0
  91. package/docs/interfaces/BlockElementStyles.md +105 -0
  92. package/docs/interfaces/{bluesnapv2paymentinitializeoptions.md → BlueSnapV2PaymentInitializeOptions.md} +15 -24
  93. package/docs/interfaces/BlueSnapV2StyleProps.md +29 -0
  94. package/docs/interfaces/BodyStyles.md +15 -0
  95. package/docs/interfaces/BoltCustomerInitializeOptions.md +30 -0
  96. package/docs/interfaces/{boltpaymentinitializeoptions.md → BoltPaymentInitializeOptions.md} +18 -20
  97. package/docs/interfaces/BraintreeError.md +35 -0
  98. package/docs/interfaces/BraintreeFormFieldCardTypeChangeEventData.md +15 -0
  99. package/docs/interfaces/BraintreeFormFieldKeyboardEventData.md +15 -0
  100. package/docs/interfaces/BraintreeFormFieldOptions.md +35 -0
  101. package/docs/interfaces/BraintreeFormFieldStylesMap.md +29 -0
  102. package/docs/interfaces/BraintreeFormFieldValidateErrorData.md +29 -0
  103. package/docs/interfaces/BraintreeFormFieldValidateEventData.md +33 -0
  104. package/docs/interfaces/BraintreeFormFieldsMap.md +36 -0
  105. package/docs/interfaces/BraintreeFormOptions.md +110 -0
  106. package/docs/interfaces/{braintreepaymentinitializeoptions.md → BraintreePaymentInitializeOptions.md} +9 -13
  107. package/docs/interfaces/BraintreePaypalButtonInitializeOptions.md +96 -0
  108. package/docs/interfaces/BraintreePaypalCreditButtonInitializeOptions.md +87 -0
  109. package/docs/interfaces/BraintreeStoredCardFieldOptions.md +54 -0
  110. package/docs/interfaces/BraintreeStoredCardFieldsMap.md +22 -0
  111. package/docs/interfaces/BraintreeThreeDSecureOptions.md +51 -0
  112. package/docs/interfaces/BraintreeVenmoButtonInitializeOptions.md +27 -0
  113. package/docs/interfaces/BraintreeVerifyPayload.md +51 -0
  114. package/docs/interfaces/BraintreeVisaCheckoutCustomerInitializeOptions.md +35 -0
  115. package/docs/interfaces/{braintreevisacheckoutpaymentinitializeoptions.md → BraintreeVisaCheckoutPaymentInitializeOptions.md} +18 -18
  116. package/docs/interfaces/BrowserInfo.md +50 -0
  117. package/docs/interfaces/{buttonresponse.md → ButtonResponse.md} +5 -9
  118. package/docs/interfaces/ButtonStyles.md +141 -0
  119. package/docs/interfaces/CardCvcElementOptions.md +72 -0
  120. package/docs/interfaces/CardDataPaymentMethodState.md +15 -0
  121. package/docs/interfaces/CardDataPaymentMethodState_2.md +15 -0
  122. package/docs/interfaces/CardElementOptions.md +91 -0
  123. package/docs/interfaces/CardExpiryElementOptions.md +72 -0
  124. package/docs/interfaces/CardInstrument.md +115 -0
  125. package/docs/interfaces/CardNumberElementOptions.md +88 -0
  126. package/docs/interfaces/CardPaymentMethodState.md +60 -0
  127. package/docs/interfaces/CardPaymentMethodState_2.md +43 -0
  128. package/docs/interfaces/CardState.md +40 -0
  129. package/docs/interfaces/CardStateErrors.md +7 -0
  130. package/docs/interfaces/CardStateErrors_2.md +7 -0
  131. package/docs/interfaces/CardState_2.md +40 -0
  132. package/docs/interfaces/Cart.md +99 -0
  133. package/docs/interfaces/ChasePayCustomerInitializeOptions.md +15 -0
  134. package/docs/interfaces/{chasepayinitializeoptions.md → ChasePayInitializeOptions.md} +20 -20
  135. package/docs/interfaces/CheckableInputStyles.md +175 -0
  136. package/docs/interfaces/ChecklistStyles.md +127 -0
  137. package/docs/interfaces/Checkout.md +195 -0
  138. package/docs/interfaces/CheckoutButtonInitializeOptions.md +234 -0
  139. package/docs/interfaces/CheckoutButtonInitializerOptions.md +22 -0
  140. package/docs/interfaces/CheckoutButtonOptions.md +55 -0
  141. package/docs/interfaces/CheckoutButtonSelectors.md +22 -0
  142. package/docs/interfaces/CheckoutParams.md +15 -0
  143. package/docs/interfaces/CheckoutPayment.md +42 -0
  144. package/docs/interfaces/CheckoutRequestBody.md +15 -0
  145. package/docs/interfaces/CheckoutSelectors.md +29 -0
  146. package/docs/interfaces/CheckoutServiceOptions.md +36 -0
  147. package/docs/interfaces/CheckoutSettings.md +201 -0
  148. package/docs/interfaces/CheckoutStoreErrorSelector.md +636 -0
  149. package/docs/interfaces/CheckoutStoreSelector.md +501 -0
  150. package/docs/interfaces/CheckoutStoreStatusSelector.md +758 -0
  151. package/docs/interfaces/Consignment.md +71 -0
  152. package/docs/interfaces/ConsignmentAssignmentBaseRequestBodyWithAddress.md +29 -0
  153. package/docs/interfaces/ConsignmentAssignmentBaseRequestBodyWithShippingAddress.md +29 -0
  154. package/docs/interfaces/ConsignmentCreateRequestBody.md +36 -0
  155. package/docs/interfaces/ConsignmentLineItem.md +22 -0
  156. package/docs/interfaces/ConsignmentPickupOption.md +15 -0
  157. package/docs/interfaces/ConsignmentUpdateRequestBody.md +43 -0
  158. package/docs/interfaces/Coordinates.md +22 -0
  159. package/docs/interfaces/Country.md +43 -0
  160. package/docs/interfaces/Coupon.md +43 -0
  161. package/docs/interfaces/CreditCardInstrument.md +85 -0
  162. package/docs/interfaces/{creditcardpaymentinitializeoptions.md → CreditCardPaymentInitializeOptions.md} +5 -9
  163. package/docs/interfaces/CreditCardPlaceHolder.md +29 -0
  164. package/docs/interfaces/CreditCardPlaceHolder_2.md +29 -0
  165. package/docs/interfaces/CssProperties.md +211 -0
  166. package/docs/interfaces/CssProperties_2.md +211 -0
  167. package/docs/interfaces/Currency.md +36 -0
  168. package/docs/interfaces/CustomError.md +43 -0
  169. package/docs/interfaces/CustomItem.md +50 -0
  170. package/docs/interfaces/Customer.md +84 -0
  171. package/docs/interfaces/CustomerAccountRequestBody.md +50 -0
  172. package/docs/interfaces/CustomerAddress.md +182 -0
  173. package/docs/interfaces/CustomerCredentials.md +22 -0
  174. package/docs/interfaces/CustomerGroup.md +22 -0
  175. package/docs/interfaces/CustomerInitializeOptions.md +221 -0
  176. package/docs/interfaces/CustomerPasswordRequirements.md +36 -0
  177. package/docs/interfaces/CustomerRequestOptions.md +60 -0
  178. package/docs/interfaces/DigitalItem.md +310 -0
  179. package/docs/interfaces/{digitalriverelementclasses.md → DigitalRiverElementClasses.md} +20 -24
  180. package/docs/interfaces/{digitalriverpaymentinitializeoptions.md → DigitalRiverPaymentInitializeOptions.md} +30 -28
  181. package/docs/interfaces/Discount.md +22 -0
  182. package/docs/interfaces/EmbeddedCheckoutCompleteEvent.md +15 -0
  183. package/docs/interfaces/EmbeddedCheckoutError.md +29 -0
  184. package/docs/interfaces/EmbeddedCheckoutErrorEvent.md +22 -0
  185. package/docs/interfaces/EmbeddedCheckoutFrameErrorEvent.md +22 -0
  186. package/docs/interfaces/EmbeddedCheckoutFrameLoadedEvent.md +22 -0
  187. package/docs/interfaces/EmbeddedCheckoutLoadedEvent.md +15 -0
  188. package/docs/interfaces/EmbeddedCheckoutMessenger.md +109 -0
  189. package/docs/interfaces/EmbeddedCheckoutMessengerOptions.md +22 -0
  190. package/docs/interfaces/EmbeddedCheckoutOptions.md +134 -0
  191. package/docs/interfaces/EmbeddedCheckoutSignedOutEvent.md +15 -0
  192. package/docs/interfaces/EmbeddedCheckoutStyles.md +141 -0
  193. package/docs/interfaces/EmbeddedContentOptions.md +15 -0
  194. package/docs/interfaces/ExecutePaymentMethodCheckoutOptions.md +76 -0
  195. package/docs/interfaces/FlashMessage.md +29 -0
  196. package/docs/interfaces/FormField.md +113 -0
  197. package/docs/interfaces/FormFieldItem.md +22 -0
  198. package/docs/interfaces/FormFieldOptions.md +29 -0
  199. package/docs/interfaces/FormFields.md +29 -0
  200. package/docs/interfaces/GatewayOrderPayment.md +108 -0
  201. package/docs/interfaces/GiftCertificate.md +43 -0
  202. package/docs/interfaces/GiftCertificateItem.md +78 -0
  203. package/docs/interfaces/GiftCertificateOrderPayment.md +94 -0
  204. package/docs/interfaces/{googlepaybuttoninitializeoptions.md → GooglePayButtonInitializeOptions.md} +8 -12
  205. package/docs/interfaces/{googlepaycustomerinitializeoptions.md → GooglePayCustomerInitializeOptions.md} +11 -15
  206. package/docs/interfaces/{googlepaypaymentinitializeoptions.md → GooglePayPaymentInitializeOptions.md} +21 -21
  207. package/docs/interfaces/HostedCardFieldOptions.md +35 -0
  208. package/docs/interfaces/HostedCardFieldOptionsMap.md +36 -0
  209. package/docs/interfaces/HostedFieldStylesMap.md +29 -0
  210. package/docs/interfaces/HostedFormOptions.md +114 -0
  211. package/docs/interfaces/HostedInputBlurEvent.md +28 -0
  212. package/docs/interfaces/HostedInputCardTypeChangeEvent.md +28 -0
  213. package/docs/interfaces/HostedInputEnterEvent.md +28 -0
  214. package/docs/interfaces/HostedInputFocusEvent.md +28 -0
  215. package/docs/interfaces/HostedInputValidateErrorData.md +29 -0
  216. package/docs/interfaces/HostedInputValidateErrorDataMap.md +50 -0
  217. package/docs/interfaces/HostedInputValidateEvent.md +22 -0
  218. package/docs/interfaces/HostedInputValidateResults.md +22 -0
  219. package/docs/interfaces/HostedInstrument.md +22 -0
  220. package/docs/interfaces/HostedStoredCardFieldOptions.md +54 -0
  221. package/docs/interfaces/HostedStoredCardFieldOptionsMap.md +22 -0
  222. package/docs/interfaces/IbanElementOptions.md +82 -0
  223. package/docs/interfaces/IdealElementOptions.md +70 -0
  224. package/docs/interfaces/IndividualCardElementOptions.md +36 -0
  225. package/docs/interfaces/InitializationStrategy.md +21 -0
  226. package/docs/interfaces/InlineElementStyles.md +53 -0
  227. package/docs/interfaces/InputDetail.md +80 -0
  228. package/docs/interfaces/InputDetail_2.md +80 -0
  229. package/docs/interfaces/InputStyles.md +152 -0
  230. package/docs/interfaces/Item.md +22 -0
  231. package/docs/interfaces/Item_2.md +26 -0
  232. package/docs/interfaces/Item_3.md +26 -0
  233. package/docs/interfaces/KlarnaLoadResponse.md +28 -0
  234. package/docs/interfaces/KlarnaLoadResponse_2.md +28 -0
  235. package/docs/interfaces/{klarnapaymentinitializeoptions.md → KlarnaPaymentInitializeOptions.md} +15 -17
  236. package/docs/interfaces/{klarnav2paymentinitializeoptions.md → KlarnaV2PaymentInitializeOptions.md} +15 -17
  237. package/docs/interfaces/LabelStyles.md +76 -0
  238. package/docs/interfaces/LanguageConfig.md +57 -0
  239. package/docs/interfaces/LineItem.md +191 -0
  240. package/docs/interfaces/LineItemCategory.md +15 -0
  241. package/docs/interfaces/LineItemMap.md +36 -0
  242. package/docs/interfaces/LineItemOption.md +36 -0
  243. package/docs/interfaces/LineItemSocialData.md +36 -0
  244. package/docs/interfaces/LinkStyles.md +90 -0
  245. package/docs/interfaces/LoadingIndicatorStyles.md +29 -0
  246. package/docs/interfaces/Locales.md +7 -0
  247. package/docs/interfaces/MasterpassCustomerInitializeOptions.md +17 -0
  248. package/docs/interfaces/{masterpasspaymentinitializeoptions.md → MasterpassPaymentInitializeOptions.md} +5 -9
  249. package/docs/interfaces/{molliepaymentinitializeoptions.md → MolliePaymentInitializeOptions.md} +23 -27
  250. package/docs/interfaces/{monerispaymentinitializeoptions.md → MonerisPaymentInitializeOptions.md} +11 -15
  251. package/docs/interfaces/MonerisStylingProps.md +80 -0
  252. package/docs/interfaces/NonceGenerationError.md +29 -0
  253. package/docs/interfaces/NonceInstrument.md +36 -0
  254. package/docs/interfaces/Option.md +22 -0
  255. package/docs/interfaces/{optionsresponse.md → OptionsResponse.md} +23 -27
  256. package/docs/interfaces/{opypaymentinitializeoptions.md → OpyPaymentInitializeOptions.md} +6 -10
  257. package/docs/interfaces/Order.md +190 -0
  258. package/docs/interfaces/OrderConsignment.md +15 -0
  259. package/docs/interfaces/OrderPayment.md +58 -0
  260. package/docs/interfaces/OrderPaymentRequestBody.md +39 -0
  261. package/docs/interfaces/{orderrequestbody.md → OrderRequestBody.md} +8 -12
  262. package/docs/interfaces/OrderShippingConsignment.md +218 -0
  263. package/docs/interfaces/PasswordRequirements.md +36 -0
  264. package/docs/interfaces/PayPalInstrument.md +91 -0
  265. package/docs/interfaces/PaymentInitializeOptions.md +406 -0
  266. package/docs/interfaces/PaymentMethod.md +92 -0
  267. package/docs/interfaces/PaymentMethodConfig.md +120 -0
  268. package/docs/interfaces/PaymentRequestOptions.md +67 -0
  269. package/docs/interfaces/PaymentSettings.md +22 -0
  270. package/docs/interfaces/PaypalButtonInitializeOptions.md +76 -0
  271. package/docs/interfaces/PaypalButtonStyleOptions.md +64 -0
  272. package/docs/interfaces/PaypalButtonStyleOptions_2.md +50 -0
  273. package/docs/interfaces/PaypalCommerceButtonInitializeOptions.md +26 -0
  274. package/docs/interfaces/{paypalcommercecreditcardpaymentinitializeoptions.md → PaypalCommerceCreditCardPaymentInitializeOptions.md} +5 -9
  275. package/docs/interfaces/PaypalCommerceFormFieldCardTypeChangeEventData.md +15 -0
  276. package/docs/interfaces/PaypalCommerceFormFieldKeyboardEventData.md +15 -0
  277. package/docs/interfaces/PaypalCommerceFormFieldOptions.md +28 -0
  278. package/docs/interfaces/PaypalCommerceFormFieldStylesMap.md +29 -0
  279. package/docs/interfaces/PaypalCommerceFormFieldValidateErrorData.md +29 -0
  280. package/docs/interfaces/PaypalCommerceFormFieldValidateEventData.md +33 -0
  281. package/docs/interfaces/PaypalCommerceFormFieldsMap.md +36 -0
  282. package/docs/interfaces/PaypalCommerceFormOptions.md +148 -0
  283. package/docs/interfaces/{paypalcommercepaymentinitializeoptions.md → PaypalCommercePaymentInitializeOptions.md} +46 -49
  284. package/docs/interfaces/PaypalCommerceStoredCardFieldOptions.md +43 -0
  285. package/docs/interfaces/PaypalCommerceStoredCardFieldsMap.md +22 -0
  286. package/docs/interfaces/PaypalCommerceVenmoButtonInitializeOptions.md +26 -0
  287. package/docs/interfaces/{paypalexpresspaymentinitializeoptions.md → PaypalExpressPaymentInitializeOptions.md} +5 -9
  288. package/docs/interfaces/PaypalFieldsStyleOptions.md +46 -0
  289. package/docs/interfaces/PhysicalItem.md +311 -0
  290. package/docs/interfaces/PickupMethod.md +43 -0
  291. package/docs/interfaces/PickupOptionRequestBody.md +22 -0
  292. package/docs/interfaces/PickupOptionResult.md +15 -0
  293. package/docs/interfaces/Promotion.md +15 -0
  294. package/docs/interfaces/Radius.md +22 -0
  295. package/docs/interfaces/Region.md +22 -0
  296. package/docs/interfaces/RequestOptions.md +48 -0
  297. package/docs/interfaces/SearchArea.md +22 -0
  298. package/docs/interfaces/SepaPlaceHolder.md +22 -0
  299. package/docs/interfaces/SepaPlaceHolder_2.md +22 -0
  300. package/docs/interfaces/ShippingInitializeOptions.md +88 -0
  301. package/docs/interfaces/ShippingOption.md +64 -0
  302. package/docs/interfaces/ShippingRequestOptions.md +65 -0
  303. package/docs/interfaces/ShopperConfig.md +29 -0
  304. package/docs/interfaces/ShopperCurrency.md +94 -0
  305. package/docs/interfaces/SignInEmail.md +22 -0
  306. package/docs/interfaces/SignInEmailRequestBody.md +22 -0
  307. package/docs/interfaces/SpamProtectionOptions.md +25 -0
  308. package/docs/interfaces/SquareFormElement.md +28 -0
  309. package/docs/interfaces/{squarepaymentinitializeoptions.md → SquarePaymentInitializeOptions.md} +36 -36
  310. package/docs/interfaces/StepStyles.md +120 -0
  311. package/docs/interfaces/StepTracker.md +64 -0
  312. package/docs/interfaces/StepTrackerConfig.md +15 -0
  313. package/docs/interfaces/StoreConfig.md +109 -0
  314. package/docs/interfaces/StoreCurrency.md +56 -0
  315. package/docs/interfaces/StoreLinks.md +57 -0
  316. package/docs/interfaces/StoreProfile.md +71 -0
  317. package/docs/interfaces/StripeElementCSSProperties.md +170 -0
  318. package/docs/interfaces/StripeElementClasses.md +63 -0
  319. package/docs/interfaces/StripeElementStyle.md +44 -0
  320. package/docs/interfaces/StripeElementStyleVariant.md +285 -0
  321. package/docs/interfaces/{stripeupepaymentinitializeoptions.md → StripeUPEPaymentInitializeOptions.md} +22 -20
  322. package/docs/interfaces/{stripev3paymentinitializeoptions.md → StripeV3PaymentInitializeOptions.md} +11 -15
  323. package/docs/interfaces/StyleOptions.md +44 -0
  324. package/docs/interfaces/StyleOptions_2.md +44 -0
  325. package/docs/interfaces/SubInputDetail.md +62 -0
  326. package/docs/interfaces/SubInputDetail_2.md +62 -0
  327. package/docs/interfaces/Subscriptions.md +29 -0
  328. package/docs/interfaces/Tax.md +22 -0
  329. package/docs/interfaces/TextInputStyles.md +175 -0
  330. package/docs/interfaces/ThreeDSecure.md +50 -0
  331. package/docs/interfaces/ThreeDSecureToken.md +15 -0
  332. package/docs/interfaces/TranslationData.md +7 -0
  333. package/docs/interfaces/Translations.md +7 -0
  334. package/docs/interfaces/UnknownObject.md +7 -0
  335. package/docs/interfaces/VaultedInstrument.md +29 -0
  336. package/docs/interfaces/WechatDataPaymentMethodState.md +15 -0
  337. package/docs/interfaces/WechatDataPaymentMethodState_2.md +15 -0
  338. package/docs/interfaces/WechatState.md +15 -0
  339. package/docs/interfaces/WechatState_2.md +15 -0
  340. package/docs/interfaces/WithAccountCreation.md +15 -0
  341. package/docs/interfaces/WithCheckoutcomFawryInstrument.md +22 -0
  342. package/docs/interfaces/WithCheckoutcomSEPAInstrument.md +22 -0
  343. package/docs/interfaces/WithCheckoutcomiDealInstrument.md +15 -0
  344. package/docs/interfaces/WithDocumentInstrument.md +15 -0
  345. package/docs/interfaces/WithMollieIssuerInstrument.md +22 -0
  346. package/docs/interfaces/WorldpayPaymentInitializeOptions.md +30 -0
  347. package/docs/interfaces/ZipCodeElementOptions.md +15 -0
  348. package/package.json +5 -5
  349. package/docs/classes/cartchangederror.md +0 -103
  350. package/docs/classes/checkoutbuttonerrorselector.md +0 -42
  351. package/docs/classes/checkoutbuttoninitializer.md +0 -147
  352. package/docs/classes/checkoutbuttonstatusselector.md +0 -42
  353. package/docs/classes/checkoutservice.md +0 -1527
  354. package/docs/classes/currencyservice.md +0 -44
  355. package/docs/classes/embeddedcheckout.md +0 -30
  356. package/docs/classes/languageservice.md +0 -89
  357. package/docs/classes/requesterror.md +0 -128
  358. package/docs/classes/standarderror.md +0 -92
  359. package/docs/enums/amazonpayv2checkoutlanguage.md +0 -57
  360. package/docs/enums/amazonpayv2ledgercurrency.md +0 -36
  361. package/docs/enums/amazonpayv2payoptions.md +0 -26
  362. package/docs/enums/amazonpayv2placement.md +0 -53
  363. package/docs/enums/braintreeformfieldtype.md +0 -50
  364. package/docs/enums/buttoncolor.md +0 -29
  365. package/docs/enums/buttontype.md +0 -22
  366. package/docs/enums/checkoutbuttonmethodtype.md +0 -134
  367. package/docs/enums/checkoutincludes.md +0 -29
  368. package/docs/enums/embeddedcheckouteventtype.md +0 -50
  369. package/docs/enums/hostedfieldtype.md +0 -50
  370. package/docs/enums/hostedinputeventtype.md +0 -85
  371. package/docs/enums/iconstyle.md +0 -22
  372. package/docs/enums/paypalbuttonstylecoloroption.md +0 -36
  373. package/docs/enums/paypalbuttonstylelabeloption.md +0 -43
  374. package/docs/enums/paypalbuttonstylelayoutoption.md +0 -22
  375. package/docs/enums/paypalbuttonstyleshapeoption.md +0 -22
  376. package/docs/enums/paypalbuttonstylesizeoption.md +0 -36
  377. package/docs/enums/paypalcommerceformfieldtype.md +0 -50
  378. package/docs/enums/radiusunit.md +0 -22
  379. package/docs/enums/stylebuttoncolor.md +0 -43
  380. package/docs/enums/stylebuttonlabel.md +0 -43
  381. package/docs/enums/stylebuttonlayout.md +0 -22
  382. package/docs/enums/stylebuttonshape.md +0 -22
  383. package/docs/interfaces/address.md +0 -140
  384. package/docs/interfaces/addressrequestbody.md +0 -100
  385. package/docs/interfaces/adyenadditionalactioncallbacks.md +0 -62
  386. package/docs/interfaces/adyenadditionalactioncallbacks_2.md +0 -60
  387. package/docs/interfaces/adyenadditionalactionoptions.md +0 -94
  388. package/docs/interfaces/adyenadditionalactionoptions_2.md +0 -94
  389. package/docs/interfaces/adyenbasecardcomponentoptions.md +0 -33
  390. package/docs/interfaces/adyenbasecardcomponentoptions_2.md +0 -33
  391. package/docs/interfaces/adyencomponent.md +0 -60
  392. package/docs/interfaces/adyencomponent_2.md +0 -60
  393. package/docs/interfaces/adyencomponentevents.md +0 -68
  394. package/docs/interfaces/adyencomponentevents_2.md +0 -68
  395. package/docs/interfaces/adyencreditcardcomponentoptions.md +0 -169
  396. package/docs/interfaces/adyenidealcomponentoptions.md +0 -21
  397. package/docs/interfaces/adyenpaymentmethodstate.md +0 -21
  398. package/docs/interfaces/adyenpaymentmethodstate_2.md +0 -19
  399. package/docs/interfaces/adyenplaceholderdata.md +0 -26
  400. package/docs/interfaces/adyenplaceholderdata_2.md +0 -26
  401. package/docs/interfaces/adyenthreeds2options.md +0 -85
  402. package/docs/interfaces/adyenv3creditcardcomponentoptions.md +0 -169
  403. package/docs/interfaces/amazonpaycustomerinitializeoptions.md +0 -67
  404. package/docs/interfaces/amazonpayorderreference.md +0 -30
  405. package/docs/interfaces/amazonpaypaymentinitializeoptions.md +0 -98
  406. package/docs/interfaces/amazonpayshippinginitializeoptions.md +0 -83
  407. package/docs/interfaces/amazonpayv2buttonparams.md +0 -75
  408. package/docs/interfaces/amazonpayv2checkoutsession.md +0 -39
  409. package/docs/interfaces/amazonpaywidgeterror.md +0 -60
  410. package/docs/interfaces/applepaybuttoninitializeoptions.md +0 -40
  411. package/docs/interfaces/applepaycustomerinitializeoptions.md +0 -77
  412. package/docs/interfaces/applepaypaymentinitializeoptions.md +0 -44
  413. package/docs/interfaces/bankinstrument.md +0 -98
  414. package/docs/interfaces/banner.md +0 -26
  415. package/docs/interfaces/baseaccountinstrument.md +0 -79
  416. package/docs/interfaces/baseelementoptions.md +0 -21
  417. package/docs/interfaces/baseelementoptions_2.md +0 -48
  418. package/docs/interfaces/baseindividualelementoptions.md +0 -61
  419. package/docs/interfaces/baseinstrument.md +0 -58
  420. package/docs/interfaces/billingaddress.md +0 -154
  421. package/docs/interfaces/billingaddressrequestbody.md +0 -129
  422. package/docs/interfaces/blockelementstyles.md +0 -95
  423. package/docs/interfaces/bluesnapv2styleprops.md +0 -33
  424. package/docs/interfaces/bodystyles.md +0 -19
  425. package/docs/interfaces/boltcustomerinitializeoptions.md +0 -32
  426. package/docs/interfaces/braintreeerror.md +0 -69
  427. package/docs/interfaces/braintreeformfieldcardtypechangeeventdata.md +0 -19
  428. package/docs/interfaces/braintreeformfieldkeyboardeventdata.md +0 -19
  429. package/docs/interfaces/braintreeformfieldoptions.md +0 -35
  430. package/docs/interfaces/braintreeformfieldsmap.md +0 -40
  431. package/docs/interfaces/braintreeformfieldstylesmap.md +0 -33
  432. package/docs/interfaces/braintreeformfieldvalidateerrordata.md +0 -33
  433. package/docs/interfaces/braintreeformfieldvalidateeventdata.md +0 -40
  434. package/docs/interfaces/braintreeformoptions.md +0 -104
  435. package/docs/interfaces/braintreepaypalbuttoninitializeoptions.md +0 -94
  436. package/docs/interfaces/braintreepaypalcreditbuttoninitializeoptions.md +0 -85
  437. package/docs/interfaces/braintreestoredcardfieldoptions.md +0 -48
  438. package/docs/interfaces/braintreestoredcardfieldsmap.md +0 -26
  439. package/docs/interfaces/braintreethreedsecureoptions.md +0 -62
  440. package/docs/interfaces/braintreevenmobuttoninitializeoptions.md +0 -29
  441. package/docs/interfaces/braintreeverifypayload.md +0 -55
  442. package/docs/interfaces/braintreevisacheckoutcustomerinitializeoptions.md +0 -37
  443. package/docs/interfaces/browserinfo.md +0 -54
  444. package/docs/interfaces/buttonstyles.md +0 -123
  445. package/docs/interfaces/cardcvcelementoptions.md +0 -64
  446. package/docs/interfaces/carddatapaymentmethodstate.md +0 -19
  447. package/docs/interfaces/carddatapaymentmethodstate_2.md +0 -19
  448. package/docs/interfaces/cardelementoptions.md +0 -85
  449. package/docs/interfaces/cardexpiryelementoptions.md +0 -64
  450. package/docs/interfaces/cardinstrument.md +0 -103
  451. package/docs/interfaces/cardnumberelementoptions.md +0 -80
  452. package/docs/interfaces/cardpaymentmethodstate.md +0 -58
  453. package/docs/interfaces/cardpaymentmethodstate_2.md +0 -47
  454. package/docs/interfaces/cardstate.md +0 -40
  455. package/docs/interfaces/cardstate_2.md +0 -40
  456. package/docs/interfaces/cardstateerrors.md +0 -11
  457. package/docs/interfaces/cardstateerrors_2.md +0 -11
  458. package/docs/interfaces/cart.md +0 -103
  459. package/docs/interfaces/chasepaycustomerinitializeoptions.md +0 -19
  460. package/docs/interfaces/checkableinputstyles.md +0 -147
  461. package/docs/interfaces/checkliststyles.md +0 -109
  462. package/docs/interfaces/checkout.md +0 -199
  463. package/docs/interfaces/checkoutbuttoninitializeoptions.md +0 -232
  464. package/docs/interfaces/checkoutbuttoninitializeroptions.md +0 -26
  465. package/docs/interfaces/checkoutbuttonoptions.md +0 -55
  466. package/docs/interfaces/checkoutbuttonselectors.md +0 -26
  467. package/docs/interfaces/checkoutparams.md +0 -19
  468. package/docs/interfaces/checkoutpayment.md +0 -44
  469. package/docs/interfaces/checkoutrequestbody.md +0 -19
  470. package/docs/interfaces/checkoutselectors.md +0 -33
  471. package/docs/interfaces/checkoutserviceoptions.md +0 -40
  472. package/docs/interfaces/checkoutsettings.md +0 -205
  473. package/docs/interfaces/checkoutstoreerrorselector.md +0 -566
  474. package/docs/interfaces/checkoutstoreselector.md +0 -451
  475. package/docs/interfaces/checkoutstorestatusselector.md +0 -678
  476. package/docs/interfaces/consignment.md +0 -75
  477. package/docs/interfaces/consignmentassignmentbaserequestbodywithaddress.md +0 -33
  478. package/docs/interfaces/consignmentassignmentbaserequestbodywithshippingaddress.md +0 -33
  479. package/docs/interfaces/consignmentcreaterequestbody.md +0 -40
  480. package/docs/interfaces/consignmentlineitem.md +0 -26
  481. package/docs/interfaces/consignmentpickupoption.md +0 -19
  482. package/docs/interfaces/consignmentupdaterequestbody.md +0 -47
  483. package/docs/interfaces/coordinates.md +0 -26
  484. package/docs/interfaces/country.md +0 -47
  485. package/docs/interfaces/coupon.md +0 -47
  486. package/docs/interfaces/creditcardinstrument.md +0 -88
  487. package/docs/interfaces/creditcardplaceholder.md +0 -33
  488. package/docs/interfaces/creditcardplaceholder_2.md +0 -33
  489. package/docs/interfaces/cssproperties.md +0 -215
  490. package/docs/interfaces/cssproperties_2.md +0 -215
  491. package/docs/interfaces/currency.md +0 -40
  492. package/docs/interfaces/customer.md +0 -88
  493. package/docs/interfaces/customeraccountrequestbody.md +0 -54
  494. package/docs/interfaces/customeraddress.md +0 -154
  495. package/docs/interfaces/customercredentials.md +0 -26
  496. package/docs/interfaces/customergroup.md +0 -26
  497. package/docs/interfaces/customerinitializeoptions.md +0 -219
  498. package/docs/interfaces/customerpasswordrequirements.md +0 -40
  499. package/docs/interfaces/customerrequestoptions.md +0 -60
  500. package/docs/interfaces/customerror.md +0 -68
  501. package/docs/interfaces/customitem.md +0 -54
  502. package/docs/interfaces/digitalitem.md +0 -260
  503. package/docs/interfaces/discount.md +0 -26
  504. package/docs/interfaces/embeddedcheckoutcompleteevent.md +0 -19
  505. package/docs/interfaces/embeddedcheckouterror.md +0 -33
  506. package/docs/interfaces/embeddedcheckouterrorevent.md +0 -26
  507. package/docs/interfaces/embeddedcheckoutframeerrorevent.md +0 -26
  508. package/docs/interfaces/embeddedcheckoutframeloadedevent.md +0 -26
  509. package/docs/interfaces/embeddedcheckoutloadedevent.md +0 -19
  510. package/docs/interfaces/embeddedcheckoutmessenger.md +0 -105
  511. package/docs/interfaces/embeddedcheckoutmessengeroptions.md +0 -26
  512. package/docs/interfaces/embeddedcheckoutoptions.md +0 -126
  513. package/docs/interfaces/embeddedcheckoutsignedoutevent.md +0 -19
  514. package/docs/interfaces/embeddedcheckoutstyles.md +0 -145
  515. package/docs/interfaces/embeddedcontentoptions.md +0 -19
  516. package/docs/interfaces/executepaymentmethodcheckoutoptions.md +0 -72
  517. package/docs/interfaces/flashmessage.md +0 -33
  518. package/docs/interfaces/formfield.md +0 -117
  519. package/docs/interfaces/formfielditem.md +0 -26
  520. package/docs/interfaces/formfieldoptions.md +0 -33
  521. package/docs/interfaces/formfields.md +0 -33
  522. package/docs/interfaces/gatewayorderpayment.md +0 -88
  523. package/docs/interfaces/giftcertificate.md +0 -47
  524. package/docs/interfaces/giftcertificateitem.md +0 -80
  525. package/docs/interfaces/giftcertificateorderpayment.md +0 -81
  526. package/docs/interfaces/hostedcardfieldoptions.md +0 -35
  527. package/docs/interfaces/hostedcardfieldoptionsmap.md +0 -40
  528. package/docs/interfaces/hostedfieldstylesmap.md +0 -33
  529. package/docs/interfaces/hostedformoptions.md +0 -104
  530. package/docs/interfaces/hostedinputblurevent.md +0 -30
  531. package/docs/interfaces/hostedinputcardtypechangeevent.md +0 -30
  532. package/docs/interfaces/hostedinputenterevent.md +0 -30
  533. package/docs/interfaces/hostedinputfocusevent.md +0 -30
  534. package/docs/interfaces/hostedinputvalidateerrordata.md +0 -33
  535. package/docs/interfaces/hostedinputvalidateerrordatamap.md +0 -54
  536. package/docs/interfaces/hostedinputvalidateevent.md +0 -26
  537. package/docs/interfaces/hostedinputvalidateresults.md +0 -26
  538. package/docs/interfaces/hostedinstrument.md +0 -26
  539. package/docs/interfaces/hostedstoredcardfieldoptions.md +0 -48
  540. package/docs/interfaces/hostedstoredcardfieldoptionsmap.md +0 -26
  541. package/docs/interfaces/ibanelementoptions.md +0 -76
  542. package/docs/interfaces/idealelementoptions.md +0 -64
  543. package/docs/interfaces/individualcardelementoptions.md +0 -40
  544. package/docs/interfaces/initializationstrategy.md +0 -21
  545. package/docs/interfaces/inlineelementstyles.md +0 -53
  546. package/docs/interfaces/inputdetail.md +0 -84
  547. package/docs/interfaces/inputdetail_2.md +0 -84
  548. package/docs/interfaces/inputstyles.md +0 -134
  549. package/docs/interfaces/item.md +0 -26
  550. package/docs/interfaces/item_2.md +0 -30
  551. package/docs/interfaces/item_3.md +0 -30
  552. package/docs/interfaces/klarnaloadresponse.md +0 -26
  553. package/docs/interfaces/klarnaloadresponse_2.md +0 -26
  554. package/docs/interfaces/labelstyles.md +0 -66
  555. package/docs/interfaces/languageconfig.md +0 -61
  556. package/docs/interfaces/lineitem.md +0 -191
  557. package/docs/interfaces/lineitemcategory.md +0 -19
  558. package/docs/interfaces/lineitemmap.md +0 -40
  559. package/docs/interfaces/lineitemoption.md +0 -40
  560. package/docs/interfaces/lineitemsocialdata.md +0 -40
  561. package/docs/interfaces/linkstyles.md +0 -80
  562. package/docs/interfaces/loadingindicatorstyles.md +0 -33
  563. package/docs/interfaces/locales.md +0 -11
  564. package/docs/interfaces/masterpasscustomerinitializeoptions.md +0 -21
  565. package/docs/interfaces/monerisstylingprops.md +0 -84
  566. package/docs/interfaces/noncegenerationerror.md +0 -33
  567. package/docs/interfaces/nonceinstrument.md +0 -40
  568. package/docs/interfaces/option.md +0 -26
  569. package/docs/interfaces/order.md +0 -194
  570. package/docs/interfaces/orderconsignment.md +0 -19
  571. package/docs/interfaces/orderpayment.md +0 -58
  572. package/docs/interfaces/orderpaymentrequestbody.md +0 -43
  573. package/docs/interfaces/ordershippingconsignment.md +0 -222
  574. package/docs/interfaces/passwordrequirements.md +0 -40
  575. package/docs/interfaces/paymentinitializeoptions.md +0 -402
  576. package/docs/interfaces/paymentmethod.md +0 -96
  577. package/docs/interfaces/paymentmethodconfig.md +0 -124
  578. package/docs/interfaces/paymentrequestoptions.md +0 -67
  579. package/docs/interfaces/paymentsettings.md +0 -26
  580. package/docs/interfaces/paypalbuttoninitializeoptions.md +0 -76
  581. package/docs/interfaces/paypalbuttonstyleoptions.md +0 -68
  582. package/docs/interfaces/paypalbuttonstyleoptions_2.md +0 -54
  583. package/docs/interfaces/paypalcommercebuttoninitializeoptions.md +0 -30
  584. package/docs/interfaces/paypalcommerceformfieldcardtypechangeeventdata.md +0 -19
  585. package/docs/interfaces/paypalcommerceformfieldkeyboardeventdata.md +0 -19
  586. package/docs/interfaces/paypalcommerceformfieldoptions.md +0 -28
  587. package/docs/interfaces/paypalcommerceformfieldsmap.md +0 -40
  588. package/docs/interfaces/paypalcommerceformfieldstylesmap.md +0 -33
  589. package/docs/interfaces/paypalcommerceformfieldvalidateerrordata.md +0 -33
  590. package/docs/interfaces/paypalcommerceformfieldvalidateeventdata.md +0 -40
  591. package/docs/interfaces/paypalcommerceformoptions.md +0 -142
  592. package/docs/interfaces/paypalcommercestoredcardfieldoptions.md +0 -39
  593. package/docs/interfaces/paypalcommercestoredcardfieldsmap.md +0 -26
  594. package/docs/interfaces/paypalcommercevenmobuttoninitializeoptions.md +0 -30
  595. package/docs/interfaces/paypalfieldsstyleoptions.md +0 -26
  596. package/docs/interfaces/paypalinstrument.md +0 -79
  597. package/docs/interfaces/physicalitem.md +0 -253
  598. package/docs/interfaces/pickupmethod.md +0 -47
  599. package/docs/interfaces/pickupoptionrequestbody.md +0 -26
  600. package/docs/interfaces/pickupoptionresult.md +0 -19
  601. package/docs/interfaces/promotion.md +0 -19
  602. package/docs/interfaces/radius.md +0 -26
  603. package/docs/interfaces/region.md +0 -26
  604. package/docs/interfaces/requestoptions.md +0 -46
  605. package/docs/interfaces/searcharea.md +0 -26
  606. package/docs/interfaces/sepaplaceholder.md +0 -26
  607. package/docs/interfaces/sepaplaceholder_2.md +0 -26
  608. package/docs/interfaces/shippinginitializeoptions.md +0 -80
  609. package/docs/interfaces/shippingoption.md +0 -68
  610. package/docs/interfaces/shippingrequestoptions.md +0 -59
  611. package/docs/interfaces/shopperconfig.md +0 -33
  612. package/docs/interfaces/shoppercurrency.md +0 -82
  613. package/docs/interfaces/signinemail.md +0 -26
  614. package/docs/interfaces/signinemailrequestbody.md +0 -26
  615. package/docs/interfaces/spamprotectionoptions.md +0 -97
  616. package/docs/interfaces/squareformelement.md +0 -32
  617. package/docs/interfaces/stepstyles.md +0 -102
  618. package/docs/interfaces/steptracker.md +0 -60
  619. package/docs/interfaces/steptrackerconfig.md +0 -19
  620. package/docs/interfaces/storeconfig.md +0 -113
  621. package/docs/interfaces/storecurrency.md +0 -56
  622. package/docs/interfaces/storelinks.md +0 -61
  623. package/docs/interfaces/storeprofile.md +0 -75
  624. package/docs/interfaces/stripeelementclasses.md +0 -67
  625. package/docs/interfaces/stripeelementcssproperties.md +0 -170
  626. package/docs/interfaces/stripeelementstyle.md +0 -48
  627. package/docs/interfaces/stripeelementstylevariant.md +0 -253
  628. package/docs/interfaces/styleoptions.md +0 -48
  629. package/docs/interfaces/styleoptions_2.md +0 -48
  630. package/docs/interfaces/subinputdetail.md +0 -66
  631. package/docs/interfaces/subinputdetail_2.md +0 -66
  632. package/docs/interfaces/subscriptions.md +0 -33
  633. package/docs/interfaces/tax.md +0 -26
  634. package/docs/interfaces/textinputstyles.md +0 -147
  635. package/docs/interfaces/threedsecure.md +0 -54
  636. package/docs/interfaces/threedsecuretoken.md +0 -19
  637. package/docs/interfaces/translationdata.md +0 -11
  638. package/docs/interfaces/translations.md +0 -11
  639. package/docs/interfaces/unknownobject.md +0 -11
  640. package/docs/interfaces/vaultedinstrument.md +0 -33
  641. package/docs/interfaces/wechatdatapaymentmethodstate.md +0 -19
  642. package/docs/interfaces/wechatdatapaymentmethodstate_2.md +0 -19
  643. package/docs/interfaces/wechatstate.md +0 -19
  644. package/docs/interfaces/wechatstate_2.md +0 -19
  645. package/docs/interfaces/withaccountcreation.md +0 -19
  646. package/docs/interfaces/withcheckoutcomfawryinstrument.md +0 -26
  647. package/docs/interfaces/withcheckoutcomidealinstrument.md +0 -19
  648. package/docs/interfaces/withcheckoutcomsepainstrument.md +0 -26
  649. package/docs/interfaces/withdocumentinstrument.md +0 -19
  650. package/docs/interfaces/withmollieissuerinstrument.md +0 -26
  651. package/docs/interfaces/worldpaypaymentinitializeoptions.md +0 -39
  652. package/docs/interfaces/zipcodeelementoptions.md +0 -19
@@ -0,0 +1,1645 @@
1
+ [@bigcommerce/checkout-sdk](../README.md) / CheckoutService
2
+
3
+ # Class: CheckoutService
4
+
5
+ Responsible for completing the checkout process for the current customer.
6
+
7
+ This object can be used to collect all information that is required for
8
+ checkout, such as shipping and billing information. It can also be used to
9
+ retrieve the current checkout state and subscribe to its changes.
10
+
11
+ ## Table of contents
12
+
13
+ ### Constructors
14
+
15
+ - [constructor](CheckoutService.md#constructor)
16
+
17
+ ### Methods
18
+
19
+ - [applyCoupon](CheckoutService.md#applycoupon)
20
+ - [applyGiftCertificate](CheckoutService.md#applygiftcertificate)
21
+ - [applyStoreCredit](CheckoutService.md#applystorecredit)
22
+ - [assignItemsToAddress](CheckoutService.md#assignitemstoaddress)
23
+ - [clearError](CheckoutService.md#clearerror)
24
+ - [continueAsGuest](CheckoutService.md#continueasguest)
25
+ - [createConsignments](CheckoutService.md#createconsignments)
26
+ - [createCustomerAccount](CheckoutService.md#createcustomeraccount)
27
+ - [createCustomerAddress](CheckoutService.md#createcustomeraddress)
28
+ - [deinitializeCustomer](CheckoutService.md#deinitializecustomer)
29
+ - [deinitializePayment](CheckoutService.md#deinitializepayment)
30
+ - [deinitializeShipping](CheckoutService.md#deinitializeshipping)
31
+ - [deleteConsignment](CheckoutService.md#deleteconsignment)
32
+ - [deleteInstrument](CheckoutService.md#deleteinstrument)
33
+ - [executePaymentMethodCheckout](CheckoutService.md#executepaymentmethodcheckout)
34
+ - [executeSpamCheck](CheckoutService.md#executespamcheck)
35
+ - [finalizeOrderIfNeeded](CheckoutService.md#finalizeorderifneeded)
36
+ - [getState](CheckoutService.md#getstate)
37
+ - [initializeCustomer](CheckoutService.md#initializecustomer)
38
+ - [initializePayment](CheckoutService.md#initializepayment)
39
+ - [initializeShipping](CheckoutService.md#initializeshipping)
40
+ - [initializeSpamProtection](CheckoutService.md#initializespamprotection)
41
+ - [loadBillingAddressFields](CheckoutService.md#loadbillingaddressfields)
42
+ - [loadBillingCountries](CheckoutService.md#loadbillingcountries)
43
+ - [loadCheckout](CheckoutService.md#loadcheckout)
44
+ - [loadInstruments](CheckoutService.md#loadinstruments)
45
+ - [loadOrder](CheckoutService.md#loadorder)
46
+ - [loadPaymentMethods](CheckoutService.md#loadpaymentmethods)
47
+ - [loadPickupOptions](CheckoutService.md#loadpickupoptions)
48
+ - [loadShippingAddressFields](CheckoutService.md#loadshippingaddressfields)
49
+ - [loadShippingCountries](CheckoutService.md#loadshippingcountries)
50
+ - [loadShippingOptions](CheckoutService.md#loadshippingoptions)
51
+ - [notifyState](CheckoutService.md#notifystate)
52
+ - [removeCoupon](CheckoutService.md#removecoupon)
53
+ - [removeGiftCertificate](CheckoutService.md#removegiftcertificate)
54
+ - [selectConsignmentShippingOption](CheckoutService.md#selectconsignmentshippingoption)
55
+ - [selectShippingOption](CheckoutService.md#selectshippingoption)
56
+ - [sendSignInEmail](CheckoutService.md#sendsigninemail)
57
+ - [signInCustomer](CheckoutService.md#signincustomer)
58
+ - [signOutCustomer](CheckoutService.md#signoutcustomer)
59
+ - [submitOrder](CheckoutService.md#submitorder)
60
+ - [subscribe](CheckoutService.md#subscribe)
61
+ - [unassignItemsToAddress](CheckoutService.md#unassignitemstoaddress)
62
+ - [updateBillingAddress](CheckoutService.md#updatebillingaddress)
63
+ - [updateCheckout](CheckoutService.md#updatecheckout)
64
+ - [updateConsignment](CheckoutService.md#updateconsignment)
65
+ - [updateShippingAddress](CheckoutService.md#updateshippingaddress)
66
+ - [updateSubscriptions](CheckoutService.md#updatesubscriptions)
67
+
68
+ ## Constructors
69
+
70
+ ### constructor
71
+
72
+ • **new CheckoutService**()
73
+
74
+ ## Methods
75
+
76
+ ### applyCoupon
77
+
78
+ ▸ **applyCoupon**(`code`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
79
+
80
+ Applies a coupon code to the current checkout.
81
+
82
+ Once the coupon code gets applied, the quote for the current checkout will
83
+ be adjusted accordingly. The same coupon code cannot be applied more than
84
+ once.
85
+
86
+ ```js
87
+ await service.applyCoupon('COUPON');
88
+ ```
89
+
90
+ #### Parameters
91
+
92
+ | Name | Type | Description |
93
+ | :------ | :------ | :------ |
94
+ | `code` | `string` | The coupon code to apply to the current checkout. |
95
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for applying the coupon code. |
96
+
97
+ #### Returns
98
+
99
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
100
+
101
+ A promise that resolves to the current state.
102
+
103
+ ___
104
+
105
+ ### applyGiftCertificate
106
+
107
+ ▸ **applyGiftCertificate**(`code`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
108
+
109
+ Applies a gift certificate to the current checkout.
110
+
111
+ Once the gift certificate gets applied, the quote for the current
112
+ checkout will be adjusted accordingly.
113
+
114
+ ```js
115
+ await service.applyGiftCertificate('GIFT_CERTIFICATE');
116
+ ```
117
+
118
+ #### Parameters
119
+
120
+ | Name | Type | Description |
121
+ | :------ | :------ | :------ |
122
+ | `code` | `string` | The gift certificate to apply to the current checkout. |
123
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for applying the gift certificate. |
124
+
125
+ #### Returns
126
+
127
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
128
+
129
+ A promise that resolves to the current state.
130
+
131
+ ___
132
+
133
+ ### applyStoreCredit
134
+
135
+ ▸ **applyStoreCredit**(`useStoreCredit`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
136
+
137
+ Applies or removes customer's store credit code to the current checkout.
138
+
139
+ Once the store credit gets applied, the outstanding balance will be adjusted accordingly.
140
+
141
+ ```js
142
+ const state = await service.applyStoreCredit(true);
143
+
144
+ console.log(state.data.getCheckout().outstandingBalance);
145
+ ```
146
+
147
+ #### Parameters
148
+
149
+ | Name | Type | Description |
150
+ | :------ | :------ | :------ |
151
+ | `useStoreCredit` | `boolean` | - |
152
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for applying store credit. |
153
+
154
+ #### Returns
155
+
156
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
157
+
158
+ A promise that resolves to the current state.
159
+
160
+ ___
161
+
162
+ ### assignItemsToAddress
163
+
164
+ ▸ **assignItemsToAddress**(`consignment`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
165
+
166
+ Convenience method that assigns items to be shipped to a specific address.
167
+
168
+ Note: this method finds an existing consignment that matches the provided address
169
+ and assigns the provided items. If no consignment matches the address, a new one
170
+ will be created.
171
+
172
+ #### Parameters
173
+
174
+ | Name | Type | Description |
175
+ | :------ | :------ | :------ |
176
+ | `consignment` | [`ConsignmentAssignmentRequestBody`](../README.md#consignmentassignmentrequestbody) | The consignment data that will be used. |
177
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for the request |
178
+
179
+ #### Returns
180
+
181
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
182
+
183
+ A promise that resolves to the current state.
184
+
185
+ ___
186
+
187
+ ### clearError
188
+
189
+ ▸ **clearError**(`error`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
190
+
191
+ Clear errors that have been collected from previous calls.
192
+
193
+ ```js
194
+ const state = await service.clearError(error);
195
+
196
+ console.log(state.errors.getError());
197
+ ```
198
+
199
+ #### Parameters
200
+
201
+ | Name | Type | Description |
202
+ | :------ | :------ | :------ |
203
+ | `error` | `Error` | Specific error object to clear |
204
+
205
+ #### Returns
206
+
207
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
208
+
209
+ A promise that resolves to the current state.
210
+
211
+ ___
212
+
213
+ ### continueAsGuest
214
+
215
+ ▸ **continueAsGuest**(`credentials`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
216
+
217
+ Continues to check out as a guest.
218
+
219
+ If your Checkout Settings allow it, your customers could continue the checkout as guests (without signing in).
220
+ If you have enabled the checkout setting "Prompt existing accounts to sign in", this information is
221
+ exposed as part of the [Customer](../interfaces/customer.md) object.
222
+
223
+ Once they provide their email address, it will be stored as
224
+ part of their [billing address](../interfaces/billingaddress.md).
225
+
226
+ #### Parameters
227
+
228
+ | Name | Type | Description |
229
+ | :------ | :------ | :------ |
230
+ | `credentials` | [`GuestCredentials`](../README.md#guestcredentials) | The guest credentials to use, with optional subscriptions. |
231
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for continuing as a guest. |
232
+
233
+ #### Returns
234
+
235
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
236
+
237
+ A promise that resolves to the current state.
238
+
239
+ ___
240
+
241
+ ### createConsignments
242
+
243
+ ▸ **createConsignments**(`consignments`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
244
+
245
+ Creates consignments given a list.
246
+
247
+ Note: this is used when items need to be shipped to multiple addresses,
248
+ for single shipping address, use `CheckoutService#updateShippingAddress`.
249
+
250
+ When consignments are created, an updated list of shipping options will
251
+ become available for each consignment, unless no options are available.
252
+ If the update is successful, you can call
253
+ `CheckoutStoreSelector#getConsignments` to retrieve the updated list of
254
+ consignments.'
255
+
256
+ Beware that if a consignment includes all line items from another
257
+ consignment, that consignment will be deleted as a valid consignment must
258
+ include at least one valid line item.
259
+
260
+ You can submit an address that is partially complete. The address does
261
+ not get validated until you submit the order.
262
+
263
+ ```js
264
+ const state = await service.createConsignments(consignments);
265
+
266
+ console.log(state.data.getConsignments());
267
+ ```
268
+
269
+ #### Parameters
270
+
271
+ | Name | Type | Description |
272
+ | :------ | :------ | :------ |
273
+ | `consignments` | [`ConsignmentsRequestBody`](../README.md#consignmentsrequestbody) | The list of consignments to be created. |
274
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for updating the shipping address. |
275
+
276
+ #### Returns
277
+
278
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
279
+
280
+ A promise that resolves to the current state.
281
+
282
+ ___
283
+
284
+ ### createCustomerAccount
285
+
286
+ ▸ **createCustomerAccount**(`customerAccount`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
287
+
288
+ Creates a customer account.
289
+
290
+ **`remarks`**
291
+ ```js
292
+ checkoutService.createCustomerAccount({
293
+ email: 'foo@bar.com',
294
+ firstName: 'Foo',
295
+ lastName: 'Bar',
296
+ password: 'password',
297
+ acceptsMarketingEmails: true,
298
+ customFields: [],
299
+ });
300
+ ```
301
+ Please note that `createCustomerAccount` is currently in an early stage
302
+ of development. Therefore the API is unstable and not ready for public
303
+ consumption.
304
+
305
+ **`alpha`**
306
+
307
+ #### Parameters
308
+
309
+ | Name | Type | Description |
310
+ | :------ | :------ | :------ |
311
+ | `customerAccount` | [`CustomerAccountRequestBody`](../interfaces/CustomerAccountRequestBody.md) | The customer account data. |
312
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for creating customer account. |
313
+
314
+ #### Returns
315
+
316
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
317
+
318
+ A promise that resolves to the current state.
319
+
320
+ ___
321
+
322
+ ### createCustomerAddress
323
+
324
+ ▸ **createCustomerAddress**(`customerAddress`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
325
+
326
+ Creates a customer account address.
327
+
328
+ **`remarks`**
329
+ ```js
330
+ checkoutService.createCustomerAddress({
331
+ firstName: 'Foo',
332
+ lastName: 'Bar',
333
+ address1: '55 Market St',
334
+ stateOrProvinceCode: 'CA',
335
+ countryCode: 'US',
336
+ postalCode: '90110',
337
+ customFields: [],
338
+ });
339
+ ```
340
+ Please note that `createCustomerAccountAddress` is currently in an early stage
341
+ of development. Therefore the API is unstable and not ready for public
342
+ consumption.
343
+
344
+ **`alpha`**
345
+
346
+ #### Parameters
347
+
348
+ | Name | Type | Description |
349
+ | :------ | :------ | :------ |
350
+ | `customerAddress` | [`AddressRequestBody`](../interfaces/AddressRequestBody.md) | The customer account data. |
351
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for creating customer account. |
352
+
353
+ #### Returns
354
+
355
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
356
+
357
+ A promise that resolves to the current state.
358
+
359
+ ___
360
+
361
+ ### deinitializeCustomer
362
+
363
+ ▸ **deinitializeCustomer**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
364
+
365
+ De-initializes the sign-in step of a checkout process.
366
+
367
+ It should be called once you no longer want to prompt customers to sign
368
+ in. It can perform any necessary clean-up behind the scene, i.e.: remove
369
+ DOM nodes or event handlers that are attached as a result of customer
370
+ initialization.
371
+
372
+ ```js
373
+ await service.deinitializeCustomer({
374
+ methodId: 'amazon',
375
+ });
376
+ ```
377
+
378
+ #### Parameters
379
+
380
+ | Name | Type | Description |
381
+ | :------ | :------ | :------ |
382
+ | `options?` | [`CustomerRequestOptions`](../interfaces/CustomerRequestOptions.md) | Options for deinitializing the customer step of checkout. |
383
+
384
+ #### Returns
385
+
386
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
387
+
388
+ A promise that resolves to the current state.
389
+
390
+ ___
391
+
392
+ ### deinitializePayment
393
+
394
+ ▸ **deinitializePayment**(`options`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
395
+
396
+ De-initializes the payment step of a checkout process.
397
+
398
+ The method should be called once you no longer require a payment method
399
+ to be initialized. It can perform any necessary clean-up behind the
400
+ scene, i.e.: remove DOM nodes or event handlers that are attached as a
401
+ result of payment initialization.
402
+
403
+ ```js
404
+ await service.deinitializePayment({
405
+ methodId: 'amazon',
406
+ });
407
+ ```
408
+
409
+ #### Parameters
410
+
411
+ | Name | Type | Description |
412
+ | :------ | :------ | :------ |
413
+ | `options` | [`PaymentRequestOptions`](../interfaces/PaymentRequestOptions.md) | Options for deinitializing the payment step of checkout. |
414
+
415
+ #### Returns
416
+
417
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
418
+
419
+ A promise that resolves to the current state.
420
+
421
+ ___
422
+
423
+ ### deinitializeShipping
424
+
425
+ ▸ **deinitializeShipping**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
426
+
427
+ De-initializes the shipping step of a checkout process.
428
+
429
+ It should be called once you no longer need to collect shipping details.
430
+ It can perform any necessary clean-up behind the scene, i.e.: remove DOM
431
+ nodes or event handlers that are attached as a result of shipping
432
+ initialization.
433
+
434
+ ```js
435
+ await service.deinitializeShipping({
436
+ methodId: 'amazon',
437
+ });
438
+ ```
439
+
440
+ #### Parameters
441
+
442
+ | Name | Type | Description |
443
+ | :------ | :------ | :------ |
444
+ | `options?` | [`ShippingRequestOptions`](../interfaces/ShippingRequestOptions.md)<`Object`\> | Options for deinitializing the shipping step of checkout. |
445
+
446
+ #### Returns
447
+
448
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
449
+
450
+ A promise that resolves to the current state.
451
+
452
+ ___
453
+
454
+ ### deleteConsignment
455
+
456
+ ▸ **deleteConsignment**(`consignmentId`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
457
+
458
+ Deletes a consignment
459
+
460
+ ```js
461
+ const state = await service.deleteConsignment('55c96cda6f04c');
462
+
463
+ console.log(state.data.getConsignments());
464
+ ```
465
+
466
+ #### Parameters
467
+
468
+ | Name | Type | Description |
469
+ | :------ | :------ | :------ |
470
+ | `consignmentId` | `string` | The ID of the consignment to be deleted |
471
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for the consignment delete request |
472
+
473
+ #### Returns
474
+
475
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
476
+
477
+ A promise that resolves to the current state.
478
+
479
+ ___
480
+
481
+ ### deleteInstrument
482
+
483
+ ▸ **deleteInstrument**(`instrumentId`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
484
+
485
+ Deletes a payment instrument by an id.
486
+
487
+ Once an instrument gets removed, it can no longer be retrieved using
488
+ `CheckoutStoreSelector#getInstruments`.
489
+
490
+ ```js
491
+ const state = service.deleteInstrument('123');
492
+
493
+ console.log(state.data.getInstruments());
494
+ ```
495
+
496
+ #### Parameters
497
+
498
+ | Name | Type | Description |
499
+ | :------ | :------ | :------ |
500
+ | `instrumentId` | `string` | The identifier of the payment instrument to delete. |
501
+
502
+ #### Returns
503
+
504
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
505
+
506
+ A promise that resolves to the current state.
507
+
508
+ ___
509
+
510
+ ### executePaymentMethodCheckout
511
+
512
+ ▸ **executePaymentMethodCheckout**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
513
+
514
+ Executes custom checkout of the priority payment method.
515
+
516
+ Some payment methods, such as Bolt, can use their own checkout
517
+ with autofilled customers data, to make checkout passing process
518
+ easier and faster for customers with Bolt account.
519
+
520
+ ```js
521
+ await service.executePaymentMethodCheckout({
522
+ methodId: 'bolt',
523
+ fallback: () => {},
524
+ });
525
+ ```
526
+
527
+ #### Parameters
528
+
529
+ | Name | Type | Description |
530
+ | :------ | :------ | :------ |
531
+ | `options?` | [`ExecutePaymentMethodCheckoutOptions`](../interfaces/ExecutePaymentMethodCheckoutOptions.md) | Options for executing payment method checkout. |
532
+
533
+ #### Returns
534
+
535
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
536
+
537
+ A promise that resolves to the current state.
538
+
539
+ ___
540
+
541
+ ### executeSpamCheck
542
+
543
+ ▸ **executeSpamCheck**(): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
544
+
545
+ Verifies whether the current checkout is created by a human.
546
+
547
+ Note: this method will do the initialization, therefore you do not
548
+ need to call `CheckoutService#initializeSpamProtection`
549
+ before calling this method.
550
+
551
+ With spam protection enabled, the customer has to be verified as
552
+ a human. The order creation will fail if spam protection
553
+ is enabled but verification fails. You should call this method before
554
+ `submitOrder` method is called (i.e.: when the shopper
555
+ first gets to the payment step).
556
+
557
+ **Note**: You need to enable Google ReCAPTCHA bot protection in your Checkout Settings.
558
+
559
+ ```js
560
+ await service.executeSpamCheck();
561
+ ```
562
+
563
+ #### Returns
564
+
565
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
566
+
567
+ A promise that resolves to the current state.
568
+
569
+ ___
570
+
571
+ ### finalizeOrderIfNeeded
572
+
573
+ ▸ **finalizeOrderIfNeeded**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
574
+
575
+ Finalizes the submission process for an order.
576
+
577
+ This method is only required for certain hosted payment methods that
578
+ require a customer to enter their credit card details on their website.
579
+ You need to call this method once the customer has redirected back to
580
+ checkout in order to complete the checkout process.
581
+
582
+ If the method is called before order finalization is required or for a
583
+ payment method that does not require order finalization, an error will be
584
+ thrown. Conversely, if the method is called successfully, you should
585
+ immediately redirect the customer to the order confirmation page.
586
+
587
+ ```js
588
+ try {
589
+ await service.finalizeOrderIfNeeded();
590
+
591
+ window.location.assign('/order-confirmation');
592
+ } catch (error) {
593
+ if (error.type !== 'order_finalization_not_required') {
594
+ throw error;
595
+ }
596
+ }
597
+ ```
598
+
599
+ **`throws`** `OrderFinalizationNotRequiredError` error if order finalization
600
+ is not required for the current order at the time of execution.
601
+
602
+ #### Parameters
603
+
604
+ | Name | Type | Description |
605
+ | :------ | :------ | :------ |
606
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for finalizing the current order. |
607
+
608
+ #### Returns
609
+
610
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
611
+
612
+ A promise that resolves to the current state.
613
+
614
+ ___
615
+
616
+ ### getState
617
+
618
+ ▸ **getState**(): [`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)
619
+
620
+ Returns a snapshot of the current checkout state.
621
+
622
+ The method returns a new instance every time there is a change in the
623
+ checkout state. You can query the state by calling any of its getter
624
+ methods.
625
+
626
+ ```js
627
+ const state = service.getState();
628
+
629
+ console.log(state.data.getOrder());
630
+ console.log(state.errors.getSubmitOrderError());
631
+ console.log(state.statuses.isSubmittingOrder());
632
+ ```
633
+
634
+ #### Returns
635
+
636
+ [`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)
637
+
638
+ The current customer's checkout state
639
+
640
+ ___
641
+
642
+ ### initializeCustomer
643
+
644
+ ▸ **initializeCustomer**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
645
+
646
+ Initializes the sign-in step of a checkout process.
647
+
648
+ Some payment methods, such as Amazon, have their own sign-in flow. In
649
+ order to support them, this method must be called.
650
+
651
+ ```js
652
+ await service.initializeCustomer({
653
+ methodId: 'amazon',
654
+ amazon: {
655
+ container: 'signInButton',
656
+ },
657
+ });
658
+ ```
659
+
660
+ #### Parameters
661
+
662
+ | Name | Type | Description |
663
+ | :------ | :------ | :------ |
664
+ | `options?` | [`CustomerInitializeOptions`](../interfaces/CustomerInitializeOptions.md) | Options for initializing the customer step of checkout. |
665
+
666
+ #### Returns
667
+
668
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
669
+
670
+ A promise that resolves to the current state.
671
+
672
+ ___
673
+
674
+ ### initializePayment
675
+
676
+ ▸ **initializePayment**(`options`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
677
+
678
+ Initializes the payment step of a checkout process.
679
+
680
+ Before a payment method can accept payment details, it must first be
681
+ initialized. Some payment methods require you to provide additional
682
+ initialization options. For example, Amazon requires a container ID in
683
+ order to initialize their payment widget.
684
+
685
+ ```js
686
+ await service.initializePayment({
687
+ methodId: 'amazon',
688
+ amazon: {
689
+ container: 'walletWidget',
690
+ },
691
+ });
692
+ ```
693
+
694
+ #### Parameters
695
+
696
+ | Name | Type | Description |
697
+ | :------ | :------ | :------ |
698
+ | `options` | [`PaymentInitializeOptions`](../interfaces/PaymentInitializeOptions.md) | Options for initializing the payment step of checkout. |
699
+
700
+ #### Returns
701
+
702
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
703
+
704
+ A promise that resolves to the current state.
705
+
706
+ ___
707
+
708
+ ### initializeShipping
709
+
710
+ ▸ **initializeShipping**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
711
+
712
+ Initializes the shipping step of a checkout process.
713
+
714
+ Some payment methods, such as Amazon, can provide shipping information to
715
+ be used for checkout. In order to support them, this method must be
716
+ called.
717
+
718
+ ```js
719
+ await service.initializeShipping({
720
+ methodId: 'amazon',
721
+ amazon: {
722
+ container: 'addressBook',
723
+ },
724
+ });
725
+ ```
726
+
727
+ #### Parameters
728
+
729
+ | Name | Type | Description |
730
+ | :------ | :------ | :------ |
731
+ | `options?` | [`ShippingInitializeOptions`](../interfaces/ShippingInitializeOptions.md)<`Object`\> | Options for initializing the shipping step of checkout. |
732
+
733
+ #### Returns
734
+
735
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
736
+
737
+ A promise that resolves to the current state.
738
+
739
+ ___
740
+
741
+ ### initializeSpamProtection
742
+
743
+ ▸ **initializeSpamProtection**(`options`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
744
+
745
+ Initializes the spam protection for order creation.
746
+
747
+ Note: Use `CheckoutService#executeSpamCheck` instead.
748
+ You do not need to call this method before calling
749
+ `CheckoutService#executeSpamCheck`.
750
+
751
+ With spam protection enabled, the customer has to be verified as
752
+ a human. The order creation will fail if spam protection
753
+ is enabled but verification fails.
754
+
755
+ ```js
756
+ await service.initializeSpamProtection();
757
+ ```
758
+
759
+ **`deprecated`** - Use CheckoutService#executeSpamCheck instead.
760
+
761
+ #### Parameters
762
+
763
+ | Name | Type | Description |
764
+ | :------ | :------ | :------ |
765
+ | `options` | [`SpamProtectionOptions`](../interfaces/SpamProtectionOptions.md) | Options for initializing spam protection. |
766
+
767
+ #### Returns
768
+
769
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
770
+
771
+ A promise that resolves to the current state.
772
+
773
+ ___
774
+
775
+ ### loadBillingAddressFields
776
+
777
+ ▸ **loadBillingAddressFields**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
778
+
779
+ Loads a set of form fields that should be presented to customers in order
780
+ to capture their billing address.
781
+
782
+ Once the method has been executed successfully, you can call
783
+ `CheckoutStoreSelector#getBillingAddressFields` to retrieve the set of
784
+ form fields.
785
+
786
+ ```js
787
+ const state = service.loadBillingAddressFields();
788
+
789
+ console.log(state.data.getBillingAddressFields('US'));
790
+ ```
791
+
792
+ #### Parameters
793
+
794
+ | Name | Type | Description |
795
+ | :------ | :------ | :------ |
796
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the billing address form fields. |
797
+
798
+ #### Returns
799
+
800
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
801
+
802
+ A promise that resolves to the current state.
803
+
804
+ ___
805
+
806
+ ### loadBillingCountries
807
+
808
+ ▸ **loadBillingCountries**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
809
+
810
+ Loads a list of countries available for billing.
811
+
812
+ Once you make a successful request, you will be able to retrieve the list
813
+ of countries by calling `CheckoutStoreSelector#getBillingCountries`.
814
+
815
+ ```js
816
+ const state = await service.loadBillingCountries();
817
+
818
+ console.log(state.data.getBillingCountries());
819
+ ```
820
+
821
+ #### Parameters
822
+
823
+ | Name | Type | Description |
824
+ | :------ | :------ | :------ |
825
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the available billing countries. |
826
+
827
+ #### Returns
828
+
829
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
830
+
831
+ A promise that resolves to the current state.
832
+
833
+ ___
834
+
835
+ ### loadCheckout
836
+
837
+ ▸ **loadCheckout**(`id?`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
838
+
839
+ Loads the current checkout.
840
+
841
+ This method can only be called if there is an active checkout. Also, it
842
+ can only retrieve data that belongs to the current customer. When it is
843
+ successfully executed, you can retrieve the data by calling
844
+ `CheckoutStoreSelector#getCheckout`.
845
+
846
+ ```js
847
+ const state = await service.loadCheckout('0cfd6c06-57c3-4e29-8d7a-de55cc8a9052');
848
+
849
+ console.log(state.data.getCheckout());
850
+ ```
851
+
852
+ #### Parameters
853
+
854
+ | Name | Type | Description |
855
+ | :------ | :------ | :------ |
856
+ | `id?` | `string` | The identifier of the checkout to load, or the default checkout if not provided. |
857
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<[`CheckoutParams`](../interfaces/CheckoutParams.md)\> | Options for loading the current checkout. |
858
+
859
+ #### Returns
860
+
861
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
862
+
863
+ A promise that resolves to the current state.
864
+
865
+ ___
866
+
867
+ ### loadInstruments
868
+
869
+ ▸ **loadInstruments**(): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
870
+
871
+ Loads a list of payment instruments associated with a customer.
872
+
873
+ Once the method has been called successfully, you can retrieve the list
874
+ of payment instruments by calling `CheckoutStoreSelector#getInstruments`.
875
+ If the customer does not have any payment instruments on record, i.e.:
876
+ credit card, you will get an empty list instead.
877
+
878
+ ```js
879
+ const state = service.loadInstruments();
880
+
881
+ console.log(state.data.getInstruments());
882
+ ```
883
+
884
+ #### Returns
885
+
886
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
887
+
888
+ A promise that resolves to the current state.
889
+
890
+ ___
891
+
892
+ ### loadOrder
893
+
894
+ ▸ **loadOrder**(`orderId`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
895
+
896
+ Loads an order by an id.
897
+
898
+ The method can only retrieve an order if the order belongs to the current
899
+ customer. If it is successfully executed, the data can be retrieved by
900
+ calling `CheckoutStoreSelector#getOrder`.
901
+
902
+ ```js
903
+ const state = await service.loadOrder(123);
904
+
905
+ console.log(state.data.getOrder());
906
+ ```
907
+
908
+ #### Parameters
909
+
910
+ | Name | Type | Description |
911
+ | :------ | :------ | :------ |
912
+ | `orderId` | `number` | The identifier of the order to load. |
913
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the order. |
914
+
915
+ #### Returns
916
+
917
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
918
+
919
+ A promise that resolves to the current state.
920
+
921
+ ___
922
+
923
+ ### loadPaymentMethods
924
+
925
+ ▸ **loadPaymentMethods**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
926
+
927
+ Loads a list of payment methods available for checkout.
928
+
929
+ If a customer enters their payment details before navigating to the
930
+ checkout page (i.e.: using PayPal checkout button on the cart page), only
931
+ one payment method will be available for the customer - the selected
932
+ payment method. Otherwise, by default, all payment methods configured by
933
+ the merchant will be available for the customer.
934
+
935
+ Once the method is executed successfully, you can call
936
+ `CheckoutStoreSelector#getPaymentMethods` to retrieve the list of payment
937
+ methods.
938
+
939
+ ```js
940
+ const state = service.loadPaymentMethods();
941
+
942
+ console.log(state.data.getPaymentMethods());
943
+ ```
944
+
945
+ #### Parameters
946
+
947
+ | Name | Type | Description |
948
+ | :------ | :------ | :------ |
949
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the payment methods that are available to the current customer. |
950
+
951
+ #### Returns
952
+
953
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
954
+
955
+ A promise that resolves to the current state.
956
+
957
+ ___
958
+
959
+ ### loadPickupOptions
960
+
961
+ ▸ **loadPickupOptions**(`query`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
962
+
963
+ Loads a list of pickup options for a given criteria.
964
+
965
+ ```js
966
+ const consignmentId = '1';
967
+ const searchArea = {
968
+ radius: {
969
+ value: 1.4,
970
+ unit: 'KM'
971
+ },
972
+ coordinates: {
973
+ latitude: 1.4,
974
+ longitude: 0
975
+ },
976
+ };
977
+ const state = await service.loadPickupOptions({ consignmentId, searchArea });
978
+
979
+ console.log(state.data.getPickupOptions(consignmentId, searchArea));
980
+ ```
981
+
982
+ **`alpha`**
983
+
984
+ #### Parameters
985
+
986
+ | Name | Type |
987
+ | :------ | :------ |
988
+ | `query` | [`PickupOptionRequestBody`](../interfaces/PickupOptionRequestBody.md) |
989
+
990
+ #### Returns
991
+
992
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
993
+
994
+ A promise that resolves to the current state.
995
+
996
+ ___
997
+
998
+ ### loadShippingAddressFields
999
+
1000
+ ▸ **loadShippingAddressFields**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1001
+
1002
+ Loads a set of form fields that should be presented to customers in order
1003
+ to capture their shipping address.
1004
+
1005
+ Once the method has been executed successfully, you can call
1006
+ `CheckoutStoreSelector#getShippingAddressFields` to retrieve the set of
1007
+ form fields.
1008
+
1009
+ ```js
1010
+ const state = service.loadShippingAddressFields();
1011
+
1012
+ console.log(state.data.getShippingAddressFields('US'));
1013
+ ```
1014
+
1015
+ #### Parameters
1016
+
1017
+ | Name | Type | Description |
1018
+ | :------ | :------ | :------ |
1019
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the shipping address form fields. |
1020
+
1021
+ #### Returns
1022
+
1023
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1024
+
1025
+ A promise that resolves to the current state.
1026
+
1027
+ ___
1028
+
1029
+ ### loadShippingCountries
1030
+
1031
+ ▸ **loadShippingCountries**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1032
+
1033
+ Loads a list of countries available for shipping.
1034
+
1035
+ The list is determined based on the shipping zones configured by a
1036
+ merchant. Once you make a successful call, you will be able to retrieve
1037
+ the list of available shipping countries by calling
1038
+ `CheckoutStoreSelector#getShippingCountries`.
1039
+
1040
+ ```js
1041
+ const state = await service.loadShippingCountries();
1042
+
1043
+ console.log(state.data.getShippingCountries());
1044
+ ```
1045
+
1046
+ #### Parameters
1047
+
1048
+ | Name | Type | Description |
1049
+ | :------ | :------ | :------ |
1050
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the available shipping countries. |
1051
+
1052
+ #### Returns
1053
+
1054
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1055
+
1056
+ A promise that resolves to the current state.
1057
+
1058
+ ___
1059
+
1060
+ ### loadShippingOptions
1061
+
1062
+ ▸ **loadShippingOptions**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1063
+
1064
+ Loads a list of shipping options available for checkout.
1065
+
1066
+ Available shipping options can only be determined once a customer
1067
+ provides their shipping address. If the method is executed successfully,
1068
+ `CheckoutStoreSelector#getShippingOptions` can be called to retrieve the
1069
+ list of shipping options.
1070
+
1071
+ ```js
1072
+ const state = await service.loadShippingOptions();
1073
+
1074
+ console.log(state.data.getShippingOptions());
1075
+ ```
1076
+
1077
+ #### Parameters
1078
+
1079
+ | Name | Type | Description |
1080
+ | :------ | :------ | :------ |
1081
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the available shipping options. |
1082
+
1083
+ #### Returns
1084
+
1085
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1086
+
1087
+ A promise that resolves to the current state.
1088
+
1089
+ ___
1090
+
1091
+ ### notifyState
1092
+
1093
+ ▸ **notifyState**(): `void`
1094
+
1095
+ Notifies all subscribers with the current state.
1096
+
1097
+ When this method gets called, the subscribers get called regardless if
1098
+ they have any filters applied.
1099
+
1100
+ #### Returns
1101
+
1102
+ `void`
1103
+
1104
+ ___
1105
+
1106
+ ### removeCoupon
1107
+
1108
+ ▸ **removeCoupon**(`code`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1109
+
1110
+ Removes a coupon code from the current checkout.
1111
+
1112
+ Once the coupon code gets removed, the quote for the current checkout will
1113
+ be adjusted accordingly.
1114
+
1115
+ ```js
1116
+ await service.removeCoupon('COUPON');
1117
+ ```
1118
+
1119
+ #### Parameters
1120
+
1121
+ | Name | Type | Description |
1122
+ | :------ | :------ | :------ |
1123
+ | `code` | `string` | The coupon code to remove from the current checkout. |
1124
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for removing the coupon code. |
1125
+
1126
+ #### Returns
1127
+
1128
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1129
+
1130
+ A promise that resolves to the current state.
1131
+
1132
+ ___
1133
+
1134
+ ### removeGiftCertificate
1135
+
1136
+ ▸ **removeGiftCertificate**(`code`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1137
+
1138
+ Removes a gift certificate from an order.
1139
+
1140
+ Once the gift certificate gets removed, the quote for the current
1141
+ checkout will be adjusted accordingly.
1142
+
1143
+ ```js
1144
+ await service.removeGiftCertificate('GIFT_CERTIFICATE');
1145
+ ```
1146
+
1147
+ #### Parameters
1148
+
1149
+ | Name | Type | Description |
1150
+ | :------ | :------ | :------ |
1151
+ | `code` | `string` | The gift certificate to remove from the current checkout. |
1152
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for removing the gift certificate. |
1153
+
1154
+ #### Returns
1155
+
1156
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1157
+
1158
+ A promise that resolves to the current state.
1159
+
1160
+ ___
1161
+
1162
+ ### selectConsignmentShippingOption
1163
+
1164
+ ▸ **selectConsignmentShippingOption**(`consignmentId`, `shippingOptionId`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1165
+
1166
+ Selects a shipping option for a given consignment.
1167
+
1168
+ Note: this is used when items need to be shipped to multiple addresses,
1169
+ for single shipping address, use `CheckoutService#updateShippingAddress`.
1170
+
1171
+ If a shipping option has an additional cost, the quote for the current
1172
+ order will be adjusted once the option is selected.
1173
+
1174
+ ```js
1175
+ const state = await service.selectConsignmentShippingOption(consignmentId, optionId);
1176
+
1177
+ console.log(state.data.getConsignments());
1178
+ ```
1179
+
1180
+ #### Parameters
1181
+
1182
+ | Name | Type | Description |
1183
+ | :------ | :------ | :------ |
1184
+ | `consignmentId` | `string` | The identified of the consignment to be updated. |
1185
+ | `shippingOptionId` | `string` | The identifier of the shipping option to select. |
1186
+ | `options?` | [`ShippingRequestOptions`](../interfaces/ShippingRequestOptions.md)<`Object`\> | Options for selecting the shipping option. |
1187
+
1188
+ #### Returns
1189
+
1190
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1191
+
1192
+ A promise that resolves to the current state.
1193
+
1194
+ ___
1195
+
1196
+ ### selectShippingOption
1197
+
1198
+ ▸ **selectShippingOption**(`shippingOptionId`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1199
+
1200
+ Selects a shipping option for the current address.
1201
+
1202
+ If a shipping option has an additional cost, the quote for the current
1203
+ order will be adjusted once the option is selected.
1204
+
1205
+ ```js
1206
+ const state = await service.selectShippingOption('address-id', 'shipping-option-id');
1207
+
1208
+ console.log(state.data.getSelectedShippingOption());
1209
+ ```
1210
+
1211
+ #### Parameters
1212
+
1213
+ | Name | Type | Description |
1214
+ | :------ | :------ | :------ |
1215
+ | `shippingOptionId` | `string` | The identifier of the shipping option to select. |
1216
+ | `options?` | [`ShippingRequestOptions`](../interfaces/ShippingRequestOptions.md)<`Object`\> | Options for selecting the shipping option. |
1217
+
1218
+ #### Returns
1219
+
1220
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1221
+
1222
+ A promise that resolves to the current state.
1223
+
1224
+ ___
1225
+
1226
+ ### sendSignInEmail
1227
+
1228
+ ▸ **sendSignInEmail**(`signInEmailRequest`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1229
+
1230
+ Sends a email that contains a single-use sign-in link. When a valid links is clicked,
1231
+ signs in the customer without requiring any password, redirecting them to the account page if no redirectUrl is provided.
1232
+
1233
+ ```js
1234
+ checkoutService.sendSignInEmail({ email: 'foo@bar.com', redirectUrl: 'checkout' });
1235
+ ```
1236
+
1237
+ #### Parameters
1238
+
1239
+ | Name | Type | Description |
1240
+ | :------ | :------ | :------ |
1241
+ | `signInEmailRequest` | [`SignInEmailRequestBody`](../interfaces/SignInEmailRequestBody.md) | The sign-in email request values. |
1242
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for the send email request. |
1243
+
1244
+ #### Returns
1245
+
1246
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1247
+
1248
+ A promise that resolves to the current state.
1249
+
1250
+ ___
1251
+
1252
+ ### signInCustomer
1253
+
1254
+ ▸ **signInCustomer**(`credentials`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1255
+
1256
+ Signs into a customer's registered account.
1257
+
1258
+ Once the customer is signed in successfully, the checkout state will be
1259
+ populated with information associated with the customer, such as their
1260
+ saved addresses. You can call `CheckoutStoreSelector#getCustomer` to
1261
+ retrieve the data.
1262
+
1263
+ ```js
1264
+ const state = await service.signInCustomer({
1265
+ email: 'foo@bar.com',
1266
+ password: 'password123',
1267
+ });
1268
+
1269
+ console.log(state.data.getCustomer());
1270
+ ```
1271
+
1272
+ #### Parameters
1273
+
1274
+ | Name | Type | Description |
1275
+ | :------ | :------ | :------ |
1276
+ | `credentials` | [`CustomerCredentials`](../interfaces/CustomerCredentials.md) | The credentials to be used for signing in the customer. |
1277
+ | `options?` | [`CustomerRequestOptions`](../interfaces/CustomerRequestOptions.md) | Options for signing in the customer. |
1278
+
1279
+ #### Returns
1280
+
1281
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1282
+
1283
+ A promise that resolves to the current state.
1284
+
1285
+ ___
1286
+
1287
+ ### signOutCustomer
1288
+
1289
+ ▸ **signOutCustomer**(`options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1290
+
1291
+ Signs out the current customer if they are previously signed in.
1292
+
1293
+ Once the customer is successfully signed out, the checkout state will be
1294
+ reset automatically.
1295
+
1296
+ ```js
1297
+ const state = await service.signOutCustomer();
1298
+
1299
+ // The returned object should not contain information about the previously signed-in customer.
1300
+ console.log(state.data.getCustomer());
1301
+ ```
1302
+
1303
+ When a store has "Allow customers to access their cart across multiple devices" enabled, signing out
1304
+ will remove the cart/checkout data from the current session. An error with type="checkout_not_available" will be thrown.
1305
+
1306
+ ```js
1307
+ try {
1308
+ await service.signOutCustomer();
1309
+ } catch (error) {
1310
+ if (error.type === 'checkout_not_available') {
1311
+ window.top.location.assign('/');
1312
+ }
1313
+ }
1314
+ ```
1315
+
1316
+ #### Parameters
1317
+
1318
+ | Name | Type | Description |
1319
+ | :------ | :------ | :------ |
1320
+ | `options?` | [`CustomerRequestOptions`](../interfaces/CustomerRequestOptions.md) | Options for signing out the customer. |
1321
+
1322
+ #### Returns
1323
+
1324
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1325
+
1326
+ A promise that resolves to the current state.
1327
+
1328
+ ___
1329
+
1330
+ ### submitOrder
1331
+
1332
+ ▸ **submitOrder**(`payload`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1333
+
1334
+ Submits an order, thereby completing a checkout process.
1335
+
1336
+ Before you can submit an order, you must initialize the payment method
1337
+ chosen by the customer by calling `CheckoutService#initializePayment`.
1338
+
1339
+ ```js
1340
+ await service.initializePayment({ methodId: 'braintree' });
1341
+ await service.submitOrder({
1342
+ payment: {
1343
+ methodId: 'braintree',
1344
+ paymentData: {
1345
+ ccExpiry: { month: 10, year: 20 },
1346
+ ccName: 'BigCommerce',
1347
+ ccNumber: '4111111111111111',
1348
+ ccCvv: 123,
1349
+ },
1350
+ },
1351
+ });
1352
+ ```
1353
+
1354
+ You are not required to include `paymentData` if the order does not
1355
+ require additional payment details. For example, the customer has already
1356
+ entered their payment details on the cart page using one of the hosted
1357
+ payment methods, such as PayPal. Or the customer has applied a gift
1358
+ certificate that exceeds the grand total amount.
1359
+
1360
+ If the order is submitted successfully, you can retrieve the newly
1361
+ created order by calling `CheckoutStoreSelector#getOrder`.
1362
+
1363
+ ```js
1364
+ const state = await service.submitOrder(payload);
1365
+
1366
+ console.log(state.data.getOrder());
1367
+ ```
1368
+
1369
+ #### Parameters
1370
+
1371
+ | Name | Type | Description |
1372
+ | :------ | :------ | :------ |
1373
+ | `payload` | [`OrderRequestBody`](../interfaces/OrderRequestBody.md) | The request payload to submit for the current order. |
1374
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for submitting the current order. |
1375
+
1376
+ #### Returns
1377
+
1378
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1379
+
1380
+ A promise that resolves to the current state.
1381
+
1382
+ ___
1383
+
1384
+ ### subscribe
1385
+
1386
+ ▸ **subscribe**(`subscriber`, ...`filters`): () => `void`
1387
+
1388
+ Subscribes to any changes to the current state.
1389
+
1390
+ The method registers a callback function and executes it every time there
1391
+ is a change in the checkout state.
1392
+
1393
+ ```js
1394
+ service.subscribe(state => {
1395
+ console.log(state.data.getCart());
1396
+ });
1397
+ ```
1398
+
1399
+ The method can be configured to notify subscribers only regarding
1400
+ relevant changes, by providing a filter function.
1401
+
1402
+ ```js
1403
+ const filter = state => state.data.getCart();
1404
+
1405
+ // Only trigger the subscriber when the cart changes.
1406
+ service.subscribe(state => {
1407
+ console.log(state.data.getCart())
1408
+ }, filter);
1409
+ ```
1410
+
1411
+ #### Parameters
1412
+
1413
+ | Name | Type | Description |
1414
+ | :------ | :------ | :------ |
1415
+ | `subscriber` | (`state`: [`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)) => `void` | The function to subscribe to state changes. |
1416
+ | `...filters` | (`state`: [`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)) => `any`[] | One or more functions to filter out irrelevant state changes. If more than one function is provided, the subscriber will only be triggered if all conditions are met. |
1417
+
1418
+ #### Returns
1419
+
1420
+ `fn`
1421
+
1422
+ A function, if called, will unsubscribe the subscriber.
1423
+
1424
+ ▸ (): `void`
1425
+
1426
+ Subscribes to any changes to the current state.
1427
+
1428
+ The method registers a callback function and executes it every time there
1429
+ is a change in the checkout state.
1430
+
1431
+ ```js
1432
+ service.subscribe(state => {
1433
+ console.log(state.data.getCart());
1434
+ });
1435
+ ```
1436
+
1437
+ The method can be configured to notify subscribers only regarding
1438
+ relevant changes, by providing a filter function.
1439
+
1440
+ ```js
1441
+ const filter = state => state.data.getCart();
1442
+
1443
+ // Only trigger the subscriber when the cart changes.
1444
+ service.subscribe(state => {
1445
+ console.log(state.data.getCart())
1446
+ }, filter);
1447
+ ```
1448
+
1449
+ ##### Returns
1450
+
1451
+ `void`
1452
+
1453
+ A function, if called, will unsubscribe the subscriber.
1454
+
1455
+ ___
1456
+
1457
+ ### unassignItemsToAddress
1458
+
1459
+ ▸ **unassignItemsToAddress**(`consignment`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1460
+
1461
+ Convenience method that unassigns items from a specific shipping address.
1462
+
1463
+ Note: this method finds an existing consignment that matches the provided address
1464
+ and unassigns the specified items. If the consignment ends up with no line items
1465
+ after the unassignment, it will be deleted.
1466
+
1467
+ #### Parameters
1468
+
1469
+ | Name | Type | Description |
1470
+ | :------ | :------ | :------ |
1471
+ | `consignment` | [`ConsignmentAssignmentRequestBody`](../README.md#consignmentassignmentrequestbody) | The consignment data that will be used. |
1472
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for the request |
1473
+
1474
+ #### Returns
1475
+
1476
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1477
+
1478
+ A promise that resolves to the current state.
1479
+
1480
+ ___
1481
+
1482
+ ### updateBillingAddress
1483
+
1484
+ ▸ **updateBillingAddress**(`address`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1485
+
1486
+ Updates the billing address for the current checkout.
1487
+
1488
+ A customer must provide their billing address before they can proceed to
1489
+ pay for their order.
1490
+
1491
+ You can submit an address that is partially complete. The address does
1492
+ not get validated until you submit the order.
1493
+
1494
+ ```js
1495
+ const state = await service.updateBillingAddress(address);
1496
+
1497
+ console.log(state.data.getBillingAddress());
1498
+ ```
1499
+
1500
+ #### Parameters
1501
+
1502
+ | Name | Type | Description |
1503
+ | :------ | :------ | :------ |
1504
+ | `address` | `Partial`<[`BillingAddressRequestBody`](../interfaces/BillingAddressRequestBody.md)\> | The address to be used for billing. |
1505
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for updating the billing address. |
1506
+
1507
+ #### Returns
1508
+
1509
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1510
+
1511
+ A promise that resolves to the current state.
1512
+
1513
+ ___
1514
+
1515
+ ### updateCheckout
1516
+
1517
+ ▸ **updateCheckout**(`payload`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1518
+
1519
+ Updates specific properties of the current checkout.
1520
+
1521
+ ```js
1522
+ const state = await service.updateCheckout(checkout);
1523
+
1524
+ console.log(state.data.getCheckout());
1525
+ ```
1526
+
1527
+ #### Parameters
1528
+
1529
+ | Name | Type | Description |
1530
+ | :------ | :------ | :------ |
1531
+ | `payload` | [`CheckoutRequestBody`](../interfaces/CheckoutRequestBody.md) | The checkout properties to be updated. |
1532
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for loading the current checkout. |
1533
+
1534
+ #### Returns
1535
+
1536
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1537
+
1538
+ A promise that resolves to the current state.
1539
+
1540
+ ___
1541
+
1542
+ ### updateConsignment
1543
+
1544
+ ▸ **updateConsignment**(`consignment`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1545
+
1546
+ Updates a specific consignment.
1547
+
1548
+ Note: this is used when items need to be shipped to multiple addresses,
1549
+ for single shipping address, use `CheckoutService#selectShippingOption`.
1550
+
1551
+ When a shipping address for a consignment is updated, an updated list of
1552
+ shipping options will become available for the consignment, unless no
1553
+ options are available. If the update is successful, you can call
1554
+ `CheckoutStoreSelector#getConsignments` to retrieve updated list of
1555
+ consignments.
1556
+
1557
+ Beware that if the updated consignment includes all line items from another
1558
+ consignment, that consignment will be deleted as a valid consignment must
1559
+ include at least one valid line item.
1560
+
1561
+ If the shipping address changes and the selected shipping option becomes
1562
+ unavailable for the updated address, the shipping option will be
1563
+ deselected.
1564
+
1565
+ You can submit an address that is partially complete. The address does
1566
+ not get validated until you submit the order.
1567
+
1568
+ ```js
1569
+ const state = await service.updateConsignment(consignment);
1570
+
1571
+ console.log(state.data.getConsignments());
1572
+ ```
1573
+
1574
+ #### Parameters
1575
+
1576
+ | Name | Type | Description |
1577
+ | :------ | :------ | :------ |
1578
+ | `consignment` | [`ConsignmentUpdateRequestBody`](../interfaces/ConsignmentUpdateRequestBody.md) | The consignment data that will be used. |
1579
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for updating the shipping address. |
1580
+
1581
+ #### Returns
1582
+
1583
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1584
+
1585
+ A promise that resolves to the current state.
1586
+
1587
+ ___
1588
+
1589
+ ### updateShippingAddress
1590
+
1591
+ ▸ **updateShippingAddress**(`address`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1592
+
1593
+ Updates the shipping address for the current checkout.
1594
+
1595
+ When a customer updates their shipping address for an order, they will
1596
+ see an updated list of shipping options and the cost for each option,
1597
+ unless no options are available. If the update is successful, you can
1598
+ call `CheckoutStoreSelector#getShippingAddress` to retrieve the address.
1599
+
1600
+ If the shipping address changes and the selected shipping option becomes
1601
+ unavailable for the updated address, the shipping option will be
1602
+ deselected.
1603
+
1604
+ You can submit an address that is partially complete. The address does
1605
+ not get validated until you submit the order.
1606
+
1607
+ ```js
1608
+ const state = await service.updateShippingAddress(address);
1609
+
1610
+ console.log(state.data.getShippingAddress());
1611
+ ```
1612
+
1613
+ #### Parameters
1614
+
1615
+ | Name | Type | Description |
1616
+ | :------ | :------ | :------ |
1617
+ | `address` | `Partial`<[`AddressRequestBody`](../interfaces/AddressRequestBody.md)\> | The address to be used for shipping. |
1618
+ | `options?` | [`ShippingRequestOptions`](../interfaces/ShippingRequestOptions.md)<[`CheckoutParams`](../interfaces/CheckoutParams.md)\> | Options for updating the shipping address. |
1619
+
1620
+ #### Returns
1621
+
1622
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1623
+
1624
+ A promise that resolves to the current state.
1625
+
1626
+ ___
1627
+
1628
+ ### updateSubscriptions
1629
+
1630
+ ▸ **updateSubscriptions**(`subscriptions`, `options?`): `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1631
+
1632
+ Updates the subscriptions associated to an email.
1633
+
1634
+ #### Parameters
1635
+
1636
+ | Name | Type | Description |
1637
+ | :------ | :------ | :------ |
1638
+ | `subscriptions` | [`Subscriptions`](../interfaces/Subscriptions.md) | The email and associated subscriptions to update. |
1639
+ | `options?` | [`RequestOptions`](../interfaces/RequestOptions.md)<`Object`\> | Options for continuing as a guest. |
1640
+
1641
+ #### Returns
1642
+
1643
+ `Promise`<[`CheckoutSelectors`](../interfaces/CheckoutSelectors.md)\>
1644
+
1645
+ A promise that resolves to the current state.