Mode 2 — Headless
Lunixi.portal.create() returns an API client and nothing else — it draws no screens. The HTML of the steps below belongs entirely to the demo page; in your application it would be your own design.
The one exception is the card field: the card number is collected inside a Lunixi iframe and never touches your page. So you keep the whole interface while PCI scope stays off you.
The card step opens a real verification authorization. Run it while the merchant is wired to the TestBank acquirer.
What to look at
Each of the five steps maps to a single client call:
| Step | Call |
|---|---|
| 1. Session | client.init() |
| 2. Email verification | client.requestOtp() → client.verifyOtp(code) |
| 3. Plan selection | client.plans() |
| 5. Card verification | Lunixi.checkout.createCardField() → lunixi:checkout:success event |
| — | client.addCard() → client.startSubscription() |
Once the subscription starts, the buttons at the bottom call client.subscriptions(), client.invoices() and client.cards() — the endpoints you would use to feed your own dashboard.
What you need first
Your dashboard session's bearer token, a customer ID, an allow-listed origin, and HEADLESS among the allowed modes — details in the Overview.