PrimerCheckoutState, observed via PrimerCheckoutController.state. There is no separate event callback.
Earlier previews delivered outcomes through a
PrimerCheckoutEvent type and an onEvent lambda on PrimerCheckoutSheet / PrimerCheckoutHost. Both were removed — Success and Failure are now cases of PrimerCheckoutState.Outcomes
Success
Reached when payment completes successfully. Only emitted inAUTO payment handling mode.
Failure
Reached when a payment fails or an error occurs.Reacting to outcomes
success / error slots on PrimerCheckoutSheet render the in-sheet result screens; observe state when you need to react programmatically (navigate, log, clear the cart).