onReady, onChange, onSubmit, onError, onFocus, and onBlur. Non-wallet elements additionally expose onEscapeKeyPressed. Wallet elements (applePay, googlePay) and Checkout expose onClick. Wallet elements, bank, and Checkout expose onExit.
Subscribing
Every element handle exposes.on(name, handler) returning the same handle for chaining:
elementType. Payloads are discriminated by elementType, so a single handler that receives an event from any element narrows correctly.
Event matrix
Elements that do not emit a given event omit the key from their event map, so subscribing is a TypeScript error and a runtime no-op (with a console warning).
Payload envelope
Every payload extends a base:onChangeaddscomplete,value, and (optionally)errors. Wallets and Checkout add extras (device availability, method availability).onSubmitaddsvalue(non-null by construction).onErroraddscode,message, and (optionally)fieldErrorsandcause.onClick(wallets and Checkout) addspreventDefault,resolve,reject. Checkout additionally addspaymentMethod.onExit(bank and Checkout) adds Plaid metadata or thepaymentMethoddiscriminator.
complete versus value !== null versus errors.length === 0
These three look interchangeable but are not:
Always drive submit-button state off
complete. It is the only flag whose semantics are consistent across every element, including wallets and Checkout.