Skip to content

feat(point-of-sale): add paymentmethodselected intercept types - #4611

Open
aaronschubert0 wants to merge 1 commit into
2026-10-rcfrom
pos-intercept-payment-method-selected
Open

feat(point-of-sale): add paymentmethodselected intercept types#4611
aaronschubert0 wants to merge 1 commit into
2026-10-rcfrom
pos-intercept-payment-method-selected

Conversation

@aaronschubert0

@aaronschubert0 aaronschubert0 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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: paymentmethodselected, dispatched when staff selects a payment method on the payments screen.

Follows the pattern established in #4520 (beforecheckout):

  • New POS_INTERCEPT_NAMES entry: PAYMENT_METHOD_SELECTED: 'paymentmethodselected'
  • New ShopifyInterceptMap entry so shopify.intercept() picks up the workflow through the map generic — no changes to globals.ts
  • New payload types: PaymentMethodSelectedEvent, InterceptedPaymentMethod, InterceptedPaymentMethodType

InterceptResult / Operation / ValidationAdd are shared unchanged: ERROR blocks the selected method, WARNING does not.

Payload

  • paymentMethod: {type, identifier?}type is a stable string vocabulary (the internal numeric PaymentOptionType never crosses the boundary), constrained to 'cash' for v1; further method kinds join the union as they become interceptable. identifier is 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:

  • No split-payment context — interceptors see each split leg's amount independently; cross-leg aggregation (e.g. structuring detection) is future work.

References

@aaronschubert0
aaronschubert0 force-pushed the pos-intercept-payment-method-selected branch from 1953c8d to 5843221 Compare August 11, 2026 12:44
Assisted-By: devx/815595f2-0ce0-49e1-87fc-903983c87fa6
@aaronschubert0
aaronschubert0 force-pushed the pos-intercept-payment-method-selected branch from 5843221 to d5dd478 Compare August 11, 2026 12:51
@aaronschubert0
aaronschubert0 marked this pull request as ready for review August 11, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant