Session continuity
Control whether draft checkout sessions resume in a tab, across the browser, from a token, or from a fresh session.
Session continuity controls whether present() starts a new checkout session or resumes a draft session.
Continuity scopes
| Scope | Storage | Use it for |
|---|---|---|
false | none | Every checkout starts fresh. This is the default. |
tab | sessionStorage | Resume within the current tab only. |
browser | localStorage | Resume across tabs and browser restarts. |
plandalf.present("pro-plan", { continuity: "tab" });
plandalf.present("application", { continuity: "browser" });
plandalf.present("flash-addon", { continuity: false });
Resume a specific session token
plandalf.present("pro-plan", {
session: "cks_..."
});
Pass session: null to force a fresh session even when a token is present.
plandalf.present("pro-plan", {
session: null
});
Identity and continuity
If you call identify(jwt), Plandalf can evaluate customer identity when it creates or resumes the checkout session. Continuity and identity are separate:
- identity says who the visitor is
- continuity says which draft session to use
URL resume
The SDK can scan a cks_ token from the URL and consume it on the first present() call. After that, the token is cleared so later checkouts do not reuse the same handoff.
Related docs
Builder context
Move from SDK setup to the commerce surface.
SDK docs cover install, identity, gates, events, and React integration. The linked product surfaces show what the SDK is presenting or listening for.