Two teams can ship exactly the same line of page code and get different answers from the same host. That is useful when a company wants to open its app to independent teams but still decide which capabilities each service may use. It also gives a developer something precise to test. Does the host make the decision, does an approved request actually reach the underlying operation and can a page continue when the answer is no?
We ran a small local experiment with an intentionally ordinary capability. A page asks for the host’s accent colour. An approved page uses the host colour, indigo. A page without a grant uses its own graphite default. Nothing else about the experience needs to change. We registered two sample service identities with a Node.js reference host and pointed both to the same page function. This exercises the decision and fallback in memory. A FinClip runtime, a mobile device and an operating-system permission prompt were outside the experiment.
One host decision and one page decision
The host owns the registry, the identity associated with each launch and the set of approved callers. When it starts a page, it gives the page a small interface bound to that launch. The page can request an accent colour through the interface. It never supplies an app ID or decides whether it has permission. The host checks its grant and calls the underlying colour reader only when the grant is present.
The page owns a different decision. It chooses what state to present when it receives either answer. A missing colour is a perfectly survivable condition. Keeping the page ready in both cases means a host can reserve access to a capability without making the whole service unusable. Whether a particular business service can proceed after a refusal depends on what it needs the capability for.
Swap the grant and keep the code fixed
We first enabled the capability for the catalogue and left the guide without a grant. Then we moved the grant to the guide. The source of both pages, the underlying colour reader and the host implementation stayed fixed throughout. Each run checked the recorded decision, how often the underlying operation was called and the resulting page state.
| Grant configuration | Service | Host answer | Calls to colour reader | Page state |
|---|---|---|---|---|
| Initial | Catalogue | Granted | 1 | Ready, indigo |
| Initial | Guide | Declined | 0 | Ready, graphite |
| Swapped | Catalogue | Declined | 0 | Ready, graphite |
| Swapped | Guide | Granted | 1 | Ready, indigo |
Looking only at the colour would make this a weak test. A page could display its default after a successful call and the picture would still look right. Counting calls lets us distinguish a capability that ran from a request declined before the underlying operation. Swapping the grants checks that the result follows the host’s current policy even though the two service identities stay the same.
Run the four checks
Save this as host.mjs and run node host.mjs. Our run used Node v24.22.3 and the built-in assertion library. The script runs in one process with no network or package dependencies. Each successful line shows the grant configuration, service ID, recorded decision, number of calls to the colour reader and final accent. An assertion failure stops execution.
import assert from "node:assert/strict" function openPage(bridge) { const theme = bridge.readAccent() if (theme.status === "granted") { return { status: "ready", accent: theme.value } } return { status: "ready", accent: "graphite" } } const registry = new Map([ ["catalogue", openPage], ["guide", openPage] ]) const approved = new Set(["catalogue"]) let reads = 0 function readHostAccent() { reads += 1 return "indigo" } function launch(appId) { const page = registry.get(appId) const decisions = [] const readsBefore = reads const bridge = { readAccent() { if (!approved.has(appId)) { decisions.push("declined") return { status: "declined" } } decisions.push("granted") return { status: "granted", value: readHostAccent() } } } const state = page(bridge) return { decisions, reads: reads - readsBefore, state } } function check(round, appId, decision, count, accent) { const result = launch(appId) assert.deepEqual(result, { decisions: [decision], reads: count, state: { status: "ready", accent } }) console.log(round, appId, decision, result.reads, result.state.accent) } check("initial", "catalogue", "granted", 1, "indigo") check("initial", "guide", "declined", 0, "graphite") approved.delete("catalogue") approved.add("guide") check("swapped", "catalogue", "declined", 0, "graphite") check("swapped", "guide", "granted", 1, "indigo") Where this fits in a real Mini App platform
The interface and status strings in this example belong to the reference host. In a FinClip implementation, the app owner can implement a custom capability in its Host App and configure the API for participating Mini Apps. FinClip’s application management documentation describes public and private custom APIs, including application and approval for private ones. The Android integration guide shows how a host developer implements and registers a custom API. Those are separate jobs for the people defining the platform’s offer and the people maintaining its native code. FinClip application management · FinClip Android integration guide
A useful follow-up in the target environment is to implement the harmless colour capability in the actual host, assign test identities to two Mini Apps and grant one of them access. Use the callbacks documented for that environment and capture what each page renders. The response format, when a changed permission takes effect and what happens to an already open page all need to be observed there. In our local program a new launch reads the current grant set every time.
This separation gives two teams a practical agreement. The host team can show which service it authorised and whether the underlying operation ran. The service team can show what its page does with either outcome. Once both have evidence, they can change their own side with a much clearer idea of when the other team needs to be involved.