Skip to main content
Enrollment had two sub-modes that paralleled the payment modes: a UI-driven flow (mountEnrollmentLite) and a headless flow (apiClientEnroll). Both collapse into the same Transaction class in the unified API. What changes is the session you pass (customerSession instead of checkoutSession) and whether you provide pre-collected data in paymentMethod.data.

Before you start

  • Load the unified SDK bundle instead of the legacy one and initialize it as the side-by-side shows: window.Yuno.initialize(...) becomes SdkPayments.initialize(...). Your public API key and the customer sessions your backend creates do not change (Before you begin).
  • There is no payment to create. An enrollment config does not accept createPayment, showPayButton or the other payment-only fields. Remove them.

Side-by-side

Enrollment Lite (UI)

Enrollment Headless

What changes

Grouped in the order you edit the code. Renamed: same role, new name. Moved: same value, new owner. Removed: nothing to call. The last column is the only thing you have to do beyond the rename.

Initialization and config

Callbacks

Entry points