feat(point-of-sale): add paymentvalidations intercept types - #4611
Merged
aaronschubert0 merged 4 commits intoAug 17, 2026
Conversation
aaronschubert0
force-pushed
the
pos-intercept-payment-method-selected
branch
from
August 11, 2026 12:44
1953c8d to
5843221
Compare
Assisted-By: devx/815595f2-0ce0-49e1-87fc-903983c87fa6
aaronschubert0
force-pushed
the
pos-intercept-payment-method-selected
branch
from
August 11, 2026 12:51
5843221 to
d5dd478
Compare
aaronschubert0
marked this pull request as ready for review
August 11, 2026 13:19
vctrchu
reviewed
Aug 13, 2026
| readonly paymentMethod: InterceptedPaymentMethod; | ||
|
|
||
| /** The amount this tender would charge, in presentment currency. */ | ||
| readonly amount: MoneyV2; |
Contributor
Author
There was a problem hiding this comment.
Reversed after discussion — dropping transactionId from v1. The host cannot guarantee an id at selection time (Transaction.id?), so the field would be unreliable at exactly the moment it dispatches; payload stays paymentMethod + amount. Can revisit if a concrete correlation need lands.
vctrchu
reviewed
Aug 13, 2026
…ymentvalidations Assisted-By: devx/8f5f2569-f126-402e-ae95-8081edfa5d81
…ations Assisted-By: devx/ec0d35cb-d0dc-42cc-bac7-60ff45d75c7c
aaronschubert0
force-pushed
the
pos-intercept-payment-method-selected
branch
from
August 14, 2026 13:28
c915032 to
576635e
Compare
js-goupil
approved these changes
Aug 14, 2026
Contributor
|
/snapshot |
vctrchu
approved these changes
Aug 14, 2026
aaronschubert0
added a commit
that referenced
this pull request
Aug 18, 2026
…cs (#4632) ## What Docs-only follow-up to #4611: pins `PaymentValidationsEvent`'s dispatch timing, which was settled after that PR merged. - Fires when a tender is **confirmed but not committed** — after the amount is entered, before the payment is recorded (previously read "when staff selects a payment method", which was the pre-settlement wording). - **One event per tender attempt**; split payments dispatch one event per tender, each carrying its own `amount`. - Replaces the rejected two-event proposal (method-selected + post-tender). Confirm-time is also why `amount` is per-tender meaningful: at selection time only the outstanding total exists; at confirm time the event carries the amount this tender actually charges. ## References - Types: #4611 (merged) · Release: #4622 (`2027.0.0-rc.5`) - API contract: Shopify/ui-api-design#1557 - POS host implementation (gates at `useCashPaymentSubmission`, before `addPayment`): shop/world#997831 → shop/world#1000498 → execution PR to follow
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.
Why
Enables payment-type interception (cash first) for extensible client-side validations — e.g. compliance workflows blocking cash tenders until required data is collected. Types-only and
@private.What
Adds the second interceptable workflow to the POS surface's private intercept API:
paymentvalidations, dispatched when staff selects a payment method on the payments screen.Follows the pattern established in #4520:
POS_INTERCEPT_NAMESentry:PAYMENT_VALIDATIONS: 'paymentvalidations'ShopifyInterceptMapentry soshopify.intercept()picks up the workflow through the map generic — no changes toglobals.tsPaymentValidationsEvent,InterceptedPaymentMethod,InterceptedPaymentMethodTypeAlso renames the first workflow per review, so both interceptable workflows follow one
*validationsnaming scheme:beforecheckout→cartvalidations(POS_INTERCEPT_NAMES.CART_VALIDATIONS,BeforeCheckoutEvent→CartValidationsEvent)2026-10-rconly,@private; the POS adapter consumes the constant symbolically (companion PR wiring bumps in lockstep)InterceptResult/Operation/ValidationAddare shared unchanged:ERRORblocks the selected method,WARNINGdoes not.Payload
paymentMethod: {type, identifier?}—typeis a stable string vocabulary (the internal numericPaymentOptionTypenever crosses the boundary), constrained to'cash'for v1; further method kinds join the union as they become interceptable.identifieris reserved for method types a shop can have several of (custom / local payment methods); unused for cash. Matching is exact on the pair.amount: MoneyV2— the per-tender amount in presentment currency.Intentionally minimal for v1:
References