@liquidcommerce/elements-sdk 2.6.0-beta.13 → 2.6.0-beta.131

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 (304) hide show
  1. package/README.md +102 -2518
  2. package/dist/index.checkout.esm.js +22524 -0
  3. package/dist/index.esm.js +30689 -20632
  4. package/dist/ssr-stub.checkout.esm.js +17 -0
  5. package/dist/ssr-stub.esm.js +281 -0
  6. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  7. package/dist/types/auto-initialize/shared-utils.d.ts +51 -0
  8. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +16 -2
  9. package/dist/types/clients/builder.d.ts +3 -0
  10. package/dist/types/clients/checkout.d.ts +6 -0
  11. package/dist/types/clients/helpers.d.ts +8 -0
  12. package/dist/types/clients/main.d.ts +3 -0
  13. package/dist/types/constants/core.constant.d.ts +13 -18
  14. package/dist/types/constants/index.d.ts +1 -0
  15. package/dist/types/constants/prop65.constant.d.ts +8 -0
  16. package/dist/types/core/a11y/announcer.service.d.ts +16 -0
  17. package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
  18. package/dist/types/core/a11y/focusable.d.ts +5 -0
  19. package/dist/types/core/a11y/glyph-button.d.ts +8 -0
  20. package/dist/types/core/a11y/index.d.ts +6 -0
  21. package/dist/types/core/a11y/required.d.ts +1 -0
  22. package/dist/types/core/a11y/single-select.d.ts +20 -0
  23. package/dist/types/core/api/api-client.service.d.ts +23 -18
  24. package/dist/types/core/api/api-result.d.ts +20 -0
  25. package/dist/types/core/api/auth-client.service.d.ts +37 -13
  26. package/dist/types/core/api/http-client.service.d.ts +0 -8
  27. package/dist/types/core/base-component.service.d.ts +4 -1
  28. package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
  29. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  30. package/dist/types/core/client/actions/client-analytics-action.service.d.ts +35 -0
  31. package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
  32. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +81 -0
  33. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  34. package/dist/types/core/client/client-action.service.d.ts +7 -74
  35. package/dist/types/core/client/client-config.service.d.ts +12 -5
  36. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
  37. package/dist/types/core/google-tag-manager.service.d.ts +13 -3
  38. package/dist/types/core/logger/logger.service.d.ts +1 -1
  39. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -0
  40. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +6 -1
  41. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +54 -48
  42. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +18 -7
  43. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  44. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  45. package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
  46. package/dist/types/core/store/interfaces/checkout.interface.d.ts +40 -107
  47. package/dist/types/core/store/interfaces/core.interface.d.ts +12 -2
  48. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  49. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  50. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  51. package/dist/types/core/store/store.constant.d.ts +5 -0
  52. package/dist/types/core/store/store.service.d.ts +1 -0
  53. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  54. package/dist/types/enums/core.enum.d.ts +51 -2
  55. package/dist/types/enums/index.d.ts +0 -1
  56. package/dist/types/index.checkout.d.ts +11 -0
  57. package/dist/types/index.checkout.umd.d.ts +4 -0
  58. package/dist/types/index.d.ts +9 -3
  59. package/dist/types/interfaces/analytics.interface.d.ts +41 -0
  60. package/dist/types/interfaces/api/cart.interface.d.ts +14 -7
  61. package/dist/types/interfaces/api/checkout.interface.d.ts +277 -0
  62. package/dist/types/interfaces/api/delivery.interface.d.ts +24 -0
  63. package/dist/types/interfaces/api/index.d.ts +6 -0
  64. package/dist/types/interfaces/api/product-list.interface.d.ts +15 -6
  65. package/dist/types/interfaces/api/product.interface.d.ts +12 -4
  66. package/dist/types/interfaces/client.interface.d.ts +79 -0
  67. package/dist/types/interfaces/component.interface.d.ts +7 -0
  68. package/dist/types/interfaces/config.interface.d.ts +45 -0
  69. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  70. package/dist/types/interfaces/configs/cart.interface.d.ts +2 -1
  71. package/dist/types/interfaces/configs/checkout.interface.d.ts +3 -1
  72. package/dist/types/interfaces/configs/global.interface.d.ts +9 -3
  73. package/dist/types/interfaces/configs/index.d.ts +1 -0
  74. package/dist/types/interfaces/configs/product-list.interface.d.ts +49 -0
  75. package/dist/types/interfaces/configs/product.interface.d.ts +7 -1
  76. package/dist/types/interfaces/injection.interface.d.ts +56 -0
  77. package/dist/types/modules/address/address-display.component.d.ts +3 -1
  78. package/dist/types/modules/address/address-input.component.d.ts +11 -1
  79. package/dist/types/modules/address/address.command.d.ts +3 -2
  80. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  81. package/dist/types/modules/cart/cart.commands.d.ts +11 -5
  82. package/dist/types/modules/cart/components/cart-body.component.d.ts +1 -0
  83. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +1 -1
  84. package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
  85. package/dist/types/modules/cart/components/cart-item.component.d.ts +8 -0
  86. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  87. package/dist/types/modules/checkout/checkout.commands.d.ts +134 -12
  88. package/dist/types/modules/checkout/checkout.component.d.ts +7 -1
  89. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +5 -2
  90. package/dist/types/modules/checkout/components/checkout-buyer.component.d.ts +1 -0
  91. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +9 -0
  92. package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +1 -0
  93. package/dist/types/modules/checkout/components/checkout-delivery-method.component.d.ts +24 -0
  94. package/dist/types/modules/checkout/components/checkout-delivery-scheduling.component.d.ts +53 -0
  95. package/dist/types/modules/checkout/components/checkout-express-checkout.component.d.ts +63 -0
  96. package/dist/types/modules/checkout/components/checkout-express-completion.component.d.ts +21 -0
  97. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  98. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
  99. package/dist/types/modules/checkout/components/checkout-item.component.d.ts +2 -0
  100. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  101. package/dist/types/modules/checkout/components/checkout-order-summary.component.d.ts +3 -0
  102. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +9 -1
  103. package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +1 -5
  104. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +15 -1
  105. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  106. package/dist/types/modules/checkout/components/checkout-prop65-warning.component.d.ts +8 -0
  107. package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +3 -0
  108. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +7 -3
  109. package/dist/types/modules/checkout/components/checkout-stripe-handler.component.d.ts +4 -0
  110. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +4 -2
  111. package/dist/types/modules/checkout/components/index.d.ts +5 -0
  112. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  113. package/dist/types/modules/checkout/components/required-fields-legend.d.ts +1 -0
  114. package/dist/types/modules/checkout/constant.d.ts +15 -0
  115. package/dist/types/modules/checkout/customer-prefill.d.ts +5 -0
  116. package/dist/types/modules/checkout/express-wallet.d.ts +12 -0
  117. package/dist/types/modules/checkout/payment-session-error.d.ts +4 -0
  118. package/dist/types/modules/checkout/stripe-js.d.ts +2 -0
  119. package/dist/types/modules/checkout/styles/delivery-method.style.d.ts +1 -0
  120. package/dist/types/modules/checkout/styles/express-checkout.style.d.ts +1 -0
  121. package/dist/types/modules/checkout/styles/express-completion.style.d.ts +1 -0
  122. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  123. package/dist/types/modules/product/components/components.d.ts +26 -2
  124. package/dist/types/modules/product/components/index.d.ts +1 -0
  125. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +8 -1
  126. package/dist/types/modules/product/components/product-delivery-estimate.component.d.ts +11 -0
  127. package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
  128. package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
  129. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
  130. package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
  131. package/dist/types/modules/product/components/product-prop65-warning.d.ts +1 -0
  132. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +6 -0
  133. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +12 -2
  134. package/dist/types/modules/product/components/product-retailers-popup.component.d.ts +1 -0
  135. package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
  136. package/dist/types/modules/product/product.commands.d.ts +5 -5
  137. package/dist/types/modules/product/product.component.d.ts +3 -0
  138. package/dist/types/modules/product/styles/prop65-warning.style.d.ts +1 -0
  139. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  140. package/dist/types/modules/product-list/components/card-components/index.d.ts +6 -0
  141. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  142. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  143. package/dist/types/modules/product-list/components/card-components/product-fulfillment-text.d.ts +2 -0
  144. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
  145. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
  146. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
  147. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  148. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  149. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +1 -0
  150. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  151. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  152. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
  153. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +2 -1
  154. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  155. package/dist/types/modules/product-list/components/index.d.ts +6 -2
  156. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  157. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +39 -31
  158. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  159. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -36
  160. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  161. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +54 -0
  162. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  163. package/dist/types/modules/product-list/product-list-filter.registry.d.ts +42 -0
  164. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +7 -0
  165. package/dist/types/modules/product-list/product-list-order.utils.d.ts +3 -0
  166. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  167. package/dist/types/modules/product-list/product-list.commands.d.ts +27 -7
  168. package/dist/types/modules/product-list/product-list.component.d.ts +23 -47
  169. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  170. package/dist/types/modules/product-list/product-list.interface.d.ts +17 -28
  171. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  172. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  173. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  174. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  175. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  176. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  177. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  178. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  179. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  180. package/dist/types/modules/ui-components/alert/alert.component.d.ts +10 -10
  181. package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
  182. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
  183. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +9 -1
  184. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
  185. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  186. package/dist/types/modules/ui-components/input/input.component.d.ts +15 -2
  187. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  188. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  189. package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
  190. package/dist/types/ssr/stub.checkout.d.ts +8 -0
  191. package/dist/types/ssr/stub.d.ts +12 -0
  192. package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
  193. package/dist/types/static/icon/bag.icon.d.ts +1 -1
  194. package/dist/types/static/icon/check.icon.d.ts +2 -0
  195. package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
  196. package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
  197. package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
  198. package/dist/types/static/icon/chevron-up.icon.d.ts +1 -1
  199. package/dist/types/static/icon/close.icon.d.ts +1 -1
  200. package/dist/types/static/icon/error-info.icon.d.ts +1 -1
  201. package/dist/types/static/icon/filter.icon.d.ts +1 -1
  202. package/dist/types/static/icon/icon.a11y.d.ts +1 -0
  203. package/dist/types/static/icon/icon.types.d.ts +1 -0
  204. package/dist/types/static/icon/index.d.ts +2 -0
  205. package/dist/types/static/icon/info.icon.d.ts +1 -1
  206. package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
  207. package/dist/types/static/icon/search.icon.d.ts +1 -1
  208. package/dist/types/static/icon/success.icon.d.ts +1 -1
  209. package/dist/types/static/icon/trash.icon.d.ts +1 -1
  210. package/dist/types/static/icon/warning.icon.d.ts +1 -1
  211. package/dist/types/utils/delivery-scheduling.d.ts +72 -0
  212. package/dist/types/utils/dom-compat.d.ts +2 -0
  213. package/dist/types/utils/format.d.ts +9 -14
  214. package/dist/types/utils/image-bg-removal.d.ts +3 -0
  215. package/dist/types/utils/places-session-token.d.ts +1 -0
  216. package/dist/types/utils/product-selection.d.ts +16 -0
  217. package/dist/types/utils/product.d.ts +21 -0
  218. package/dist/types/utils/timezone.d.ts +6 -0
  219. package/docs/v1/README.md +214 -0
  220. package/docs/v1/api/actions/address-actions.md +290 -0
  221. package/docs/v1/api/actions/analytics-actions.md +326 -0
  222. package/docs/v1/api/actions/cart-actions.md +364 -0
  223. package/docs/v1/api/actions/checkout-actions.md +629 -0
  224. package/docs/v1/api/actions/product-actions.md +205 -0
  225. package/docs/v1/api/client.md +671 -0
  226. package/docs/v1/api/configuration.md +587 -0
  227. package/docs/v1/api/injection-methods.md +331 -0
  228. package/docs/v1/api/typescript-types.md +610 -0
  229. package/docs/v1/api/ui-helpers.md +200 -0
  230. package/docs/v1/examples/advanced-patterns.md +199 -0
  231. package/docs/v1/examples/checkout-flow.md +90 -0
  232. package/docs/v1/examples/custom-theming.md +76 -0
  233. package/docs/v1/examples/multi-product-page.md +90 -0
  234. package/docs/v1/examples/simple-product-page.md +89 -0
  235. package/docs/v1/getting-started/concepts.md +521 -0
  236. package/docs/v1/getting-started/installation.md +351 -0
  237. package/docs/v1/getting-started/quick-start.md +410 -0
  238. package/docs/v1/guides/accessibility.md +298 -0
  239. package/docs/v1/guides/address-component.md +441 -0
  240. package/docs/v1/guides/best-practices.md +365 -0
  241. package/docs/v1/guides/cart-component.md +802 -0
  242. package/docs/v1/guides/checkout-component.md +920 -0
  243. package/docs/v1/guides/events.md +1061 -0
  244. package/docs/v1/guides/product-component.md +767 -0
  245. package/docs/v1/guides/product-list-component.md +730 -0
  246. package/docs/v1/guides/theming.md +243 -0
  247. package/docs/v1/integration/angular.md +39 -0
  248. package/docs/v1/integration/laravel.md +41 -0
  249. package/docs/v1/integration/nextjs.md +69 -0
  250. package/docs/v1/integration/proxy-setup.md +106 -0
  251. package/docs/v1/integration/react.md +64 -0
  252. package/docs/v1/integration/vanilla-js.md +84 -0
  253. package/docs/v1/integration/vue.md +58 -0
  254. package/docs/v1/reference/analytics.md +176 -0
  255. package/docs/v1/reference/browser-support.md +47 -0
  256. package/docs/v1/reference/error-handling.md +83 -0
  257. package/docs/v1/reference/performance.md +52 -0
  258. package/docs/v1/reference/telemetry.md +85 -0
  259. package/docs/v1/reference/troubleshooting.md +135 -0
  260. package/package.json +75 -45
  261. package/dist/types/elements-builder-client.d.ts +0 -2
  262. package/dist/types/elements-client-helper.d.ts +0 -4
  263. package/dist/types/elements-client.d.ts +0 -2
  264. package/dist/types/enums/cloud.enum.d.ts +0 -97
  265. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
  266. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  267. package/dist/types/interfaces/cloud/index.d.ts +0 -3
  268. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  269. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  270. package/dist/types/interfaces/core.interface.d.ts +0 -111
  271. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  272. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  273. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  274. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  275. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  276. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  277. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  278. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  279. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  280. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  281. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  282. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  283. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  284. package/dist/types/utils/helper.d.ts +0 -28
  285. package/docs/ACTIONS.md +0 -1300
  286. package/docs/BROWSER_SUPPORT.md +0 -279
  287. package/docs/CONFIGURATION.md +0 -853
  288. package/docs/DOCUMENTATION_INDEX.md +0 -311
  289. package/docs/EVENTS.md +0 -798
  290. package/docs/PROXY.md +0 -228
  291. package/docs/THEMING.md +0 -592
  292. package/docs/TROUBLESHOOTING.md +0 -793
  293. package/umd/elements.js +0 -1
  294. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  295. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  296. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  297. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  298. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  299. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  300. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  301. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  302. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  303. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  304. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -0,0 +1,920 @@
1
+ # Checkout Component
2
+
3
+ The Checkout component provides a complete purchase flow including customer information collection, payment processing, and order confirmation.
4
+
5
+ ## Overview
6
+
7
+ The Checkout component handles:
8
+ - Customer information (email, phone, address)
9
+ - Gift recipient details (optional)
10
+ - Payment processing (Stripe integration)
11
+ - Billing address
12
+ - Promo codes and gift cards
13
+ - Order summary and totals
14
+ - Marketing preferences
15
+ - Tip options
16
+ - Order confirmation
17
+
18
+ ## Basic Usage
19
+
20
+ ### Checkout Drawer (Default)
21
+
22
+ The checkout drawer opens automatically when users click "Checkout" from the cart. No additional setup required.
23
+
24
+ ### Hosted Checkout Page
25
+
26
+ For a full-page checkout experience, inject checkout into a dedicated container:
27
+
28
+ ```javascript
29
+ const client = await Elements('YOUR_API_KEY', { env: 'production' });
30
+
31
+ await client.injectCheckoutElement({
32
+ containerId: 'checkout-container',
33
+ checkoutId: 'optional_checkout_id', // Optional: load specific checkout
34
+ hideHeader: false // Optional: hide checkout header
35
+ });
36
+ ```
37
+
38
+ #### With URL Parameter
39
+
40
+ Configure checkout to load from URL parameter:
41
+
42
+ ```html
43
+ <script
44
+ defer
45
+ data-liquid-commerce-elements
46
+ data-token="YOUR_API_KEY"
47
+ data-env="production"
48
+ data-checkout-param="lce_checkout"
49
+ type="text/javascript"
50
+ src="https://elements.reservebar-worker.workers.dev/all/elements.js"
51
+ ></script>
52
+
53
+ <div data-lce-checkout></div>
54
+ ```
55
+
56
+ Visit `https://yoursite.com/checkout?lce_checkout=checkout_abc123` to load that checkout.
57
+
58
+ ### Redirect to Custom Checkout Page
59
+
60
+ Configure the cart to redirect to your checkout page instead of opening the drawer:
61
+
62
+ ```javascript
63
+ const client = await Elements('YOUR_API_KEY', {
64
+ env: 'production',
65
+ checkout: {
66
+ pageUrl: 'https://yoursite.com/checkout?lce_checkout={token}'
67
+ }
68
+ });
69
+ ```
70
+
71
+ Or with data attributes:
72
+
73
+ ```html
74
+ <script
75
+ defer
76
+ data-liquid-commerce-elements
77
+ data-token="YOUR_API_KEY"
78
+ data-env="production"
79
+ data-checkout-url="https://yoursite.com/checkout?lce_checkout={token}"
80
+ type="text/javascript"
81
+ src="https://elements.reservebar-worker.workers.dev/all/elements.js"
82
+ ></script>
83
+ ```
84
+
85
+ The `{token}` placeholder is replaced with the checkout token.
86
+
87
+ ## Checkout Actions
88
+
89
+ ### Open Checkout
90
+
91
+ ```javascript
92
+ window.LiquidCommerce.elements.actions.checkout.openCheckout();
93
+ ```
94
+
95
+ ### Close Checkout
96
+
97
+ ```javascript
98
+ window.LiquidCommerce.elements.actions.checkout.closeCheckout();
99
+ ```
100
+
101
+ ### Toggle Checkout
102
+
103
+ ```javascript
104
+ window.LiquidCommerce.elements.actions.checkout.toggleCheckout();
105
+ ```
106
+
107
+ ### Exit Checkout
108
+
109
+ Navigate away from checkout (requires `exitUrl` configuration):
110
+
111
+ ```javascript
112
+ window.LiquidCommerce.elements.actions.checkout.exitCheckout();
113
+ ```
114
+
115
+ Configure exit URL:
116
+
117
+ ```javascript
118
+ customTheme: {
119
+ checkout: {
120
+ layout: {
121
+ exitUrl: 'https://yoursite.com/shop'
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ ### Add Product to Checkout
128
+
129
+ Skip the cart and go directly to checkout:
130
+
131
+ ```javascript
132
+ await window.LiquidCommerce.elements.actions.checkout.addProduct([
133
+ {
134
+ identifier: '00619947000020',
135
+ fulfillmentType: 'shipping',
136
+ quantity: 1
137
+ }
138
+ ], true); // true = open checkout after adding
139
+ ```
140
+
141
+ ### Apply Promo Code
142
+
143
+ ```javascript
144
+ await window.LiquidCommerce.elements.actions.checkout.applyPromoCode('WELCOME10');
145
+ ```
146
+
147
+ ### Remove Promo Code
148
+
149
+ ```javascript
150
+ await window.LiquidCommerce.elements.actions.checkout.removePromoCode();
151
+ ```
152
+
153
+ ### Apply Gift Card
154
+
155
+ ```javascript
156
+ await window.LiquidCommerce.elements.actions.checkout.applyGiftCard('GIFT-1234-5678');
157
+ ```
158
+
159
+ ### Remove Gift Card
160
+
161
+ ```javascript
162
+ await window.LiquidCommerce.elements.actions.checkout.removeGiftCard('GIFT-1234-5678');
163
+ ```
164
+
165
+ ### Toggle Gift Mode
166
+
167
+ Enable/disable "Send as Gift" mode:
168
+
169
+ ```javascript
170
+ // Enable gift mode
171
+ await window.LiquidCommerce.elements.actions.checkout.toggleIsGift(true);
172
+
173
+ // Disable gift mode
174
+ await window.LiquidCommerce.elements.actions.checkout.toggleIsGift(false);
175
+
176
+ // Toggle current state
177
+ await window.LiquidCommerce.elements.actions.checkout.toggleIsGift();
178
+ ```
179
+
180
+ ### Toggle Billing Same As Shipping
181
+
182
+ ```javascript
183
+ // Use shipping address for billing
184
+ await window.LiquidCommerce.elements.actions.checkout.toggleBillingSameAsShipping(true);
185
+
186
+ // Use different billing address
187
+ await window.LiquidCommerce.elements.actions.checkout.toggleBillingSameAsShipping(false);
188
+ ```
189
+
190
+ ### Toggle Marketing Preferences
191
+
192
+ ```javascript
193
+ // Opt into email marketing
194
+ await window.LiquidCommerce.elements.actions.checkout.toggleMarketingPreferences('canEmail', true);
195
+
196
+ // Opt into SMS marketing
197
+ await window.LiquidCommerce.elements.actions.checkout.toggleMarketingPreferences('canSms', true);
198
+ ```
199
+
200
+ ### Update Customer Information
201
+
202
+ Pre-fill customer information:
203
+
204
+ ```javascript
205
+ window.LiquidCommerce.elements.actions.checkout.updateCustomerInfo({
206
+ firstName: 'John',
207
+ lastName: 'Doe',
208
+ email: 'john@example.com',
209
+ phone: '+15551234567',
210
+ birthDate: '1990-01-15',
211
+ addressTwo: 'Apt 4',
212
+ company: 'Acme Corp'
213
+ });
214
+ ```
215
+
216
+ **Available fields:**
217
+ - `firstName`, `lastName`
218
+ - `email`, `phone`
219
+ - `birthDate`, `addressTwo`
220
+ - `company`
221
+
222
+ ### Update Gift Information
223
+
224
+ Pre-fill gift recipient information:
225
+
226
+ ```javascript
227
+ window.LiquidCommerce.elements.actions.checkout.updateGiftInfo({
228
+ firstName: 'Jane',
229
+ lastName: 'Smith',
230
+ email: 'jane@example.com',
231
+ phone: '+15559876543',
232
+ message: 'Happy Birthday!',
233
+ addressTwo: 'Suite 5B'
234
+ });
235
+ ```
236
+
237
+ **Available fields:**
238
+ - `firstName`, `lastName`
239
+ - `email`, `phone`
240
+ - `message`
241
+ - `addressTwo`
242
+
243
+ ### Update Billing Information
244
+
245
+ Pre-fill billing address:
246
+
247
+ ```javascript
248
+ window.LiquidCommerce.elements.actions.checkout.updateBillingInfo({
249
+ firstName: 'John',
250
+ lastName: 'Doe',
251
+ email: 'john@example.com',
252
+ phone: '+15551234567',
253
+ addressOne: '789 Elm St',
254
+ addressTwo: 'Floor 2',
255
+ city: 'Chicago',
256
+ state: 'IL',
257
+ zipCode: '60601'
258
+ });
259
+ ```
260
+
261
+ **Available fields:**
262
+ - `firstName`, `lastName`
263
+ - `email`, `phone`, `company`
264
+ - `addressOne`, `addressTwo`
265
+ - `city`, `state`, `zipCode`
266
+
267
+ ### Get Checkout Details
268
+
269
+ ```javascript
270
+ const checkoutData = window.LiquidCommerce.elements.actions.checkout.getDetails();
271
+
272
+ console.log(checkoutData);
273
+ // {
274
+ // token: 'abc123xyz',
275
+ // cartId: 'cart_abc123',
276
+ // items: { 'cart_item_id': { ... } },
277
+ // amounts: {
278
+ // subtotal: 9998,
279
+ // tax: 800,
280
+ // shipping: 500,
281
+ // tip: 200,
282
+ // total: 11498
283
+ // },
284
+ // isGift: false,
285
+ // ...
286
+ // }
287
+ ```
288
+
289
+ ### Load Delivery Slots
290
+
291
+ Load the delivery windows for one fulfillment that has scheduled delivery. `getDetails().deliveryScheduling` is keyed by fulfillment ID:
292
+
293
+ ```javascript
294
+ const actions = window.LiquidCommerce.elements.actions.checkout;
295
+ const [fulfillmentId] = Object.keys(actions.getDetails().deliveryScheduling);
296
+
297
+ const slots = await actions.loadDeliverySlots(fulfillmentId);
298
+ // [{ id: 'option_1:1791475200', start: '2026-10-08T16:00:00.000Z', end: '2026-10-08T17:00:00.000Z', cutoff: '2026-10-08T15:00:00.000Z' }, ...]
299
+ ```
300
+
301
+ ### Choose Delivery Slot
302
+
303
+ Save a window from the last loaded list, or `null` for as soon as possible:
304
+
305
+ ```javascript
306
+ await window.LiquidCommerce.elements.actions.checkout.chooseDeliverySlot(fulfillmentId, slots[0].id);
307
+
308
+ // As soon as possible (only when availability.canDeliverNow is true)
309
+ await window.LiquidCommerce.elements.actions.checkout.chooseDeliverySlot(fulfillmentId, null);
310
+ ```
311
+
312
+ The promise rejects when the window was not offered, the fulfillment is unknown or another checkout update is in flight. See the [checkout actions reference](../api/actions/checkout-actions.md#delivery-scheduling-actions).
313
+
314
+ ## Events
315
+
316
+ ### Checkout Lifecycle
317
+
318
+ ```javascript
319
+ window.addEventListener('lce:actions.checkout_loaded', (event) => {
320
+ console.log('Checkout loaded');
321
+ });
322
+
323
+ window.addEventListener('lce:actions.checkout_opened', (event) => {
324
+ console.log('Checkout opened');
325
+ });
326
+
327
+ window.addEventListener('lce:actions.checkout_closed', (event) => {
328
+ console.log('Checkout closed');
329
+ });
330
+
331
+ window.addEventListener('lce:actions.checkout_failed', (event) => {
332
+ console.error('Checkout failed:', event.detail.data.message);
333
+ });
334
+ ```
335
+
336
+ ### Customer Information
337
+
338
+ ```javascript
339
+ window.addEventListener('lce:actions.checkout_customer_information_updated', (event) => {
340
+ const { cartId } = event.detail.data;
341
+ console.log('Customer info updated for cart:', cartId);
342
+ });
343
+ ```
344
+
345
+ ### Gift Information
346
+
347
+ ```javascript
348
+ window.addEventListener('lce:actions.checkout_is_gift_toggled', (event) => {
349
+ const { isActive } = event.detail.data;
350
+ console.log('Gift mode:', isActive ? 'enabled' : 'disabled');
351
+ });
352
+
353
+ window.addEventListener('lce:actions.checkout_gift_information_updated', (event) => {
354
+ console.log('Gift recipient updated');
355
+ });
356
+ ```
357
+
358
+ ### Billing Information
359
+
360
+ ```javascript
361
+ window.addEventListener('lce:actions.checkout_billing_same_as_shipping_toggled', (event) => {
362
+ const { isActive } = event.detail.data;
363
+ console.log('Billing same as shipping:', isActive);
364
+ });
365
+
366
+ window.addEventListener('lce:actions.checkout_billing_information_updated', (event) => {
367
+ console.log('Billing address updated');
368
+ });
369
+ ```
370
+
371
+ ### Marketing Preferences
372
+
373
+ ```javascript
374
+ window.addEventListener('lce:actions.checkout_marketing_preferences_toggled', (event) => {
375
+ const { fieldName, isActive } = event.detail.data;
376
+ console.log(`Marketing ${fieldName}:`, isActive);
377
+ });
378
+ ```
379
+
380
+ ### Items Management
381
+
382
+ ```javascript
383
+ window.addEventListener('lce:actions.checkout_item_removed', (event) => {
384
+ const { cartItemId } = event.detail.data;
385
+ console.log('Item removed:', cartItemId);
386
+ });
387
+
388
+ window.addEventListener('lce:actions.checkout_item_quantity_increase', (event) => {
389
+ const { cartItemId, quantity } = event.detail.data;
390
+ console.log(`Item ${cartItemId} quantity: ${quantity}`);
391
+ });
392
+
393
+ window.addEventListener('lce:actions.checkout_item_quantity_decrease', (event) => {
394
+ const { cartItemId, quantity } = event.detail.data;
395
+ console.log(`Item ${cartItemId} quantity: ${quantity}`);
396
+ });
397
+ ```
398
+
399
+ ### Delivery Method
400
+
401
+ Fires when the shopper switches a single-item checkout between same-day delivery and shipping. The
402
+ switch is shown only with `development.enableExpressCheckout: true`, the same opt-in as express
403
+ checkout.
404
+
405
+ ```javascript
406
+ window.addEventListener('lce:actions.checkout_delivery_method_updated', (event) => {
407
+ const { fulfillmentType, previousFulfillmentType } = event.detail.data;
408
+ console.log(`Delivery method: ${previousFulfillmentType} to ${fulfillmentType}`);
409
+ });
410
+ ```
411
+
412
+ ### Delivery Time
413
+
414
+ Fires once after checkout accepts a delivery window or as soon as possible, from the built-in picker or from `chooseDeliverySlot`.
415
+
416
+ ```javascript
417
+ window.addEventListener('lce:actions.checkout_delivery_selection_updated', (event) => {
418
+ const { deliveryScheduling } = event.detail.data;
419
+ console.log('Delivery windows by fulfillment:', deliveryScheduling);
420
+ });
421
+ ```
422
+
423
+ ### Tips
424
+
425
+ ```javascript
426
+ window.addEventListener('lce:actions.checkout_tip_updated', (event) => {
427
+ const { deliveryTips } = event.detail.data;
428
+ const total = deliveryTips.reduce((sum, t) => sum + t.tip, 0);
429
+ console.log('Tip amount:', total / 100);
430
+ });
431
+ ```
432
+
433
+ ### Payment & Submission
434
+
435
+ ```javascript
436
+ window.addEventListener('lce:actions.checkout_submit_started', (event) => {
437
+ console.log('Processing payment...');
438
+ // Show loading state
439
+ });
440
+
441
+ window.addEventListener('lce:actions.checkout_submit_completed', (event) => {
442
+ const { orderNumber } = event.detail.data;
443
+ console.log('Order completed:', orderNumber);
444
+ // Redirect to confirmation page
445
+ });
446
+
447
+ window.addEventListener('lce:actions.checkout_submit_failed', (event) => {
448
+ const { message } = event.detail.data;
449
+ console.error('Payment failed:', message);
450
+ // Show error message
451
+ });
452
+
453
+ // The card form could not load Stripe.js (fires again for each failed Try again)
454
+ window.addEventListener('lce:actions.checkout_payment_form_failed', (event) => {
455
+ const { reason } = event.detail.data; // 'blocked' | 'timeout' | 'error'
456
+ console.warn('Card form unavailable:', reason);
457
+ });
458
+ ```
459
+
460
+ ### Express Checkout
461
+
462
+ ```javascript
463
+ // Wallet availability settled or changed (always fires at least once per block)
464
+ window.addEventListener('lce:actions.checkout_express_checkout_availability', (event) => {
465
+ const { data } = event.detail;
466
+ console.log(data.available ? `Wallets: ${data.wallets.join(', ')}` : 'No wallets available');
467
+ });
468
+
469
+ // The shopper tapped a wallet button and its sheet opened
470
+ window.addEventListener('lce:actions.checkout_express_checkout_started', (event) => {
471
+ console.log(`Wallet sheet opened: ${event.detail.data.wallet}`);
472
+ });
473
+ ```
474
+
475
+ ### Promo Codes
476
+
477
+ ```javascript
478
+ window.addEventListener('lce:actions.checkout_promo_code_applied', (event) => {
479
+ const { discount, newTotal } = event.detail.data;
480
+ console.log(`Promo applied: $${discount / 100} off`);
481
+ });
482
+
483
+ window.addEventListener('lce:actions.checkout_promo_code_removed', (event) => {
484
+ console.log('Promo code removed');
485
+ });
486
+
487
+ window.addEventListener('lce:actions.checkout_promo_code_failed', (event) => {
488
+ const { error } = event.detail.data;
489
+ console.error('Promo code failed:', error);
490
+ });
491
+ ```
492
+
493
+ ### Gift Cards
494
+
495
+ ```javascript
496
+ window.addEventListener('lce:actions.checkout_gift_card_applied', (event) => {
497
+ const { newTotal } = event.detail.data;
498
+ console.log('Gift card applied, new total:', newTotal / 100);
499
+ });
500
+
501
+ window.addEventListener('lce:actions.checkout_gift_card_removed', (event) => {
502
+ console.log('Gift card removed');
503
+ });
504
+
505
+ window.addEventListener('lce:actions.checkout_gift_card_failed', (event) => {
506
+ const { error } = event.detail.data;
507
+ console.error('Gift card failed:', error);
508
+ });
509
+ ```
510
+
511
+ ### Product Add to Checkout
512
+
513
+ ```javascript
514
+ window.addEventListener('lce:actions.checkout_product_add_success', (event) => {
515
+ const { itemsAdded, identifiers } = event.detail.data;
516
+ console.log(`Added ${itemsAdded} items to checkout`);
517
+ });
518
+
519
+ window.addEventListener('lce:actions.checkout_product_add_failed', (event) => {
520
+ const { error } = event.detail.data;
521
+ console.error('Failed to add to checkout:', error);
522
+ });
523
+ ```
524
+
525
+ ## California Proposition 65 Warning
526
+
527
+ When the shipping address is in California, the order summary shows a panel directly above the
528
+ place-order button reading **Adult signature (21+) required at delivery.** followed by
529
+ **CA WARNING · California Proposition 65 information for these products**, so the warning is
530
+ presented before the purchase completes. The text links to the OEHHA alcohol page,
531
+ [www.P65Warnings.ca.gov/alcohol](https://www.p65warnings.ca.gov/alcohol), in a new tab. The full
532
+ 27 CCR § 25607.4 text is on the product element.
533
+
534
+ The panel appears in the drawer checkout, the hosted checkout and the checkout-only build. The
535
+ whole panel, adult-signature notice included, is shown only for a California shipping address; it
536
+ appears or disappears when the address changes, and nothing renders in its place otherwise. Neither can be turned off or reworded by configuration. Its colours follow `global.layout.poweredByMode` — the same
537
+ light/dark switch the Stripe payment form uses — as a fixed pair so the copy is always legible:
538
+ `light` is `#18181B` on `#F5F3EE`, `dark` is `#F5F3EE` on `#2A2824`. The font and corner radius come
539
+ from your theme. If your checkout is dark, set `poweredByMode: 'dark'`.
540
+
541
+ ## Customization
542
+
543
+ ### Theme Configuration
544
+
545
+ ```javascript
546
+ const client = await Elements('YOUR_API_KEY', {
547
+ env: 'production',
548
+ customTheme: {
549
+ checkout: {
550
+ theme: {
551
+ backgroundColor: '#ffffff'
552
+ },
553
+ layout: {
554
+ allowGiftCards: true,
555
+ exitUrl: 'https://yoursite.com/shop',
556
+ continueShoppingUrl: 'https://yoursite.com/shop',
557
+ drawerHeaderText: 'Checkout',
558
+ placeOrderButtonText: 'Complete Purchase'
559
+ }
560
+ }
561
+ }
562
+ });
563
+ ```
564
+
565
+ ## Payment Integration
566
+
567
+ The SDK uses Stripe for payment processing. Payment form is embedded and handles:
568
+ - Credit/debit cards
569
+ - PCI compliance
570
+ - 3D Secure authentication
571
+
572
+ No additional Stripe integration code needed - it's built-in.
573
+
574
+ ### Cookie consent and Content Security Policy
575
+
576
+ The card form runs on Stripe.js, which the SDK loads from `https://js.stripe.com` when the payment
577
+ step opens. Two things on a host page can stop it loading:
578
+
579
+ - **Cookie-consent tools with auto-blocking** (OneTrust, Cookiebot and similar) hold back every
580
+ script in a category the shopper has not accepted. If Stripe is filed under anything other than
581
+ strictly necessary, a shopper who declines that category cannot pay by card. Classify Stripe — the
582
+ `js.stripe.com` script and the cookies it sets — as **Strictly Necessary**, or exclude it from
583
+ auto-blocking. Card payment does not work without it.
584
+ - **A Content Security Policy** has to allow Stripe.js: `https://js.stripe.com` in `script-src` and
585
+ `frame-src`, and `https://api.stripe.com` in `connect-src`. Stripe's
586
+ [CSP guidance](https://docs.stripe.com/security/guide#content-security-policy) lists the full set.
587
+
588
+ When Stripe.js cannot load, or loads but cannot build the card form, the shopper sees a message and a **Try again** button where the card form
589
+ would be, rather than an empty space. A script held back by a consent tool asks them to allow
590
+ cookies; a load that stalled or failed points them at their connection or an ad blocker. The SDK also
591
+ fires [`lce:actions.checkout_payment_form_failed`](./events.md) with a `reason` of `blocked`, `timeout`
592
+ or `error`, so the page can respond:
593
+
594
+ ```javascript
595
+ window.addEventListener('lce:actions.checkout_payment_form_failed', (event) => {
596
+ const { reason } = event.detail.data;
597
+ if (reason === 'blocked') {
598
+ // Stripe is held back by consent settings: reopen your consent tool's preferences here.
599
+ }
600
+ });
601
+ ```
602
+
603
+ ### Express checkout (Apple Pay and Google Pay)
604
+
605
+ Apple Pay and Google Pay are offered as express checkout buttons at the top of the checkout, above
606
+ the gift toggle. Tapping one collects the shopper's contact and billing details from the wallet and
607
+ places the order without them completing the checkout forms.
608
+
609
+ Express checkout is off by default: pass `development.enableExpressCheckout: true` in the client config to show it. Without it the checkout element renders
610
+ no express block, and the injection methods below render nothing and resolve to `null`.
611
+
612
+ > **Temporary:** this flag exists only while express checkout and the delivery-method switch are being verified. Once they are confirmed, the flag will be removed and both will always be on.
613
+
614
+ Once enabled, express checkout is offered to every shopper whose platform can show a wallet. Each wallet is
615
+ requested with Stripe's `always` policy, so the button renders wherever the device supports it rather
616
+ than only where Stripe judges it good for conversion. The block hides itself entirely — heading,
617
+ buttons and divider — in four cases: the device or browser offers no wallet, the order is a
618
+ gift, a payment method is already bound to the checkout, or Stripe.js fails to load. Subscribe to
619
+ [`lce:actions.checkout_express_checkout_availability`](./events.md) to know which state you are in.
620
+
621
+ Two things are required outside the SDK:
622
+
623
+ - **The page must be served over HTTPS.** Stripe requires this in development as well as production;
624
+ the wallet buttons do not render on a plain-HTTP page.
625
+ - **Every domain that serves the buttons must be registered with Stripe** for the account issuing the
626
+ publishable key, in both sandbox and live mode. Stripe requires this for Apple Pay and Google Pay
627
+ alike, and it covers subdomains: `shop.example.com` is registered separately from `example.com`.
628
+ Registering in live mode registers the sandbox too. This applies per partner domain.
629
+
630
+ Approving the wallet sheet hands the order to the **express completion view**, which replaces the
631
+ checkout form the moment the sheet closes. The view saves the shopper's name, email and phone from
632
+ the wallet as the checkout's customer and binds the approved payment method; the wallet's billing
633
+ address goes to Stripe with that payment method, and the order's own billing address stays the one
634
+ the checkout already holds. Then it asks for the one thing no wallet returns — the shopper's **date
635
+ of birth** — with the same 21+ validation as the form, and places the order from its **Complete
636
+ order** button. A date the shopper already typed into the form is used instead, and the view goes
637
+ straight to placing the order. When the partner has turned off **Require date of birth** in the
638
+ builder (`checkout.layout.requireBirthDate: false`), the view skips the step and places the order as
639
+ soon as the payment method is bound. A shopper can step **back to checkout** from the view; the
640
+ payment method stays bound, and the form asks for the date of birth itself when one is required.
641
+
642
+ If the wallet sheet itself fails — a declined authorisation, or a total that changed while it was
643
+ open — the sheet reports the reason and nothing is handed on. Anything that fails after the sheet
644
+ has closed is reported on the view, with a retry. The order is placed only for the checkout and the
645
+ total the sheet was opened for: the server verifies both against the wallet's intent at completion,
646
+ so a total that moved in between is refused there as well and the shopper approves again.
647
+
648
+ The wallet tap is also refused, with nothing charged, when a cart is below a retailer's minimum
649
+ purchase amount — the same condition that keeps the Place Order button disabled. Presale checkouts
650
+ are exempt from it, as they are there.
651
+
652
+ Express checkout is not offered on a gift order: a gift needs the recipient's name, email, phone and
653
+ message, and no wallet returns any of them. Turning on "Send as a gift" hides the block, and turning
654
+ it back off restores it.
655
+
656
+ The buttons are not confined to the checkout element. Inject them anywhere on the page with
657
+ `injectExpressCheckoutElement()` on the full client, or `injectExpressCheckout()` on the
658
+ checkout-only client.
659
+
660
+ ## Checkout Flow
661
+
662
+ ### Standard Flow
663
+
664
+ 1. Customer opens checkout (from cart or direct)
665
+ 2. Reviews order summary
666
+ 3. Enters shipping information
667
+ 4. Enters payment information
668
+ 5. Optionally enters billing address
669
+ 6. Reviews total (with promo codes, gift cards, tips)
670
+ 7. Places order
671
+ 8. Sees order confirmation
672
+
673
+ ### Gift Flow
674
+
675
+ 1. Customer enables "Send as Gift"
676
+ 2. Enters their billing/payment information
677
+ 3. Enters recipient's shipping information
678
+ 4. Adds gift message (optional)
679
+ 5. Places order
680
+ 6. Confirmation shows gift delivery details
681
+
682
+ ## Presale Products
683
+
684
+ Checkouts with presale items show:
685
+ - Countdown timer for presale expiration
686
+ - Expected delivery date
687
+ - Special handling for presale orders
688
+
689
+ When presale expires:
690
+ - Shows expiration notice
691
+ - Disables checkout submission
692
+
693
+ ## Best Practices
694
+
695
+ ### Pre-fill Known Information
696
+
697
+ If you have customer data, pre-fill it:
698
+
699
+ ```javascript
700
+ // After user logs in
701
+ if (userIsLoggedIn) {
702
+ window.addEventListener('lce:actions.checkout_opened', () => {
703
+ window.LiquidCommerce.elements.actions.checkout.updateCustomerInfo({
704
+ firstName: currentUser.firstName,
705
+ lastName: currentUser.lastName,
706
+ email: currentUser.email,
707
+ phone: currentUser.phone
708
+ });
709
+ });
710
+ }
711
+ ```
712
+
713
+ ### Track Conversion Funnel
714
+
715
+ ```javascript
716
+ const checkoutFunnel = {
717
+ loaded: false,
718
+ infoEntered: false,
719
+ paymentEntered: false,
720
+ submitted: false
721
+ };
722
+
723
+ window.addEventListener('lce:actions.checkout_loaded', () => {
724
+ checkoutFunnel.loaded = true;
725
+ gtag('event', 'begin_checkout');
726
+ });
727
+
728
+ window.addEventListener('lce:actions.checkout_customer_information_updated', () => {
729
+ if (!checkoutFunnel.infoEntered) {
730
+ checkoutFunnel.infoEntered = true;
731
+ gtag('event', 'checkout_progress', { step: 'customer_info' });
732
+ }
733
+ });
734
+
735
+ window.addEventListener('lce:actions.checkout_submit_completed', (event) => {
736
+ gtag('event', 'purchase', {
737
+ transaction_id: event.detail.data.orderNumber,
738
+ value: event.detail.data.orderTotal / 100,
739
+ currency: 'USD'
740
+ });
741
+ });
742
+ ```
743
+
744
+ ### Handle Submission States
745
+
746
+ ```javascript
747
+ window.addEventListener('lce:actions.checkout_submit_started', () => {
748
+ // Disable navigation
749
+ window.onbeforeunload = () => 'Payment in progress...';
750
+
751
+ // Show loading overlay
752
+ showGlobalLoadingOverlay('Processing your order...');
753
+ });
754
+
755
+ window.addEventListener('lce:actions.checkout_submit_completed', () => {
756
+ // Re-enable navigation
757
+ window.onbeforeunload = null;
758
+
759
+ // Redirect to confirmation
760
+ window.location.href = '/order-confirmation';
761
+ });
762
+
763
+ window.addEventListener('lce:actions.checkout_submit_failed', () => {
764
+ // Re-enable navigation
765
+ window.onbeforeunload = null;
766
+
767
+ // Hide loading
768
+ hideGlobalLoadingOverlay();
769
+ });
770
+ ```
771
+
772
+ ## Configuration Options
773
+
774
+ ### Enable/Disable Features
775
+
776
+ ```javascript
777
+ checkout: {
778
+ layout: {
779
+ allowGiftCards: true, // Show gift card input
780
+ requireBirthDate: true, // Require a date of birth to place an order
781
+ emailOptIn: {
782
+ show: true, // Show email opt-in checkbox
783
+ checked: false, // Default unchecked
784
+ text: 'Subscribe to our newsletter'
785
+ },
786
+ smsOptIn: {
787
+ show: false, // Hide SMS opt-in checkbox
788
+ checked: false, // Default unchecked
789
+ text: 'Receive SMS updates'
790
+ }
791
+ }
792
+ }
793
+ ```
794
+
795
+ ### Button Text
796
+
797
+ ```javascript
798
+ checkout: {
799
+ layout: {
800
+ placeOrderButtonText: 'Complete Purchase'
801
+ }
802
+ }
803
+ ```
804
+
805
+ ## Troubleshooting
806
+
807
+ ### Checkout Not Opening
808
+
809
+ 1. Verify cart has items: `window.LiquidCommerce.elements.actions.cart.getDetails()`
810
+ 2. Check for JavaScript errors in console
811
+ 3. Ensure SDK is initialized: `window.LiquidCommerce.elements`
812
+ 4. Try manually: `window.LiquidCommerce.elements.actions.checkout.openCheckout()`
813
+
814
+ ### Payment Form Not Loading
815
+
816
+ If the Payment section reads "Your cookie settings are blocking our secure payment form", a consent
817
+ tool on the page is holding Stripe.js back — see
818
+ [Cookie consent and Content Security Policy](#cookie-consent-and-content-security-policy).
819
+ Otherwise:
820
+
821
+ 1. Check internet connection (Stripe requires network)
822
+ 2. Verify Stripe is not blocked by ad blockers or the page's Content Security Policy
823
+ 3. Listen for `lce:actions.checkout_payment_form_failed` and check its `reason`
824
+ 4. Check browser console for Stripe errors
825
+ 5. Ensure your API key is valid
826
+
827
+ ### Customer Info Not Pre-filling
828
+
829
+ 1. Verify you're calling `updateCustomerInfo()` after checkout loads
830
+ 2. Check field names match exactly (case-sensitive)
831
+ 3. Ensure values are strings, not other types
832
+ 4. Listen for checkout_opened event before updating
833
+
834
+ ### Order Submission Failing
835
+
836
+ 1. Check all required fields are filled
837
+ 2. Verify payment information is valid
838
+ 3. Look for validation errors in UI
839
+ 4. Check console for detailed error messages
840
+ 5. Ensure products are still available
841
+
842
+ ## See Also
843
+
844
+ - [Cart Component](./cart-component.md) - Shopping cart functionality
845
+ - [Actions API](../api/actions/checkout-actions.md) - Checkout actions reference
846
+ - [Events](./events.md) - All available events
847
+ - [Theming](./theming.md) - Customize appearance
848
+
849
+ ### Preparing complete account delivery details
850
+
851
+ After `lce:actions.checkout_loaded`, call
852
+ `await elements.actions.checkout.updateCustomerInfo(fields, { saveIfValid: true })`
853
+ to validate and prepare complete account details, then show their editable summary.
854
+ Supply names, email, a US phone number, and a real `birthDate` in `MM/DD/YYYY` format
855
+ (age 21+, year 1930 or later). The `birthDate` may be blank when the partner does not require a
856
+ date of birth (`checkout.layout.requireBirthDate: false`); a supplied one is still validated.
857
+ A shipping street must already be selected.
858
+ Omitted apartment and delivery instructions retain their existing checkout values.
859
+ Partial or invalid details stay in the form; backend validation failures reject the
860
+ promise, show the checkout error, and keep details editable. The host should handle that rejection.
861
+
862
+ The option skips gifts, saved forms, in-flight saves, and customer forms the shopper
863
+ has edited during the current checkout. It does not overwrite those forms. Edits or
864
+ address/checkout changes during preparation prevent a stale response from closing
865
+ the form. Without the option, this action only prefills fields, as before.
866
+
867
+ Apple Pay and Google Pay selection displays **Continue with Apple Pay** or
868
+ **Continue with Google Pay**. This opens the wallet to save a payment method; the
869
+ shopper still reviews and places the order afterward. It is not express checkout.
870
+
871
+ After wallet cancellation, the same Continue action remains available. If authorization
872
+ succeeded but saving the method failed, **Retry saving Apple Pay/Google Pay** reuses
873
+ the existing authorization rather than opening the wallet again.
874
+
875
+ ### Saved account marketing preferences
876
+
877
+ ```ts
878
+ setSavedMarketingPreferences(preferences: { canEmail?: boolean; canSms?: boolean }): Promise<void>
879
+ clearSavedMarketingPreferences(): void
880
+ ```
881
+
882
+ Call `actions.checkout.setSavedMarketingPreferences()` with known recorded account
883
+ choices, including `false`, before checkout loads. Only boolean values are used;
884
+ missing/null/unrecognized values remain unknown. The first checkout prepare uses
885
+ saved values instead of tenant defaults. Each channel's prompt is hidden only
886
+ after the server confirms that saved choice. Unknown channels retain their normal
887
+ checkout prompts. The actions are available in both full and checkout-only clients.
888
+
889
+ Calling the setter during an active checkout prepares untouched channels and
890
+ preserves shopper checkbox edits. Backend failure rejects the promise, displays
891
+ an error, and leaves prompts available; the host should catch the rejection.
892
+ The same call can retry. Applying values does not call a subscription service.
893
+ It supplies the account's recorded choices to this checkout.
894
+
895
+ Saved choices persist across cart resets in the same SDK session. Call
896
+ `clearSavedMarketingPreferences()` on sign-out, account change, and host cleanup.
897
+ Clearing reveals the prompts and restores configured guest defaults. It invalidates
898
+ stale responses while draining outstanding preference requests; checkout completion
899
+ prepares the current choices before submitting the checkout token. A load already
900
+ in progress still finishes and reconciles the current account's values. Bind a new
901
+ account only to its own checkout; the host remains responsible for account/cart
902
+ ownership and for reloading checkout when identity changes.
903
+
904
+ Order completion waits for queued preference work. It cannot race a late saved
905
+ opt-out or proceed with an unconfirmed saved choice. If applying a known choice
906
+ fails, the shopper can retry or explicitly choose the visible channel preference.
907
+
908
+ ## Scheduled delivery
909
+
910
+ When an AccelPay retailer has scheduled delivery turned on, checkout shows a **Delivery time** row for that delivery, between the delivery details and payment. It reads "As soon as possible" while the store can deliver now, or asks for a window when it cannot. The row's button reads **Schedule** while the row is on as soon as possible, **Edit** after a window is saved, and **Schedule delivery** when the shopper must choose a window. It opens a dialog that loads the windows for that delivery: date cards for today and the next 7 days, then arrival windows in the retailer's time zone, named once above the list ("Times in Eastern Time"). The window list scrolls inside the dialog and keeps the chosen window in view. The first window shows "Order by" with its cutoff, and **As soon as possible** sits next to it when the store can deliver now. Choices are drafts until **Save**; Cancel, Close and Escape discard them.
911
+
912
+ The accepted window shows in the row and on the items in the order summary ("Scheduled for Thu, Oct 8, 1 PM – 2 PM ET"), and on the thank-you page as "Delivery time" with "Thu, Oct 8, 1 PM – 2 PM ET". An ASAP order adds no line there. If the window's cutoff passes before the order is placed, the SDK clears it, shows "Your delivery window has passed. Choose a new delivery time.", reopens the picker and keeps Place Order disabled until a new choice is saved. If the store no longer offers the window, the same happens with "Your delivery window is no longer available. Choose a new delivery time." Everything else the shopper entered stays.
913
+
914
+ A store that was added to the cart while closed cannot deliver now, so checkout asks for a window and offers no ASAP. If a store closes after the shopper chose ASAP, Place Order answers `delivery_window_required`: the SDK shows "The store cannot deliver now. Choose a delivery time.", opens the picker and keeps Place Order disabled until a window is saved.
915
+
916
+ In a checkout with more than one fulfillment group (another store, or shipping), each same-day group with scheduled delivery gets its own **Delivery time** row and its own picker, which loads that group's windows. Its button reads **Schedule this store's delivery** (**Edit** after a window is saved), and the picker is named after the store ("Schedule delivery from Columbus Avenue Wines"). Every prepare sends each group's current choice, so saving one group keeps the other's window. A group whose store can deliver now stays on as soon as possible; a group whose store cannot needs its own window before payment and Place Order. When a window lapses, only that group's window is cleared and only its picker reopens: the SDK clears the window whose cutoff passed on the page, and for `delivery_window_required` marks the groups that have no window. When an error names its group (`fulfillmentId` on the error entry), only that group is cleared; when it names none and the SDK cannot place it, every saved window is cleared. Until each store that cannot deliver now has a window, payment says which: "Choose a delivery window for Amsterdam Liquors before continuing." In an order with more than one fulfillment group, the thank-you page has one line per group, named after its store: the accepted window for a scheduled group ("Columbus Avenue Wines" with "Thu, Oct 8, 1 PM – 2 PM ET"), and the group's own expectation for the others ("Harbor Spirits" with "Ships in 3-5 days"). A scheduled group never shows the as-soon-as-possible expectation. While a store that cannot deliver now has no accepted window, the express wallet buttons stay off, like the card form. When checkout refuses a store that has scheduled delivery and also another delivery method (`multiple_fulfillment_options_per_store`, code 5516), the SDK shows the refusal as the checkout error and keeps the saved windows: "Scheduled delivery cannot be combined with another delivery method from the same store. Choose ASAP delivery, or use one delivery method for all items from this store." When that store is closed now, the text leaves out ASAP: "This store is closed now. Use one delivery method for all items from this store." When Place Order is refused, the SDK reads the cart again and decides "closed now" from its `deliveryAvailability`, because a store can close after the last prepare. Place Order and the express wallet stay off until a prepare succeeds after a change to the cart or to a delivery choice.
917
+
918
+ In the delivery-method switch, a same-day method whose `deliveryAvailability` says the store cannot deliver now but can schedule shows "Schedule delivery" in place of its delivery estimate. Without `deliveryAvailability` the card shows the estimate as before.
919
+
920
+ Checkouts without scheduled delivery are unchanged. For a custom UI, see `actions.checkout.loadDeliverySlots` and `actions.checkout.chooseDeliverySlot` in the checkout actions reference, and the `checkout_delivery_selection_updated` event.