Payment Orchestrator
Subscription
Demo Screens
Overview

Demo Screens

These screens are the subscription surface actually running — not screenshots, not mockups. Each one talks to the real API. Every screen opens with a connection box where you paste your own keys; no key is ever committed to the page source.

⚠️

The demo screens are for test environments. The card step opens a 1.00 TRY verification authorization + 3DS — run them while the merchant is wired to the TestBank acquirer. The screens are noindex, and API calls are rejected until this domain is added to the allowed-origins list in the dashboard.

The screens

Each one runs embedded in its own page inside these docs — they are in the sidebar too.

ScreenModeWhat it showsKey required
Pricing pageMode 0 — CatalogPlans and branding for anonymous visitorsPublishable key
Full portal flowMode 1 — Prebuilt UIOne mount(): OTP → plan → card → subscription → dashboardMerchant bearer token
Your own UIMode 2 — HeadlessEvery screen is yours, the API is oursMerchant bearer token
Partial embedMode 3 — HybridYour plan list + Lunixi's card componentMerchant bearer token
Customer portal linkHostedNo code at all, just a cp_ linkPortal token

Every screen also runs standalone: the “Open in a new tab” link at the top right of each demo takes you to the full-screen version.

Before you run them

Enable SDK embed

In the dashboard under Subscription → Portal Settings → SDK Embed Security, SDK Embed must be on. While it is off, only the hosted portal works.

Add your origin to the allow-list

Add the address you will open the demo from to the allowed origins list on the same screen. Matching is exact — no wildcards; the scheme and port must match character for character. Calls from an origin that is not listed are rejected.

Select the allowed modes

Check the modes you intend to use under Allowed SDK Modes. An empty list means all modes are permitted. With FULL off Mode 1 fails at bootstrap, with HEADLESS off Mode 2 fails, with HYBRID off Mode 3 fails.

Get your key

A publishable key from the dashboard for the catalog demo; your dashboard session's bearer token for the other three modes. The hosted portal demo needs neither — only the cp_ token you generate on the Portal Links screen.

Publish at least one active plan

Dashboard → Subscription → Plans. With no published active plan the lists come back empty and the flow stops at plan selection.

Where the keys are kept

The demo screens carry no key in their source and send none to any server of ours:

  • Merchant bearer token and portal token → sessionStorage. Cleared when you close the tab.
  • API/CDN addresses and publishable key → localStorage. Both are public values anyway.
🚫

The demo screens call sdk-session from the browser so you can watch the integration flow live. This is not the production pattern: POST /api/v1/subscriptions/portal/sdk-session is protected by BearerAuthGuard and must be called from your own server. The only things that should reach the browser are the returned portalToken and sessionProof.

Flow at a glance

All four modes share one spine; what differs is who draws which part.

Opening a portal sessionSequence: your server requests a portal session and receives a token; the browser starts with that token, requests email verification and receives the session key once verified.POST /portal/sdk-sessionportalToken + sessionProofrequestOtp()session JWTYour backendBrowserLEGENDSERVERBROWSER
Your server opens the session and the browser takes it over: portalToken is minted with the secret key and only that token reaches the browser. No customer data is readable before verification completes.
Who draws the stepMode 0Mode 1Mode 2Mode 3
Plan listyouLunixiyouyou
OTP screen—Lunixiyouyou
Card form—LunixiLunixi (iframe)Lunixi
Dashboard—Lunixiyouyou

For endpoint contracts and code samples see Pricing & Portal SDK; for the portal session model see Customer Portal.

Common failures

What the log saysCauseFix
sdk-session failed (HTTP 401)Bearer token expired or wrongGet a fresh token from the dashboard
sdk-session failed (HTTP 403)Origin not allow-listed, or SDK embed offAdd the origin / turn embed on in Portal Settings
PORTAL_SESSION_REQUIREDThe card component requires a verified sessionComplete the OTP step first
Empty plan listNo active plan, or the portal link restricts plansPublish a plan / widen the link's allowed plans
Card field failed to loadThe checkout bundle could not be fetchedCheck the CDN address and any network/CSP restrictions