Returning customers
Returning-customer behavior is built from two pieces: identity and continuity.
Identify the customer
plandalf.identify(userJwt);Use a server-signed JWT for account-specific purchases. A plain email string is not decoded as customer identity by the backend. On logout, call reset() and start fresh with session: null; resetting identity is separate from session continuity.
Resume within a tab or browser
plandalf.present("pro-plan", {
continuity: "tab"
});For longer purchase decisions, use browser continuity.
plandalf.present("annual-plan", {
continuity: "browser"
});Resume from a token
plandalf.present("pro-plan", {
session: "cks_..."
});Start fresh
plandalf.present("pro-plan", {
session: null,
continuity: false
});