Skip to main content

Management Portal

1. Overview

The Management Portal is the internal admin surface for platform staff and support operators. It manages organizations as the top-level tenant, locations as the canonical child records, and keeps a smaller set of location-scoped sub-pages for day-to-day operations and support follow-through. It uses Firebase Authentication with SAML SSO for enterprise identity provider integration.

Terminology note: the current gateway data model is Organization -> Location. Some management endpoints and older UI copy still use legacy merchant naming as a compatibility alias. When this page references /api/v1/merchants/* or merchantAccess, read that as the concrete location-scoped surface unless called out otherwise.

Closeout note: for docs and launch communication, the preferred story is now organization/location-first. Legacy merchant route and claim names remain here only where they still match the shipped wire contract or claim shape.

2. Authentication Architecture

Firebase Auth + SAML SSO

┌──────────────┐ ┌────────────────┐ ┌──────────────────┐
│ User │ │ Firebase │ │ Enterprise │
│ Browser │ │ Auth │ │ IdP (SAML) │
└──────┬───────┘ └───────┬────────┘ └────────┬─────────┘
│ │ │
│ 1. Click "SSO Login"│ │
│────────────────────>│ │
│ │ │
│ │ 2. SAML AuthnRequest │
│ │──────────────────────>│
│ │ │
│ │ 3. User authenticates │
│ │ at IdP │
│ │ │
│ │ 4. SAML Response │
│ │<──────────────────────│
│ │ │
│ 5. Firebase ID Token│ │
│<────────────────────│ │
│ │ │
│ 6. Use token to call│ │
│ Management API │ │

Auth Methods Supported

MethodUse Case
SAML SSOPrimary, enterprise customers with their own IdP (Okta, Azure AD, Google Workspace)
Email/PasswordFallback, small merchants without an IdP
MFA (TOTP)Required for admin-level roles

Firebase Configuration

// Firebase Auth SAML provider configuration
const samlProvider = new SAMLAuthProvider('saml.pinpoint-gateway');

// Provider config (set via Firebase Admin SDK)
{
providerId: 'saml.pinpoint-gateway',
idpEntityId: '<customer-idp-entity-id>',
ssoURL: '<customer-sso-url>',
x509Certificates: ['<customer-cert>'],
rpEntityId: 'pinpoint-gateway-portal',
callbackURL: 'https://portal.pinpointgateway.com/__/auth/handler'
}

Role-Based Access Control (RBAC)

RolePermissions
super_adminAll operations. Manage SAML providers. System configuration.
adminManage organizations/locations, users, view all reports. Cannot configure SAML.
merchant_adminLegacy role label for a user who manages assigned organization/location settings, users, and reports.
merchant_userLegacy role label for a user who can view assigned organization/location reports and process manual transactions.
readonlyView-only access to assigned location data.

Roles are stored as Firebase Custom Claims and validated server-side by the Management Microservice.

The role names merchant_admin and merchant_user are still present in the claim shape, but they should be read as compatibility labels for organization/location-scoped access, not as a preferred merchant-first model.

2.1 Rename guardrails

Safe statements:

  • the portal manages organizations and locations as the primary tenant model
  • legacy merchantAccess and /api/v1/merchants/* references are compatibility surfaces
  • older UI copy may still say "merchant" where the runtime contract has not yet been renamed

Unsafe statements:

  • that merchantAccess represents a different scope model from location access
  • that new portal UX or docs should keep introducing fresh merchant-first terminology
  • that all route names and claims are already fully renamed

3. Portal Features

3.1 Dashboard

  • Transaction volume summary (today, this week, this month)
  • Revenue summary
  • Decline rate and top decline reasons
  • Recent transaction list
  • System health status

3.2 Organization and Location Management

FeatureDescription
Create locationBoard a new location and attach it to the correct organization
Edit locationUpdate location settings, MID/TID, contact info
Suspend/activateToggle location processing capability
View locationFull location profile with transaction history
List locationsPaginated, searchable location directory (legacy /merchants API alias still exists)

3.2.1 Organization cutover workflow

The current admin-facing closeout path for the organization/location rename is:

  1. Open Organizations and drill into the target organization.
  2. Use the cutover checklist on organization detail to confirm:
    • a default credential profile is selected
    • at least one credential profile is active
    • pending approvals are cleared
    • at least one active location exists
    • any remaining legacy merchant aliases are known support exceptions
  3. Use the organization-detail Operator Shortcuts to jump into:
    • Event Log with organizationId prefilled
    • Gift Cards with organizationId prefilled
    • Tax Configs with organizationId prefilled
  4. Only treat the org as rename-closeable when the checklist is green and the supporting admin surfaces no longer depend on merchant-only interpretation.

What is promised:

  • organization detail is the canonical admin handoff surface for rename cleanup
  • Event Log, Gift Cards, and Tax Configs can now be opened in organization- scoped mode directly from organization detail
  • legacy merchant aliases are treated as support and migration artifacts, not as the preferred tenant model

What is not promised:

  • that every API route name is already renamed away from /merchants
  • that legacy claims such as merchantAccess have disappeared from the wire
  • that every downstream service has fully removed merchant-shaped compatibility aliases

3.3 Transaction Management

FeatureDescription
Transaction searchBy date range, amount, card last 4, status, location
Transaction detailFull transaction lifecycle (auth → capture → settle)
Manual voidVoid an uncaptured authorization
Manual refundProcess a return/refund on a settled transaction
Manual keyed entryProcess a manually keyed sale (virtual terminal equivalent)
ExportCSV/PDF export of transaction reports

3.4 Settlement & Reporting

FeatureDescription
Daily settlement reportBatch totals, transaction counts, net amounts
Reconciliation statusMatch our records vs TransIT settlement
Monthly statementPer-location monthly processing summary
Custom reportsDate range, location, card type filters

3.5 User Management

FeatureDescription
Create userInvite user via email, assign role
Edit userChange role, assigned organizations/locations
Disable/enableToggle user access
Audit logUser login history, actions performed

3.6 SAML SSO Configuration (super_admin only)

FeatureDescription
Add SAML providerConfigure new IdP (entity ID, SSO URL, certificate)
Test SAML connectionValidate IdP configuration
Edit SAML providerUpdate IdP settings
Remove SAML providerDecommission an IdP connection

4. Technical Stack

LayerTechnology
FrameworkReact 19 + Vite
LanguageTypeScript
StylingTailwind CSS
Componentsshadcn/ui
AuthFirebase Auth SDK (Web v9+)
Auth UI@firebase-oss/ui-react
StateReact hooks + page-local async loaders
ChartsRecharts on analytics/reporting pages
TablesRepo-local table primitives
FormsReact Hook Form + Zod validation
Routinghash-based route state inside the SPA shell
BuildVite + TypeScript (Bazel-compatible workspace build)
TestingVitest + Playwright (E2E)

5. API Integration

The portal communicates exclusively with the Management Microservice REST API.

Key Endpoints Consumed

GET /api/v1/organizations # List organizations
GET /api/v1/organizations/{id} # Organization detail
GET /api/v1/organizations/{id}/locations # Organization child locations
GET /api/v1/organizations/{id}/credential-profiles
POST /api/v1/organizations/{id}/credential-profiles/{profileId}/approve
POST /api/v1/organizations/{id}/credential-profiles/{profileId}/reject

GET /api/v1/merchants # List locations (legacy route alias)
POST /api/v1/merchants # Create location (legacy route alias)
GET /api/v1/merchants/{id} # Get location (legacy route alias)
PUT /api/v1/merchants/{id} # Update location (legacy route alias)
PATCH /api/v1/merchants/{id}/status # Suspend/activate location

GET /api/v1/webhook-events # Org-scoped event log browser
GET /api/v1/webhook-events/{id} # Event detail
GET /api/v1/webhook-events/{id}/deliveries

GET /v1/organizations/{orgId}/gift-cards
GET /v1/organizations/{orgId}/gift-cards/liability
GET /v1/organizations/{orgId}/tax-configs

GET /api/v1/transactions # Search transactions
GET /api/v1/transactions/{id} # Get transaction detail
POST /api/v1/transactions/{id}/void # Void transaction
POST /api/v1/transactions/{id}/refund # Refund transaction
POST /api/v1/transactions/manual # Manual keyed entry

GET /api/v1/settlements # List settlement batches
GET /api/v1/settlements/{id} # Settlement detail

GET /api/v1/reports/daily # Daily report
GET /api/v1/reports/monthly # Monthly report
GET /api/v1/reports/custom # Custom date range

GET /api/v1/users # List users
POST /api/v1/users # Create user
PUT /api/v1/users/{id} # Update user
DELETE /api/v1/users/{id} # Disable user

GET /api/v1/audit-log # Audit trail

Auth Header

Authorization: Bearer <firebase-id-token>

The Management Microservice validates the Firebase ID token, extracts custom claims (role and legacy merchantAccess / merchantIds location-targeting fields), derives permissions server-side, and enforces RBAC.

Organization detail now deep-links to several admin surfaces with hash-query prefill:

  • #/event-log?organizationId=org_xxx
  • #/gift-cards?organizationId=org_xxx
  • #/tax-configs?organizationId=org_xxx

These links are intentionally portal-local convenience flows. They do not imply that every backend endpoint is query-string driven; they are an admin UX layer for carrying organization context through rename cleanup and support triage.

5.1 Docs-side closeout checklist

Treat the portal docs as repo-closeable for the rename when this page makes all of the following explicit:

  • organization/location is the preferred product and UX model
  • merchantAccess / merchantIds are legacy location-targeting compatibility claims
  • /api/v1/merchants/* examples are read as current wire compatibility, not as the desired long-term naming
  • support and launch communication can repeat this page without implying a separate merchant-first tenant model still exists

6. Deployment

  • Hosting: Firebase Hosting (CDN-backed static hosting) or Cloud Run (SSR)
  • Domain: portal.pinpointgateway.com (TBD)
  • TLS: Managed by Firebase Hosting / Cloud Load Balancer
  • Build artifact: Static export or Docker container (depending on SSR needs)