Driftwatch

Stripe / Stripe API /

Breakingdirection flip: their tools call this safe

ui_mode can now return "elements", "embedded_page", "form", "hosted_page"

What changed

Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.

Affects ui_mode on checkout.session reachable from 15 operations.

New values: elements, embedded_page, form, hosted_page.

can now return "elements", "embedded_page", "form", "hosted_page"

Who is affected

Code that reads Stripe's checkout.session objects, used by 15 Stripe operations.

Before and after

WhereBeforeAfter
checkout.session.ui_mode"custom", "embedded", "hosted""custom", "elements", "embedded", "embedded_page", "form", "hosted", "hosted_page"

Code that breaks

switch (response.ui_mode) {
  // existing branches …
  // no branch for "elements"
  // no branch for "embedded_page"
  // no branch for "form"
  // no branch for "hosted_page"
  default:
    throw new Error("unexpected ui_mode");
}

Based on Stripe’s published API specification. How severity is decided.