Skip to Content

AppLink

AppLink lets Finqu Apps communicate with Finqu services over PostMessage. Use it to build embedded admin UIs, dialogs, and resource views that run inside the Finqu Commerce administration.

When your app runs inside an iframe in the Commerce admin, it cannot access the parent window directly for security reasons. Your app needs a safe way to:

  • Receive context from the host (app instance id, session id)
  • React to host actions (open a dialog, navigate, load a resource)
  • Send messages back to the host (user confirmed, data saved, resize iframe)

AppLink provides a small API on top of PostMessage so you can initialize your app, subscribe to host messages by component group, and dispatch messages to the host—all with origin validation so only the intended admin can talk to your app.

When to use it

Use AppLink when you are building a Finqu App that:

  • Renders inside the Finqu Commerce administration (embedded in an iframe)
  • Needs to show dialogs, load product/order/customer resources, or trigger navigation
  • Should respond to host events (e.g. dialog confirm/close, resource save) and optionally send callbacks

If your app runs as a standalone page or in a different context, you typically do not need AppLink.

Installation

Install the package from npm:

npm install @finqu/app-link

Then import the App factory and any types you need:

import { App, ComponentGroup, ResourceType } from '@finqu/app-link';

Next steps

  • Getting started — Create your first app, use ready(), and read app and session ids.
  • App API — Full reference for create, ready, dispatch, subscribe, and more.
  • Messaging — How PostMessage and IMessage work, and how to subscribe or dispatch.
  • Component groups and resources — Dialog, Navigation, Resource, Checkout, and resource types.