Skip to content

feat(web): define accelerated checkout merchant contract - #798

Draft
rsomlette wants to merge 1 commit into
wallets/release-02-local-developmentfrom
wallets/release-03-merchant-contract
Draft

rsomlette wants to merge 1 commit into
wallets/release-02-local-developmentfrom
wallets/release-03-merchant-contract

Conversation

@rsomlette

Copy link
Copy Markdown

Review purpose

Define the merchant-facing TypeScript and custom-element contract without introducing wallet loading, network requests, or Portable Wallets behavior.

Stacked on wallets/release-02-local-development.

Changes

  • add configure() patch semantics, including explicit clearing with undefined
  • support equivalent scalar attributes and properties for storefront context, product inputs, layout, and wallet count
  • add the Buy Now getCart function contract
  • add callback and display-error types
  • preserve properties assigned before custom-element upgrade
  • publish all wallet contract types from @shopify/checkout-kit/wallets
  • model the existing-cart input as an opaque CartIdentifier
  • keep cartId property-only so it is not reflected into markup

Contract note

The current API proposal gives an existing cart precedence over product inputs. Ticket #14699 currently says mixed inputs should be rejected. This PR follows the current proposal and intentionally does not close that ticket until its acceptance wording is reconciled.

The transport representation of CartIdentifier remains unresolved. This PR does not normalize a full keyed Storefront Cart ID as the public contract.

Non-goals

  • validation side effects or lifecycle notifications
  • invoking getCart
  • wallet configuration bootstrap
  • Portable Wallets loading
  • payment, completion, recovery, or navigation

Related tickets

Primary: https://github.com/shop/issues-checkout/issues/14699

Related:

This PR defines API shapes used by the related tickets but does not claim their runtime acceptance criteria.

Validation

  • web lint and typecheck
  • 266 web tests
  • production package build
  • multi-page sample build
  • publint
  • package snapshot comparison

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant