Repository navigation
Conversation
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #428 after renaming its branch to
vctrchu/pos-payment-intercept-feature-preview. Prior review discussion remains on #428.Background
Provide an independent, minimal cash-payment intercept example for the POS intercept feature preview. This draft is for review and testing and does not depend on or modify the cart-intercept draft #431.
Related SDK changes: Shopify/ui-extensions#4713 and Shopify/ui-extensions#4714.
Solution
pos-payment-intercept/and a payment-onlytemplates.pos-payment-intercept.jsonopt-in catalog exposingpos_payment_intercept. Leave the publictemplates.jsonand existing POS templates unchanged.paymentvalidationswithblocking = trueandapplies_to = ["cash"]underpos.app.ready.data, paired withpos.payment.validations.resolution.render.ERRORat$.payment. The resolution target displays the intercepted method and amount and registersshopify.resolution.onSave; Shopify-owned Save/Next/Done waits for the handler before POS revalidates.2026-10, SDK2026.10.0-rc.13, Preact, and offline support.Prior verification (from the original PR)
shopify app build --skip-dependencies-installationplustsc --noEmit -p extensions/pos-onsave-payment/tsconfig.jsonin a disposable app.onSaveregistration, no write before POS save, awaited fingerprint storage, matching payment revalidation, changed-payment invalidation, and failed writes that keep the finding active.Cannot find a valid organization. Real POS behavior remains unverified and requires an approved app in a preview-enabled POS environment.Verification of the latest template fixes
src/payment_intercept/background.js,cash_review.js, andpayment_resolution.jsxmatch the configured modules.shopify app buildin an isolated generated app.Generate for the feature preview
Run these commands from your Shopify app root—the directory containing
shopify.app.toml. To create an app first, follow Build your first POS UI extension. Change--nameif you want a different extension name.What these commands do:
curl --fail --location … --output /tmp/…downloads this branch's temporary template catalog.--failstops on an HTTP error,--locationfollows redirects, and/tmpkeeps the temporary file outside the app.SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH=… shopify app generate extension …uses that catalog for this invocation. The catalog registers the temporary template identifier and maps it to its Preact directory.--clone-urlsupplies the branch containing the actual template files; it does not register the identifier.--namecontrols the generated extension name, and--path "$PWD"adds it to the current Shopify app.The custom catalog replaces CLI's default template catalog only for this command.
Use Shopify CLI 4.8.0 or later; do not pass
--flavor. These branch URLs are only for the feature preview. Deployment and runtime testing still require an approved app and preview-enabled POS environment.Checklist