@bigcommerce/checkout-sdk 1.264.0 → 1.265.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,1527 +0,0 @@
1
- [@bigcommerce/checkout-sdk](../README.md) › [CheckoutService](checkoutservice.md)
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
- ## Hierarchy
12
-
13
- * **CheckoutService**
14
-
15
- ## Index
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
- ## Methods
69
-
70
- ### applyCoupon
71
-
72
- ▸ **applyCoupon**(`code`: string, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
73
-
74
- Applies a coupon code to the current checkout.
75
-
76
- Once the coupon code gets applied, the quote for the current checkout will
77
- be adjusted accordingly. The same coupon code cannot be applied more than
78
- once.
79
-
80
- ```js
81
- await service.applyCoupon('COUPON');
82
- ```
83
-
84
- **Parameters:**
85
-
86
- Name | Type | Description |
87
- ------ | ------ | ------ |
88
- `code` | string | The coupon code to apply to the current checkout. |
89
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for applying the coupon code. |
90
-
91
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
92
-
93
- A promise that resolves to the current state.
94
-
95
- ___
96
-
97
- ### applyGiftCertificate
98
-
99
- ▸ **applyGiftCertificate**(`code`: string, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
100
-
101
- Applies a gift certificate to the current checkout.
102
-
103
- Once the gift certificate gets applied, the quote for the current
104
- checkout will be adjusted accordingly.
105
-
106
- ```js
107
- await service.applyGiftCertificate('GIFT_CERTIFICATE');
108
- ```
109
-
110
- **Parameters:**
111
-
112
- Name | Type | Description |
113
- ------ | ------ | ------ |
114
- `code` | string | The gift certificate to apply to the current checkout. |
115
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for applying the gift certificate. |
116
-
117
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
118
-
119
- A promise that resolves to the current state.
120
-
121
- ___
122
-
123
- ### applyStoreCredit
124
-
125
- ▸ **applyStoreCredit**(`useStoreCredit`: boolean, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
126
-
127
- Applies or removes customer's store credit code to the current checkout.
128
-
129
- Once the store credit gets applied, the outstanding balance will be adjusted accordingly.
130
-
131
- ```js
132
- const state = await service.applyStoreCredit(true);
133
-
134
- console.log(state.data.getCheckout().outstandingBalance);
135
- ```
136
-
137
- **Parameters:**
138
-
139
- Name | Type | Description |
140
- ------ | ------ | ------ |
141
- `useStoreCredit` | boolean | - |
142
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for applying store credit. |
143
-
144
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
145
-
146
- A promise that resolves to the current state.
147
-
148
- ___
149
-
150
- ### assignItemsToAddress
151
-
152
- ▸ **assignItemsToAddress**(`consignment`: [ConsignmentAssignmentRequestBody](../README.md#consignmentassignmentrequestbody), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
153
-
154
- Convenience method that assigns items to be shipped to a specific address.
155
-
156
- Note: this method finds an existing consignment that matches the provided address
157
- and assigns the provided items. If no consignment matches the address, a new one
158
- will be created.
159
-
160
- **Parameters:**
161
-
162
- Name | Type | Description |
163
- ------ | ------ | ------ |
164
- `consignment` | [ConsignmentAssignmentRequestBody](../README.md#consignmentassignmentrequestbody) | The consignment data that will be used. |
165
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for the request |
166
-
167
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
168
-
169
- A promise that resolves to the current state.
170
-
171
- ___
172
-
173
- ### clearError
174
-
175
- ▸ **clearError**(`error`: [Error](../interfaces/amazonpaywidgeterror.md#error)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
176
-
177
- Clear errors that have been collected from previous calls.
178
-
179
- ```js
180
- const state = await service.clearError(error);
181
-
182
- console.log(state.errors.getError());
183
- ```
184
-
185
- **Parameters:**
186
-
187
- Name | Type | Description |
188
- ------ | ------ | ------ |
189
- `error` | [Error](../interfaces/amazonpaywidgeterror.md#error) | Specific error object to clear |
190
-
191
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
192
-
193
- A promise that resolves to the current state.
194
-
195
- ___
196
-
197
- ### continueAsGuest
198
-
199
- ▸ **continueAsGuest**(`credentials`: [GuestCredentials](../README.md#guestcredentials), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
200
-
201
- Continues to check out as a guest.
202
-
203
- If your Checkout Settings allow it, your customers could continue the checkout as guests (without signing in).
204
- If you have enabled the checkout setting "Prompt existing accounts to sign in", this information is
205
- exposed as part of the [Customer](../interfaces/customer.md) object.
206
-
207
- Once they provide their email address, it will be stored as
208
- part of their [billing address](../interfaces/billingaddress.md).
209
-
210
- **Parameters:**
211
-
212
- Name | Type | Description |
213
- ------ | ------ | ------ |
214
- `credentials` | [GuestCredentials](../README.md#guestcredentials) | The guest credentials to use, with optional subscriptions. |
215
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for continuing as a guest. |
216
-
217
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
218
-
219
- A promise that resolves to the current state.
220
-
221
- ___
222
-
223
- ### createConsignments
224
-
225
- ▸ **createConsignments**(`consignments`: [ConsignmentsRequestBody](../README.md#consignmentsrequestbody), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
226
-
227
- Creates consignments given a list.
228
-
229
- Note: this is used when items need to be shipped to multiple addresses,
230
- for single shipping address, use `CheckoutService#updateShippingAddress`.
231
-
232
- When consignments are created, an updated list of shipping options will
233
- become available for each consignment, unless no options are available.
234
- If the update is successful, you can call
235
- `CheckoutStoreSelector#getConsignments` to retrieve the updated list of
236
- consignments.'
237
-
238
- Beware that if a consignment includes all line items from another
239
- consignment, that consignment will be deleted as a valid consignment must
240
- include at least one valid line item.
241
-
242
- You can submit an address that is partially complete. The address does
243
- not get validated until you submit the order.
244
-
245
- ```js
246
- const state = await service.createConsignments(consignments);
247
-
248
- console.log(state.data.getConsignments());
249
- ```
250
-
251
- **Parameters:**
252
-
253
- Name | Type | Description |
254
- ------ | ------ | ------ |
255
- `consignments` | [ConsignmentsRequestBody](../README.md#consignmentsrequestbody) | The list of consignments to be created. |
256
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for updating the shipping address. |
257
-
258
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
259
-
260
- A promise that resolves to the current state.
261
-
262
- ___
263
-
264
- ### createCustomerAccount
265
-
266
- ▸ **createCustomerAccount**(`customerAccount`: [CustomerAccountRequestBody](../interfaces/customeraccountrequestbody.md), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
267
-
268
- Creates a customer account.
269
-
270
- **`remarks`**
271
- ```js
272
- checkoutService.createCustomerAccount({
273
- email: 'foo@bar.com',
274
- firstName: 'Foo',
275
- lastName: 'Bar',
276
- password: 'password',
277
- acceptsMarketingEmails: true,
278
- customFields: [],
279
- });
280
- ```
281
- Please note that `createCustomerAccount` is currently in an early stage
282
- of development. Therefore the API is unstable and not ready for public
283
- consumption.
284
-
285
- **`alpha`**
286
-
287
- **Parameters:**
288
-
289
- Name | Type | Description |
290
- ------ | ------ | ------ |
291
- `customerAccount` | [CustomerAccountRequestBody](../interfaces/customeraccountrequestbody.md) | The customer account data. |
292
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for creating customer account. |
293
-
294
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
295
-
296
- A promise that resolves to the current state.
297
-
298
- ___
299
-
300
- ### createCustomerAddress
301
-
302
- ▸ **createCustomerAddress**(`customerAddress`: [CustomerAddressRequestBody](../README.md#customeraddressrequestbody), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
303
-
304
- Creates a customer account address.
305
-
306
- **`remarks`**
307
- ```js
308
- checkoutService.createCustomerAddress({
309
- firstName: 'Foo',
310
- lastName: 'Bar',
311
- address1: '55 Market St',
312
- stateOrProvinceCode: 'CA',
313
- countryCode: 'US',
314
- postalCode: '90110',
315
- customFields: [],
316
- });
317
- ```
318
- Please note that `createCustomerAccountAddress` is currently in an early stage
319
- of development. Therefore the API is unstable and not ready for public
320
- consumption.
321
-
322
- **`alpha`**
323
-
324
- **Parameters:**
325
-
326
- Name | Type | Description |
327
- ------ | ------ | ------ |
328
- `customerAddress` | [CustomerAddressRequestBody](../README.md#customeraddressrequestbody) | The customer account data. |
329
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for creating customer account. |
330
-
331
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
332
-
333
- A promise that resolves to the current state.
334
-
335
- ___
336
-
337
- ### deinitializeCustomer
338
-
339
- ▸ **deinitializeCustomer**(`options?`: [CustomerRequestOptions](../interfaces/customerrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
340
-
341
- De-initializes the sign-in step of a checkout process.
342
-
343
- It should be called once you no longer want to prompt customers to sign
344
- in. It can perform any necessary clean-up behind the scene, i.e.: remove
345
- DOM nodes or event handlers that are attached as a result of customer
346
- initialization.
347
-
348
- ```js
349
- await service.deinitializeCustomer({
350
- methodId: 'amazon',
351
- });
352
- ```
353
-
354
- **Parameters:**
355
-
356
- Name | Type | Description |
357
- ------ | ------ | ------ |
358
- `options?` | [CustomerRequestOptions](../interfaces/customerrequestoptions.md) | Options for deinitializing the customer step of checkout. |
359
-
360
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
361
-
362
- A promise that resolves to the current state.
363
-
364
- ___
365
-
366
- ### deinitializePayment
367
-
368
- ▸ **deinitializePayment**(`options`: [PaymentRequestOptions](../interfaces/paymentrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
369
-
370
- De-initializes the payment step of a checkout process.
371
-
372
- The method should be called once you no longer require a payment method
373
- to be initialized. It can perform any necessary clean-up behind the
374
- scene, i.e.: remove DOM nodes or event handlers that are attached as a
375
- result of payment initialization.
376
-
377
- ```js
378
- await service.deinitializePayment({
379
- methodId: 'amazon',
380
- });
381
- ```
382
-
383
- **Parameters:**
384
-
385
- Name | Type | Description |
386
- ------ | ------ | ------ |
387
- `options` | [PaymentRequestOptions](../interfaces/paymentrequestoptions.md) | Options for deinitializing the payment step of checkout. |
388
-
389
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
390
-
391
- A promise that resolves to the current state.
392
-
393
- ___
394
-
395
- ### deinitializeShipping
396
-
397
- ▸ **deinitializeShipping**(`options?`: [ShippingRequestOptions](../interfaces/shippingrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
398
-
399
- De-initializes the shipping step of a checkout process.
400
-
401
- It should be called once you no longer need to collect shipping details.
402
- It can perform any necessary clean-up behind the scene, i.e.: remove DOM
403
- nodes or event handlers that are attached as a result of shipping
404
- initialization.
405
-
406
- ```js
407
- await service.deinitializeShipping({
408
- methodId: 'amazon',
409
- });
410
- ```
411
-
412
- **Parameters:**
413
-
414
- Name | Type | Description |
415
- ------ | ------ | ------ |
416
- `options?` | [ShippingRequestOptions](../interfaces/shippingrequestoptions.md) | Options for deinitializing the shipping step of checkout. |
417
-
418
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
419
-
420
- A promise that resolves to the current state.
421
-
422
- ___
423
-
424
- ### deleteConsignment
425
-
426
- ▸ **deleteConsignment**(`consignmentId`: string, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
427
-
428
- Deletes a consignment
429
-
430
- ```js
431
- const state = await service.deleteConsignment('55c96cda6f04c');
432
-
433
- console.log(state.data.getConsignments());
434
- ```
435
-
436
- **Parameters:**
437
-
438
- Name | Type | Description |
439
- ------ | ------ | ------ |
440
- `consignmentId` | string | The ID of the consignment to be deleted |
441
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for the consignment delete request |
442
-
443
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
444
-
445
- A promise that resolves to the current state.
446
-
447
- ___
448
-
449
- ### deleteInstrument
450
-
451
- ▸ **deleteInstrument**(`instrumentId`: string): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
452
-
453
- Deletes a payment instrument by an id.
454
-
455
- Once an instrument gets removed, it can no longer be retrieved using
456
- `CheckoutStoreSelector#getInstruments`.
457
-
458
- ```js
459
- const state = service.deleteInstrument('123');
460
-
461
- console.log(state.data.getInstruments());
462
- ```
463
-
464
- **Parameters:**
465
-
466
- Name | Type | Description |
467
- ------ | ------ | ------ |
468
- `instrumentId` | string | The identifier of the payment instrument to delete. |
469
-
470
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
471
-
472
- A promise that resolves to the current state.
473
-
474
- ___
475
-
476
- ### executePaymentMethodCheckout
477
-
478
- ▸ **executePaymentMethodCheckout**(`options?`: [ExecutePaymentMethodCheckoutOptions](../interfaces/executepaymentmethodcheckoutoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
479
-
480
- Executes custom checkout of the priority payment method.
481
-
482
- Some payment methods, such as Bolt, can use their own checkout
483
- with autofilled customers data, to make checkout passing process
484
- easier and faster for customers with Bolt account.
485
-
486
- ```js
487
- await service.executePaymentMethodCheckout({
488
- methodId: 'bolt',
489
- fallback: () => {},
490
- });
491
- ```
492
-
493
- **Parameters:**
494
-
495
- Name | Type | Description |
496
- ------ | ------ | ------ |
497
- `options?` | [ExecutePaymentMethodCheckoutOptions](../interfaces/executepaymentmethodcheckoutoptions.md) | Options for executing payment method checkout. |
498
-
499
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
500
-
501
- A promise that resolves to the current state.
502
-
503
- ___
504
-
505
- ### executeSpamCheck
506
-
507
- ▸ **executeSpamCheck**(): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
508
-
509
- Verifies whether the current checkout is created by a human.
510
-
511
- Note: this method will do the initialization, therefore you do not
512
- need to call `CheckoutService#initializeSpamProtection`
513
- before calling this method.
514
-
515
- With spam protection enabled, the customer has to be verified as
516
- a human. The order creation will fail if spam protection
517
- is enabled but verification fails. You should call this method before
518
- `submitOrder` method is called (i.e.: when the shopper
519
- first gets to the payment step).
520
-
521
- **Note**: You need to enable Google ReCAPTCHA bot protection in your Checkout Settings.
522
-
523
- ```js
524
- await service.executeSpamCheck();
525
- ```
526
-
527
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
528
-
529
- A promise that resolves to the current state.
530
-
531
- ___
532
-
533
- ### finalizeOrderIfNeeded
534
-
535
- ▸ **finalizeOrderIfNeeded**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
536
-
537
- Finalizes the submission process for an order.
538
-
539
- This method is only required for certain hosted payment methods that
540
- require a customer to enter their credit card details on their website.
541
- You need to call this method once the customer has redirected back to
542
- checkout in order to complete the checkout process.
543
-
544
- If the method is called before order finalization is required or for a
545
- payment method that does not require order finalization, an error will be
546
- thrown. Conversely, if the method is called successfully, you should
547
- immediately redirect the customer to the order confirmation page.
548
-
549
- ```js
550
- try {
551
- await service.finalizeOrderIfNeeded();
552
-
553
- window.location.assign('/order-confirmation');
554
- } catch (error) {
555
- if (error.type !== 'order_finalization_not_required') {
556
- throw error;
557
- }
558
- }
559
- ```
560
-
561
- **`throws`** `OrderFinalizationNotRequiredError` error if order finalization
562
- is not required for the current order at the time of execution.
563
-
564
- **Parameters:**
565
-
566
- Name | Type | Description |
567
- ------ | ------ | ------ |
568
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for finalizing the current order. |
569
-
570
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
571
-
572
- A promise that resolves to the current state.
573
-
574
- ___
575
-
576
- ### getState
577
-
578
- ▸ **getState**(): *[CheckoutSelectors](../interfaces/checkoutselectors.md)*
579
-
580
- Returns a snapshot of the current checkout state.
581
-
582
- The method returns a new instance every time there is a change in the
583
- checkout state. You can query the state by calling any of its getter
584
- methods.
585
-
586
- ```js
587
- const state = service.getState();
588
-
589
- console.log(state.data.getOrder());
590
- console.log(state.errors.getSubmitOrderError());
591
- console.log(state.statuses.isSubmittingOrder());
592
- ```
593
-
594
- **Returns:** *[CheckoutSelectors](../interfaces/checkoutselectors.md)*
595
-
596
- The current customer's checkout state
597
-
598
- ___
599
-
600
- ### initializeCustomer
601
-
602
- ▸ **initializeCustomer**(`options?`: [CustomerInitializeOptions](../interfaces/customerinitializeoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
603
-
604
- Initializes the sign-in step of a checkout process.
605
-
606
- Some payment methods, such as Amazon, have their own sign-in flow. In
607
- order to support them, this method must be called.
608
-
609
- ```js
610
- await service.initializeCustomer({
611
- methodId: 'amazon',
612
- amazon: {
613
- container: 'signInButton',
614
- },
615
- });
616
- ```
617
-
618
- **Parameters:**
619
-
620
- Name | Type | Description |
621
- ------ | ------ | ------ |
622
- `options?` | [CustomerInitializeOptions](../interfaces/customerinitializeoptions.md) | Options for initializing the customer step of checkout. |
623
-
624
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
625
-
626
- A promise that resolves to the current state.
627
-
628
- ___
629
-
630
- ### initializePayment
631
-
632
- ▸ **initializePayment**(`options`: [PaymentInitializeOptions](../interfaces/paymentinitializeoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
633
-
634
- Initializes the payment step of a checkout process.
635
-
636
- Before a payment method can accept payment details, it must first be
637
- initialized. Some payment methods require you to provide additional
638
- initialization options. For example, Amazon requires a container ID in
639
- order to initialize their payment widget.
640
-
641
- ```js
642
- await service.initializePayment({
643
- methodId: 'amazon',
644
- amazon: {
645
- container: 'walletWidget',
646
- },
647
- });
648
- ```
649
-
650
- **Parameters:**
651
-
652
- Name | Type | Description |
653
- ------ | ------ | ------ |
654
- `options` | [PaymentInitializeOptions](../interfaces/paymentinitializeoptions.md) | Options for initializing the payment step of checkout. |
655
-
656
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
657
-
658
- A promise that resolves to the current state.
659
-
660
- ___
661
-
662
- ### initializeShipping
663
-
664
- ▸ **initializeShipping**(`options?`: [ShippingInitializeOptions](../interfaces/shippinginitializeoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
665
-
666
- Initializes the shipping step of a checkout process.
667
-
668
- Some payment methods, such as Amazon, can provide shipping information to
669
- be used for checkout. In order to support them, this method must be
670
- called.
671
-
672
- ```js
673
- await service.initializeShipping({
674
- methodId: 'amazon',
675
- amazon: {
676
- container: 'addressBook',
677
- },
678
- });
679
- ```
680
-
681
- **Parameters:**
682
-
683
- Name | Type | Description |
684
- ------ | ------ | ------ |
685
- `options?` | [ShippingInitializeOptions](../interfaces/shippinginitializeoptions.md) | Options for initializing the shipping step of checkout. |
686
-
687
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
688
-
689
- A promise that resolves to the current state.
690
-
691
- ___
692
-
693
- ### initializeSpamProtection
694
-
695
- ▸ **initializeSpamProtection**(`options`: [SpamProtectionOptions](../interfaces/spamprotectionoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
696
-
697
- Initializes the spam protection for order creation.
698
-
699
- Note: Use `CheckoutService#executeSpamCheck` instead.
700
- You do not need to call this method before calling
701
- `CheckoutService#executeSpamCheck`.
702
-
703
- With spam protection enabled, the customer has to be verified as
704
- a human. The order creation will fail if spam protection
705
- is enabled but verification fails.
706
-
707
- ```js
708
- await service.initializeSpamProtection();
709
- ```
710
-
711
- **`deprecated`** - Use CheckoutService#executeSpamCheck instead.
712
-
713
- **Parameters:**
714
-
715
- Name | Type | Description |
716
- ------ | ------ | ------ |
717
- `options` | [SpamProtectionOptions](../interfaces/spamprotectionoptions.md) | Options for initializing spam protection. |
718
-
719
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
720
-
721
- A promise that resolves to the current state.
722
-
723
- ___
724
-
725
- ### loadBillingAddressFields
726
-
727
- ▸ **loadBillingAddressFields**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
728
-
729
- Loads a set of form fields that should be presented to customers in order
730
- to capture their billing address.
731
-
732
- Once the method has been executed successfully, you can call
733
- `CheckoutStoreSelector#getBillingAddressFields` to retrieve the set of
734
- form fields.
735
-
736
- ```js
737
- const state = service.loadBillingAddressFields();
738
-
739
- console.log(state.data.getBillingAddressFields('US'));
740
- ```
741
-
742
- **Parameters:**
743
-
744
- Name | Type | Description |
745
- ------ | ------ | ------ |
746
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the billing address form fields. |
747
-
748
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
749
-
750
- A promise that resolves to the current state.
751
-
752
- ___
753
-
754
- ### loadBillingCountries
755
-
756
- ▸ **loadBillingCountries**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
757
-
758
- Loads a list of countries available for billing.
759
-
760
- Once you make a successful request, you will be able to retrieve the list
761
- of countries by calling `CheckoutStoreSelector#getBillingCountries`.
762
-
763
- ```js
764
- const state = await service.loadBillingCountries();
765
-
766
- console.log(state.data.getBillingCountries());
767
- ```
768
-
769
- **Parameters:**
770
-
771
- Name | Type | Description |
772
- ------ | ------ | ------ |
773
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the available billing countries. |
774
-
775
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
776
-
777
- A promise that resolves to the current state.
778
-
779
- ___
780
-
781
- ### loadCheckout
782
-
783
- ▸ **loadCheckout**(`id?`: undefined | string, `options?`: [RequestOptions](../interfaces/requestoptions.md)‹[CheckoutParams](../interfaces/checkoutparams.md)›): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
784
-
785
- Loads the current checkout.
786
-
787
- This method can only be called if there is an active checkout. Also, it
788
- can only retrieve data that belongs to the current customer. When it is
789
- successfully executed, you can retrieve the data by calling
790
- `CheckoutStoreSelector#getCheckout`.
791
-
792
- ```js
793
- const state = await service.loadCheckout('0cfd6c06-57c3-4e29-8d7a-de55cc8a9052');
794
-
795
- console.log(state.data.getCheckout());
796
- ```
797
-
798
- **Parameters:**
799
-
800
- Name | Type | Description |
801
- ------ | ------ | ------ |
802
- `id?` | undefined | string | The identifier of the checkout to load, or the default checkout if not provided. |
803
- `options?` | [RequestOptions](../interfaces/requestoptions.md)‹[CheckoutParams](../interfaces/checkoutparams.md)› | Options for loading the current checkout. |
804
-
805
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
806
-
807
- A promise that resolves to the current state.
808
-
809
- ___
810
-
811
- ### loadInstruments
812
-
813
- ▸ **loadInstruments**(): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
814
-
815
- Loads a list of payment instruments associated with a customer.
816
-
817
- Once the method has been called successfully, you can retrieve the list
818
- of payment instruments by calling `CheckoutStoreSelector#getInstruments`.
819
- If the customer does not have any payment instruments on record, i.e.:
820
- credit card, you will get an empty list instead.
821
-
822
- ```js
823
- const state = service.loadInstruments();
824
-
825
- console.log(state.data.getInstruments());
826
- ```
827
-
828
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
829
-
830
- A promise that resolves to the current state.
831
-
832
- ___
833
-
834
- ### loadOrder
835
-
836
- ▸ **loadOrder**(`orderId`: number, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
837
-
838
- Loads an order by an id.
839
-
840
- The method can only retrieve an order if the order belongs to the current
841
- customer. If it is successfully executed, the data can be retrieved by
842
- calling `CheckoutStoreSelector#getOrder`.
843
-
844
- ```js
845
- const state = await service.loadOrder(123);
846
-
847
- console.log(state.data.getOrder());
848
- ```
849
-
850
- **Parameters:**
851
-
852
- Name | Type | Description |
853
- ------ | ------ | ------ |
854
- `orderId` | number | The identifier of the order to load. |
855
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the order. |
856
-
857
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
858
-
859
- A promise that resolves to the current state.
860
-
861
- ___
862
-
863
- ### loadPaymentMethods
864
-
865
- ▸ **loadPaymentMethods**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
866
-
867
- Loads a list of payment methods available for checkout.
868
-
869
- If a customer enters their payment details before navigating to the
870
- checkout page (i.e.: using PayPal checkout button on the cart page), only
871
- one payment method will be available for the customer - the selected
872
- payment method. Otherwise, by default, all payment methods configured by
873
- the merchant will be available for the customer.
874
-
875
- Once the method is executed successfully, you can call
876
- `CheckoutStoreSelector#getPaymentMethods` to retrieve the list of payment
877
- methods.
878
-
879
- ```js
880
- const state = service.loadPaymentMethods();
881
-
882
- console.log(state.data.getPaymentMethods());
883
- ```
884
-
885
- **Parameters:**
886
-
887
- Name | Type | Description |
888
- ------ | ------ | ------ |
889
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the payment methods that are available to the current customer. |
890
-
891
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
892
-
893
- A promise that resolves to the current state.
894
-
895
- ___
896
-
897
- ### loadPickupOptions
898
-
899
- ▸ **loadPickupOptions**(`query`: [PickupOptionRequestBody](../interfaces/pickupoptionrequestbody.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
900
-
901
- Loads a list of pickup options for a given criteria.
902
-
903
- ```js
904
- const consignmentId = '1';
905
- const searchArea = {
906
- radius: {
907
- value: 1.4,
908
- unit: 'KM'
909
- },
910
- coordinates: {
911
- latitude: 1.4,
912
- longitude: 0
913
- },
914
- };
915
- const state = await service.loadPickupOptions({ consignmentId, searchArea });
916
-
917
- console.log(state.data.getPickupOptions(consignmentId, searchArea));
918
- ```
919
-
920
- **`alpha`**
921
-
922
- **Parameters:**
923
-
924
- Name | Type |
925
- ------ | ------ |
926
- `query` | [PickupOptionRequestBody](../interfaces/pickupoptionrequestbody.md) |
927
-
928
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
929
-
930
- A promise that resolves to the current state.
931
-
932
- ___
933
-
934
- ### loadShippingAddressFields
935
-
936
- ▸ **loadShippingAddressFields**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
937
-
938
- Loads a set of form fields that should be presented to customers in order
939
- to capture their shipping address.
940
-
941
- Once the method has been executed successfully, you can call
942
- `CheckoutStoreSelector#getShippingAddressFields` to retrieve the set of
943
- form fields.
944
-
945
- ```js
946
- const state = service.loadShippingAddressFields();
947
-
948
- console.log(state.data.getShippingAddressFields('US'));
949
- ```
950
-
951
- **Parameters:**
952
-
953
- Name | Type | Description |
954
- ------ | ------ | ------ |
955
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the shipping address form fields. |
956
-
957
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
958
-
959
- A promise that resolves to the current state.
960
-
961
- ___
962
-
963
- ### loadShippingCountries
964
-
965
- ▸ **loadShippingCountries**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
966
-
967
- Loads a list of countries available for shipping.
968
-
969
- The list is determined based on the shipping zones configured by a
970
- merchant. Once you make a successful call, you will be able to retrieve
971
- the list of available shipping countries by calling
972
- `CheckoutStoreSelector#getShippingCountries`.
973
-
974
- ```js
975
- const state = await service.loadShippingCountries();
976
-
977
- console.log(state.data.getShippingCountries());
978
- ```
979
-
980
- **Parameters:**
981
-
982
- Name | Type | Description |
983
- ------ | ------ | ------ |
984
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the available shipping countries. |
985
-
986
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
987
-
988
- A promise that resolves to the current state.
989
-
990
- ___
991
-
992
- ### loadShippingOptions
993
-
994
- ▸ **loadShippingOptions**(`options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
995
-
996
- Loads a list of shipping options available for checkout.
997
-
998
- Available shipping options can only be determined once a customer
999
- provides their shipping address. If the method is executed successfully,
1000
- `CheckoutStoreSelector#getShippingOptions` can be called to retrieve the
1001
- list of shipping options.
1002
-
1003
- ```js
1004
- const state = await service.loadShippingOptions();
1005
-
1006
- console.log(state.data.getShippingOptions());
1007
- ```
1008
-
1009
- **Parameters:**
1010
-
1011
- Name | Type | Description |
1012
- ------ | ------ | ------ |
1013
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the available shipping options. |
1014
-
1015
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1016
-
1017
- A promise that resolves to the current state.
1018
-
1019
- ___
1020
-
1021
- ### notifyState
1022
-
1023
- ▸ **notifyState**(): *void*
1024
-
1025
- Notifies all subscribers with the current state.
1026
-
1027
- When this method gets called, the subscribers get called regardless if
1028
- they have any filters applied.
1029
-
1030
- **Returns:** *void*
1031
-
1032
- ___
1033
-
1034
- ### removeCoupon
1035
-
1036
- ▸ **removeCoupon**(`code`: string, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1037
-
1038
- Removes a coupon code from the current checkout.
1039
-
1040
- Once the coupon code gets removed, the quote for the current checkout will
1041
- be adjusted accordingly.
1042
-
1043
- ```js
1044
- await service.removeCoupon('COUPON');
1045
- ```
1046
-
1047
- **Parameters:**
1048
-
1049
- Name | Type | Description |
1050
- ------ | ------ | ------ |
1051
- `code` | string | The coupon code to remove from the current checkout. |
1052
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for removing the coupon code. |
1053
-
1054
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1055
-
1056
- A promise that resolves to the current state.
1057
-
1058
- ___
1059
-
1060
- ### removeGiftCertificate
1061
-
1062
- ▸ **removeGiftCertificate**(`code`: string, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1063
-
1064
- Removes a gift certificate from an order.
1065
-
1066
- Once the gift certificate gets removed, the quote for the current
1067
- checkout will be adjusted accordingly.
1068
-
1069
- ```js
1070
- await service.removeGiftCertificate('GIFT_CERTIFICATE');
1071
- ```
1072
-
1073
- **Parameters:**
1074
-
1075
- Name | Type | Description |
1076
- ------ | ------ | ------ |
1077
- `code` | string | The gift certificate to remove from the current checkout. |
1078
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for removing the gift certificate. |
1079
-
1080
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1081
-
1082
- A promise that resolves to the current state.
1083
-
1084
- ___
1085
-
1086
- ### selectConsignmentShippingOption
1087
-
1088
- ▸ **selectConsignmentShippingOption**(`consignmentId`: string, `shippingOptionId`: string, `options?`: [ShippingRequestOptions](../interfaces/shippingrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1089
-
1090
- Selects a shipping option for a given consignment.
1091
-
1092
- Note: this is used when items need to be shipped to multiple addresses,
1093
- for single shipping address, use `CheckoutService#updateShippingAddress`.
1094
-
1095
- If a shipping option has an additional cost, the quote for the current
1096
- order will be adjusted once the option is selected.
1097
-
1098
- ```js
1099
- const state = await service.selectConsignmentShippingOption(consignmentId, optionId);
1100
-
1101
- console.log(state.data.getConsignments());
1102
- ```
1103
-
1104
- **Parameters:**
1105
-
1106
- Name | Type | Description |
1107
- ------ | ------ | ------ |
1108
- `consignmentId` | string | The identified of the consignment to be updated. |
1109
- `shippingOptionId` | string | The identifier of the shipping option to select. |
1110
- `options?` | [ShippingRequestOptions](../interfaces/shippingrequestoptions.md) | Options for selecting the shipping option. |
1111
-
1112
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1113
-
1114
- A promise that resolves to the current state.
1115
-
1116
- ___
1117
-
1118
- ### selectShippingOption
1119
-
1120
- ▸ **selectShippingOption**(`shippingOptionId`: string, `options?`: [ShippingRequestOptions](../interfaces/shippingrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1121
-
1122
- Selects a shipping option for the current address.
1123
-
1124
- If a shipping option has an additional cost, the quote for the current
1125
- order will be adjusted once the option is selected.
1126
-
1127
- ```js
1128
- const state = await service.selectShippingOption('address-id', 'shipping-option-id');
1129
-
1130
- console.log(state.data.getSelectedShippingOption());
1131
- ```
1132
-
1133
- **Parameters:**
1134
-
1135
- Name | Type | Description |
1136
- ------ | ------ | ------ |
1137
- `shippingOptionId` | string | The identifier of the shipping option to select. |
1138
- `options?` | [ShippingRequestOptions](../interfaces/shippingrequestoptions.md) | Options for selecting the shipping option. |
1139
-
1140
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1141
-
1142
- A promise that resolves to the current state.
1143
-
1144
- ___
1145
-
1146
- ### sendSignInEmail
1147
-
1148
- ▸ **sendSignInEmail**(`signInEmailRequest`: [SignInEmailRequestBody](../interfaces/signinemailrequestbody.md), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1149
-
1150
- Sends a email that contains a single-use sign-in link. When a valid links is clicked,
1151
- signs in the customer without requiring any password, redirecting them to the account page if no redirectUrl is provided.
1152
-
1153
- ```js
1154
- checkoutService.sendSignInEmail({ email: 'foo@bar.com', redirectUrl: 'checkout' });
1155
- ```
1156
-
1157
- **Parameters:**
1158
-
1159
- Name | Type | Description |
1160
- ------ | ------ | ------ |
1161
- `signInEmailRequest` | [SignInEmailRequestBody](../interfaces/signinemailrequestbody.md) | The sign-in email request values. |
1162
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for the send email request. |
1163
-
1164
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1165
-
1166
- A promise that resolves to the current state.
1167
-
1168
- ___
1169
-
1170
- ### signInCustomer
1171
-
1172
- ▸ **signInCustomer**(`credentials`: [CustomerCredentials](../interfaces/customercredentials.md), `options?`: [CustomerRequestOptions](../interfaces/customerrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1173
-
1174
- Signs into a customer's registered account.
1175
-
1176
- Once the customer is signed in successfully, the checkout state will be
1177
- populated with information associated with the customer, such as their
1178
- saved addresses. You can call `CheckoutStoreSelector#getCustomer` to
1179
- retrieve the data.
1180
-
1181
- ```js
1182
- const state = await service.signInCustomer({
1183
- email: 'foo@bar.com',
1184
- password: 'password123',
1185
- });
1186
-
1187
- console.log(state.data.getCustomer());
1188
- ```
1189
-
1190
- **Parameters:**
1191
-
1192
- Name | Type | Description |
1193
- ------ | ------ | ------ |
1194
- `credentials` | [CustomerCredentials](../interfaces/customercredentials.md) | The credentials to be used for signing in the customer. |
1195
- `options?` | [CustomerRequestOptions](../interfaces/customerrequestoptions.md) | Options for signing in the customer. |
1196
-
1197
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1198
-
1199
- A promise that resolves to the current state.
1200
-
1201
- ___
1202
-
1203
- ### signOutCustomer
1204
-
1205
- ▸ **signOutCustomer**(`options?`: [CustomerRequestOptions](../interfaces/customerrequestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1206
-
1207
- Signs out the current customer if they are previously signed in.
1208
-
1209
- Once the customer is successfully signed out, the checkout state will be
1210
- reset automatically.
1211
-
1212
- ```js
1213
- const state = await service.signOutCustomer();
1214
-
1215
- // The returned object should not contain information about the previously signed-in customer.
1216
- console.log(state.data.getCustomer());
1217
- ```
1218
-
1219
- When a store has "Allow customers to access their cart across multiple devices" enabled, signing out
1220
- will remove the cart/checkout data from the current session. An error with type="checkout_not_available" will be thrown.
1221
-
1222
- ```js
1223
- try {
1224
- await service.signOutCustomer();
1225
- } catch (error) {
1226
- if (error.type === 'checkout_not_available') {
1227
- window.top.location.assign('/');
1228
- }
1229
- }
1230
- ```
1231
-
1232
- **Parameters:**
1233
-
1234
- Name | Type | Description |
1235
- ------ | ------ | ------ |
1236
- `options?` | [CustomerRequestOptions](../interfaces/customerrequestoptions.md) | Options for signing out the customer. |
1237
-
1238
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1239
-
1240
- A promise that resolves to the current state.
1241
-
1242
- ___
1243
-
1244
- ### submitOrder
1245
-
1246
- ▸ **submitOrder**(`payload`: [OrderRequestBody](../interfaces/orderrequestbody.md), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1247
-
1248
- Submits an order, thereby completing a checkout process.
1249
-
1250
- Before you can submit an order, you must initialize the payment method
1251
- chosen by the customer by calling `CheckoutService#initializePayment`.
1252
-
1253
- ```js
1254
- await service.initializePayment({ methodId: 'braintree' });
1255
- await service.submitOrder({
1256
- payment: {
1257
- methodId: 'braintree',
1258
- paymentData: {
1259
- ccExpiry: { month: 10, year: 20 },
1260
- ccName: 'BigCommerce',
1261
- ccNumber: '4111111111111111',
1262
- ccCvv: 123,
1263
- },
1264
- },
1265
- });
1266
- ```
1267
-
1268
- You are not required to include `paymentData` if the order does not
1269
- require additional payment details. For example, the customer has already
1270
- entered their payment details on the cart page using one of the hosted
1271
- payment methods, such as PayPal. Or the customer has applied a gift
1272
- certificate that exceeds the grand total amount.
1273
-
1274
- If the order is submitted successfully, you can retrieve the newly
1275
- created order by calling `CheckoutStoreSelector#getOrder`.
1276
-
1277
- ```js
1278
- const state = await service.submitOrder(payload);
1279
-
1280
- console.log(state.data.getOrder());
1281
- ```
1282
-
1283
- **Parameters:**
1284
-
1285
- Name | Type | Description |
1286
- ------ | ------ | ------ |
1287
- `payload` | [OrderRequestBody](../interfaces/orderrequestbody.md) | The request payload to submit for the current order. |
1288
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for submitting the current order. |
1289
-
1290
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1291
-
1292
- A promise that resolves to the current state.
1293
-
1294
- ___
1295
-
1296
- ### subscribe
1297
-
1298
- ▸ **subscribe**(`subscriber`: function, ...`filters`: Array‹function›): *function*
1299
-
1300
- Subscribes to any changes to the current state.
1301
-
1302
- The method registers a callback function and executes it every time there
1303
- is a change in the checkout state.
1304
-
1305
- ```js
1306
- service.subscribe(state => {
1307
- console.log(state.data.getCart());
1308
- });
1309
- ```
1310
-
1311
- The method can be configured to notify subscribers only regarding
1312
- relevant changes, by providing a filter function.
1313
-
1314
- ```js
1315
- const filter = state => state.data.getCart();
1316
-
1317
- // Only trigger the subscriber when the cart changes.
1318
- service.subscribe(state => {
1319
- console.log(state.data.getCart())
1320
- }, filter);
1321
- ```
1322
-
1323
- **Parameters:**
1324
-
1325
- ▪ **subscriber**: *function*
1326
-
1327
- The function to subscribe to state changes.
1328
-
1329
- ▸ (`state`: [CheckoutSelectors](../interfaces/checkoutselectors.md)): *void*
1330
-
1331
- **Parameters:**
1332
-
1333
- Name | Type |
1334
- ------ | ------ |
1335
- `state` | [CheckoutSelectors](../interfaces/checkoutselectors.md) |
1336
-
1337
- ▪... **filters**: *Array‹function›*
1338
-
1339
- One or more functions to filter out irrelevant state
1340
- changes. If more than one function is provided, the subscriber will only
1341
- be triggered if all conditions are met.
1342
-
1343
- **Returns:** *function*
1344
-
1345
- A function, if called, will unsubscribe the subscriber.
1346
-
1347
- ▸ (): *void*
1348
-
1349
- ___
1350
-
1351
- ### unassignItemsToAddress
1352
-
1353
- ▸ **unassignItemsToAddress**(`consignment`: [ConsignmentAssignmentRequestBody](../README.md#consignmentassignmentrequestbody), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1354
-
1355
- Convenience method that unassigns items from a specific shipping address.
1356
-
1357
- Note: this method finds an existing consignment that matches the provided address
1358
- and unassigns the specified items. If the consignment ends up with no line items
1359
- after the unassignment, it will be deleted.
1360
-
1361
- **Parameters:**
1362
-
1363
- Name | Type | Description |
1364
- ------ | ------ | ------ |
1365
- `consignment` | [ConsignmentAssignmentRequestBody](../README.md#consignmentassignmentrequestbody) | The consignment data that will be used. |
1366
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for the request |
1367
-
1368
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1369
-
1370
- A promise that resolves to the current state.
1371
-
1372
- ___
1373
-
1374
- ### updateBillingAddress
1375
-
1376
- ▸ **updateBillingAddress**(`address`: Partial‹[BillingAddressRequestBody](../interfaces/billingaddressrequestbody.md)›, `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1377
-
1378
- Updates the billing address for the current checkout.
1379
-
1380
- A customer must provide their billing address before they can proceed to
1381
- pay for their order.
1382
-
1383
- You can submit an address that is partially complete. The address does
1384
- not get validated until you submit the order.
1385
-
1386
- ```js
1387
- const state = await service.updateBillingAddress(address);
1388
-
1389
- console.log(state.data.getBillingAddress());
1390
- ```
1391
-
1392
- **Parameters:**
1393
-
1394
- Name | Type | Description |
1395
- ------ | ------ | ------ |
1396
- `address` | Partial‹[BillingAddressRequestBody](../interfaces/billingaddressrequestbody.md)› | The address to be used for billing. |
1397
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for updating the billing address. |
1398
-
1399
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1400
-
1401
- A promise that resolves to the current state.
1402
-
1403
- ___
1404
-
1405
- ### updateCheckout
1406
-
1407
- ▸ **updateCheckout**(`payload`: [CheckoutRequestBody](../interfaces/checkoutrequestbody.md), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1408
-
1409
- Updates specific properties of the current checkout.
1410
-
1411
- ```js
1412
- const state = await service.updateCheckout(checkout);
1413
-
1414
- console.log(state.data.getCheckout());
1415
- ```
1416
-
1417
- **Parameters:**
1418
-
1419
- Name | Type | Description |
1420
- ------ | ------ | ------ |
1421
- `payload` | [CheckoutRequestBody](../interfaces/checkoutrequestbody.md) | The checkout properties to be updated. |
1422
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for loading the current checkout. |
1423
-
1424
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1425
-
1426
- A promise that resolves to the current state.
1427
-
1428
- ___
1429
-
1430
- ### updateConsignment
1431
-
1432
- ▸ **updateConsignment**(`consignment`: [ConsignmentUpdateRequestBody](../interfaces/consignmentupdaterequestbody.md), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1433
-
1434
- Updates a specific consignment.
1435
-
1436
- Note: this is used when items need to be shipped to multiple addresses,
1437
- for single shipping address, use `CheckoutService#selectShippingOption`.
1438
-
1439
- When a shipping address for a consignment is updated, an updated list of
1440
- shipping options will become available for the consignment, unless no
1441
- options are available. If the update is successful, you can call
1442
- `CheckoutStoreSelector#getConsignments` to retrieve updated list of
1443
- consignments.
1444
-
1445
- Beware that if the updated consignment includes all line items from another
1446
- consignment, that consignment will be deleted as a valid consignment must
1447
- include at least one valid line item.
1448
-
1449
- If the shipping address changes and the selected shipping option becomes
1450
- unavailable for the updated address, the shipping option will be
1451
- deselected.
1452
-
1453
- You can submit an address that is partially complete. The address does
1454
- not get validated until you submit the order.
1455
-
1456
- ```js
1457
- const state = await service.updateConsignment(consignment);
1458
-
1459
- console.log(state.data.getConsignments());
1460
- ```
1461
-
1462
- **Parameters:**
1463
-
1464
- Name | Type | Description |
1465
- ------ | ------ | ------ |
1466
- `consignment` | [ConsignmentUpdateRequestBody](../interfaces/consignmentupdaterequestbody.md) | The consignment data that will be used. |
1467
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for updating the shipping address. |
1468
-
1469
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1470
-
1471
- A promise that resolves to the current state.
1472
-
1473
- ___
1474
-
1475
- ### updateShippingAddress
1476
-
1477
- ▸ **updateShippingAddress**(`address`: Partial‹[AddressRequestBody](../interfaces/addressrequestbody.md)›, `options?`: [ShippingRequestOptions](../interfaces/shippingrequestoptions.md)‹[CheckoutParams](../interfaces/checkoutparams.md)›): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1478
-
1479
- Updates the shipping address for the current checkout.
1480
-
1481
- When a customer updates their shipping address for an order, they will
1482
- see an updated list of shipping options and the cost for each option,
1483
- unless no options are available. If the update is successful, you can
1484
- call `CheckoutStoreSelector#getShippingAddress` to retrieve the address.
1485
-
1486
- If the shipping address changes and the selected shipping option becomes
1487
- unavailable for the updated address, the shipping option will be
1488
- deselected.
1489
-
1490
- You can submit an address that is partially complete. The address does
1491
- not get validated until you submit the order.
1492
-
1493
- ```js
1494
- const state = await service.updateShippingAddress(address);
1495
-
1496
- console.log(state.data.getShippingAddress());
1497
- ```
1498
-
1499
- **Parameters:**
1500
-
1501
- Name | Type | Description |
1502
- ------ | ------ | ------ |
1503
- `address` | Partial‹[AddressRequestBody](../interfaces/addressrequestbody.md)› | The address to be used for shipping. |
1504
- `options?` | [ShippingRequestOptions](../interfaces/shippingrequestoptions.md)‹[CheckoutParams](../interfaces/checkoutparams.md)› | Options for updating the shipping address. |
1505
-
1506
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1507
-
1508
- A promise that resolves to the current state.
1509
-
1510
- ___
1511
-
1512
- ### updateSubscriptions
1513
-
1514
- ▸ **updateSubscriptions**(`subscriptions`: [Subscriptions](../interfaces/subscriptions.md), `options?`: [RequestOptions](../interfaces/requestoptions.md)): *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1515
-
1516
- Updates the subscriptions associated to an email.
1517
-
1518
- **Parameters:**
1519
-
1520
- Name | Type | Description |
1521
- ------ | ------ | ------ |
1522
- `subscriptions` | [Subscriptions](../interfaces/subscriptions.md) | The email and associated subscriptions to update. |
1523
- `options?` | [RequestOptions](../interfaces/requestoptions.md) | Options for continuing as a guest. |
1524
-
1525
- **Returns:** *Promise‹[CheckoutSelectors](../interfaces/checkoutselectors.md)›*
1526
-
1527
- A promise that resolves to the current state.