From Web SDK v2
| Change | Action |
|---|---|
| partnerId removed from init | Pass clientId only. Resolve partner configuration through authentication. |
| features.loadingScreen removed | Remove custom loading-screen options and the removed type. |
| Default hosted origin is now vton.spreeai.com | Review explicit baseURL overrides and CSP frame-src rules with your approved environment. |
| Dialog layout changed | Re-check custom dialog CSS, mobile full-screen behavior and scroll / focus handling. |
Current initialization
TypeScript
import { init } from "@spreeai/web-sdk";
const sdk = await init({ clientId: "YOUR_ISSUED_CLIENT_ID" });
if (sdk) {
await sdk.renderTryOnButton({
elementId: "spreeai-try-on",
garments: [{ garmentId: "YOUR_READY_GARMENT_ID" }],
features: { tryOnButton: { text: "Try it on you" } },
});
}From legacy v1
Replace the single tryOnButton() call with one init() call and one or more sdk.renderTryOnButton() calls. Replace the old single garment input with garments. Update cart handling for a garments array rather than a single garment.
Migration checklist
- Record the installed package, known working hosted build and approved configuration.
- Pin v3.0.0 and compile the updated integration in staging.
- Check authentication, single garment, variant matching and outfit fallback.
- Test size display, sizing recommendations and cart handling only where supported.
- Run the production checklist on desktop and mobile.
- Promote through the approved process. Keep a known working package and configuration available for rollback.
Rollback
If authentication, product eligibility or purchase behavior regresses, stop the rollout and restore the last verified compatible package and configuration. Preserve reproduction steps and correlation IDs. Confirm the restored experience rather than relying on a successful deploy alone.