stubkit docs

Feature · Account

App groups

Sometimes one customer ships several apps that should share a subscription ("pay once for the whole suite"). Create an app group, drop two or more apps into it, and stubkit will aggregate entitlements across the group at lookup time.

How lookup works

  1. Your SDK calls stubkit.isActive(userId, "pro") for app A.
  2. Server finds all sibling apps in A's group.
  3. Server looks for users rows with the same external_id across every app in the group.
  4. Union all their subscriptions in active / grace / cancelled status and return the combined entitlement set.

When to use it

  • Two apps by the same company that already use the same user identity (same backend, same external IDs).
  • A base + pro version of the same app on different bundle IDs.

If your apps use different external IDs for the same person, use user links instead.

Constraints

  • An app belongs to at most one group at a time. This keeps aggregation O(N) and avoids ambiguity.
  • Grouped apps bypass the entitlement KV cache. One extra query per lookup, traded for correctness when a sibling app's sub changes.

REST endpoints

  • GET/POST /v1/admin/app-groups
  • PATCH/DELETE /v1/admin/app-groups/:id
  • POST /v1/admin/app-groups/:id/members — attach app
  • DELETE /v1/admin/app-groups/:id/members/:app_id — detach