iframe. Your app automatically inherits the merchant’s active organization context, theme, and time-range filters — and can react to real-time payment events via webhooks.
Installation
Install the core libraries required to communicate with the host dashboard and use our shared design system.Styling
Import the shared CSS so your app looks native inside the StellarTools dashboard.Bootstrap your app
Server-side verification
When StellarTools loads your app it appendsst_token to your baseUrl. This token is a signed JWT prefixed with st_app_ that contains the AppContext — the identity, permissions, and decrypted settings for this installation. Because your App Secret must never reach the browser, verification happens in a server action.
Client provider
Reads the token from the URL, calls the server action, and mounts the context for the entire component tree.StellarAppBootstrap ensures internal links and fetch calls resolve correctly inside the iframe.
Routing on settings
The root page readscontext.settings and routes the user — no fetch required. Settings are already decrypted inside the token.
AppContext reference
useStellarToolsContext() returns the full AppContext decoded from st_token.
Fetching data
useStellarToolsQuery wraps TanStack Query and automatically scopes cache keys to orgId + env + periodDays. Switching organizations or time windows triggers a fresh fetch with no extra config.
The fetcher receives the full AppContext as its argument — use it to access settings, ui.periodDays, or anything else from the token.
Resource hydration
Apps are webhook consumers and webhook event payloads contain only the primary resource. Use thest_app_ token to hydrate related objects when you need more detail.
Mutations and saving settings
useStellarToolsMutation wraps TanStack Query’s useMutation, injects the AppContext as the second argument, and gives you isPending for loading states.
Server action
updateSettings, the SDK automatically notifies the host dashboard to refresh its state.
In your component
First-time setup
On the authentication page, validate the user’s credentials before saving them. Returntrue on success, or an error string to display in the form.
Webhooks
When a matching event fires, StellarTools POSTs a signed payload to yourwebhookUrl. The body contains both the event and the installation’s decrypted settings — your handler can access merchant config without a database round-trip.
Verify and handle
Always check that the required setting (template ID, feature flag, etc.) is present before acting. Merchants may
install your app before completing setup.
Available events
For the complete list of event types, payloads, and object shapes see Webhook event types.The App Manifest
The manifest is the source of truth for your app’s identity and requirements. Submit it when publishing to the marketplace.string
required
Display name in the marketplace. 2–50 characters.
string
required
Short description shown on the listing card. Max 200 characters.
string
required
Your app’s public homepage.
string
required
The URL StellarTools loads inside the iframe.
st_token is appended as a query param automatically.string
If provided, StellarTools POSTs signed event payloads here. Omit if you don’t use webhooks.
string[]
required
Permissions requested at install time. Declare only what your app actually needs.
string[]
Keys in your settings that require encryption at rest. See Sensitive keys below.
Sensitive keys
Add any settings property that holds a secret (API keys, tokens, credentials) tosensitiveKeys. StellarTools will:
- Encrypt the value with a platform-level master key before writing it to the database.
- Decrypt it on-the-fly before delivering it to your app server via the
AppContextor webhook payload.
Scopes
Declare only the scopes your app strictly needs. Merchants see these permissions during installation.Environment variables
Deployment
Host your app on any provider (Vercel, AWS, etc.). Before submitting, ensure:baseUrlis accessible over HTTPS.YOUR_APP_SECRETis set in your production environment.- Your server correctly strips the
st_app_prefix before passing the raw JWT toverifyJwt.

