Driftwatch

Square / Square API /

Breakingdirection flip: their tools call this safe

value can now return "QR_CODE"

What changed

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

Affects this value on CheckoutOptionsPaymentType reachable from 5 operations.

New value: QR_CODE.

can now return "QR_CODE"

Who is affected

Code that reads Square's CheckoutOptionsPaymentType objects, used by 5 Square operations.

Before and after

WhereBeforeAfter
CheckoutOptionsPaymentType"CARD_PRESENT", "FELICA_ALL", "FELICA_ID", "FELICA_QUICPAY", "FELICA_TRANSPORTATION_GROUP", "MANUAL_CARD_ENTRY", "PAYPAY""CARD_PRESENT", "FELICA_ALL", "FELICA_ID", "FELICA_QUICPAY", "FELICA_TRANSPORTATION_GROUP", "MANUAL_CARD_ENTRY", "PAYPAY", "QR_CODE"

Code that breaks

switch (response) {
  // existing branches …
  // no branch for "QR_CODE"
  default:
    throw new Error("unexpected value");
}

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