v1.2.6 - Optional product type for a simpler products payload #
CheckoutProduct.type is now optional and deprecated — the backend resolves item vs subscription from the catalog code, so you can build a products[] payload with just code and quantity. Display caching now keys on code alone.
12 Jun 2026
FloPay SDK v1.2.6 simplifies the products payload by making CheckoutProduct.type optional. The billing API resolves whether an entry is a one-time item or a recurring subscription from the catalog code, so consumers no longer need to classify products themselves when creating a session. Existing integrations that still pass type keep working unchanged.
What changed
CheckoutProduct.typeis now optional and deprecated. You can build aproducts[]entry with justcode(andquantity); the backend resolves item-vs-subscription from the catalog code.typeis still accepted, and when supplied it refines the client-side optimistic display rendered before the session response loads (subscriptions are listed first).- Display-cache merging in
PaymentAPInow keys products oncodealone (code:{code}) rather than the previoustype:codecomposite. Cached display data merges back correctly even when the create-side payload omittedtype. buildSyntheticSessiondefaults a product'stypeto'item'when it is omitted, so synthetic session previews remain stable.
Why it matters
- Building a checkout session is simpler: a product is identified by its catalog
code, removing a redundant field consumers previously had to set correctly. - The catalog code is now the single product identity used for display merging, so optimistic rendering and the session response reconcile reliably regardless of whether
typewas provided.
Developer notes
- Upgrade
@flopay/js,@flopay/react,@flopay/node, and@flopay/sharedtogether to1.2.6. - No code change is required for integrations that still pass
typeonproducts[]— the field remains supported during the deprecation window. - New integrations can omit
typeand passcode(plusquantity) only. Optionally passtypeif you want subscriptions ordered first in the pre-response optimistic display. - No request/response shapes returned by the billing API have changed.