Context
Commerce publishes its catalogue to outside AI shopping agents and accepts their carts (STA-764), but the owner ruled that an agent never pays alone: the shopper confirms in their own wallet. The agent commerce protocols (a delegated payment token, a signed cart mandate) each prove that confirmation differently.@stackra/payments had no port for
the proof and no flow that refuses an unconfirmed agent payment.
Tap to Pay on iPhone and Android is a launch item in the US and for Academorix (US-36, RV-45). ADR 0378 decided that
Stripe Terminal’s Tap to Pay is a SoftPos driver of the server-driven family, in the Expo staff app over Stripe’s
native SDK. Vendor server drivers live in OS integrations (R3-8), and this package may not take a native SDK.
Decision
- Agent payments need a wallet confirmation. The
AgentCommerceProtocolsport answers what a protocol’s proof confirms (AgentConfirmation: protocol, agent, reference, amount, confirmed and expiry times, the wallet’sSavedMethod). The host binds it over the protocol connectors in OS integrations. Which protocols are on is a connector catalogue row per pack, and merchants opt in per channel. This package names no protocol. PaymentService.agentCheckout. It takes a payment only when the proof verifies, names the same reference, is unexpired and covers the amount in its currency. Otherwise it refuses withAgentConfirmationRefusedError(missing,reference,expired,amount). It then charges the wallet token as a customer-initiatedcharge, so theunknownstate, one payment per reference, the connected-account cap and the connection choice are unchanged. The record keepsagent(protocol and agent) for the channel tag and audit. Agent order limits are rule documents in the product.- The SoftPos family. The
SoftPosport (readiness,connect,collect,cancel) is bound on the phone. The server half stays onPaymentService:startTerminalwithsoftPos: trueasks forPaymentCapability.SoftPosand the session carries the provider’sclientSecretfor the phone.capture,cancelTerminalandreconcileare unchanged. The card never reaches the platform. - Stripe Tap to Pay through a bridge.
StripeTapToPaySoftPosDriver(driverstripe-tap-to-pay) talks to Stripe only through theStripeTerminalBridgeport. The staff app binds that port over Stripe Terminal’s React Native SDK (discovery, the connection-token provider, the native module). The package carries no SDK, key or dependency. This is the one vendor-named code in@stackra/payments, allowed because it runs on the device and has no server Connection. The Stripe Connection that opens the session (a card-present intent with its client secret) and serves connection tokens stays in OS integrations. - Choice is data. Which SoftPos driver a Market uses is pack data (
payments.softpos). Device eligibility comes from the device catalogue. The Tap to Pay entitlement per app bundle is alaunch-gate:<pack>:<product>row (0378 decision 5).
Consequences
- OS integrations writes the agent protocol connectors and binds
AgentCommerceProtocols. Until it does, a host binds the memory driver or takes no agent payment (missing). - The Stripe Connection in OS integrations adds
PaymentCapability.SoftPos, returnsclientSecreton a tap-to-pay session and serves the SDK’s connection token. - The Expo staff app binds
StripeTerminalBridgeandSoftPos, and holds the Tap to Pay entitlement per bundle.
Open
- One Gulf SoftPOS SDK driver per pack (Geidea or Checkout.com), waiting on vendor access (
external:gulf-softpos-sdk). - The host-side picker that reads
payments.softposand selects among SoftPos drivers, once there are two.