Skip to main content
General
Admin Panel

Organizations

View organizations and use the billing controls included in the admin table.

Open MarkdownFull AI corpusFeedback

The Organizations page at /dashboard/admin/organizations is the shipped admin interface for organization records, subscription summaries and credit balances.

Table Contents

Each row displays:

  • Organization name and logo
  • Member count
  • Latest subscription status and a plan label derived from the stored Stripe price ID
  • Current credit balance
  • Pending invitation count
  • Creation date

The list does not include an organization owner, slug, payment history or full credit transaction history.

Search, Filters and Sorting

Search matches organization names. The table can filter by:

  • Member count
  • Creation date
  • Subscription status
  • Credit balance range

Sorting is supported for name and creation date. The schema accepts membersCount, but the current Prisma router falls back to name sorting for that value.

components/admin/organizations/organizations-table.tsx
const { data, isPending } = trpc.admin.organization.list.useQuery({
  limit: 25,
  offset: 0,
  query: '',
  sortBy: 'name',
  sortOrder: 'asc',
  filters: {
    membersCount: ['1-5'],
    subscriptionStatus: ['active'],
    balanceRange: ['low'],
    createdAt: ['this-month']
  }
});

Row Actions

The row menu includes these actions:

  • Adjust credits calls trpc.admin.organization.adjustCredits
  • Open in Stripe opens an active subscription in the Stripe Dashboard
  • Cancel subscription calls trpc.admin.organization.cancelSubscription with immediate: false
  • Sync from Stripe calls trpc.admin.organization.syncFromStripe for the selected organization
  • Delete calls trpc.admin.organization.delete

Cancellation is available only for an active subscription that is not already scheduled to cancel. The local subscription record is updated by the Stripe webhook.

Bulk Actions

Selected organizations can be:

  • Exported to CSV
  • Exported to Excel
  • Synchronized with Stripe

The current table does not include bulk deletion, bulk credit adjustments or bulk subscription cancellation.

Returned Billing Fields

trpc.admin.organization.list returns one latest subscription summary and one credit balance per organization. Relevant fields include:

  • subscriptionId
  • subscriptionStatus
  • subscriptionPlan
  • cancelAtPeriodEnd
  • trialEnd
  • credits