Garment.id
🇺🇸 English
  • 🇮🇩 Indonesian
  • 🇺🇸 English
Home
Core APITenant APISupport CenterChangelog
Home
Core APITenant APISupport CenterChangelog
Github
Instagram
|
🇺🇸 English
  • 🇮🇩 Indonesian
  • 🇺🇸 English
🇺🇸 English
  • 🇮🇩 Indonesian
  • 🇺🇸 English
  1. Home
  • Introduction
  • 01 - Project Structure
  • 02 - Context Boundaries
  • 03 - Central Auth Runtime
  • 04 - Central Billing
  • 05 - Tenant Runtime
  • 06 - FE Integration Contracts
  • 07 - Security, Middleware, and RLS
  • 08 - Events, Jobs, Listeners, Notifications, Observers
  • 09 - Testing and Quality Gates
  • 10 - Operations Runbook
  • 11 - Architecture Decisions (ADR Ringkas)
  • 12 - API Endpoint Catalog (v1)
  • 13 - Class Catalog by Context
  • 14 - Feature Development Playbook
  • 15 - Migration and Model Conventions
  • 16 - Service, Support, and Trait Contracts
  • 17 - Auth Business Scenarios and Decision Tree
  • 18 - Config Reference and Impact
  • 19 - Migration and Model Cookbook
  • 20 - Billing and Provisioning Business Flows
  • 21 - FE Error Handling Matrix
  • 22 - Incident Playbooks
  • 23 - Data Ownership Matrix
  • 24 - Documentation Governance and Changelog
  • 25 - Tenant Authorization Backend Guide
Home
Core APITenant APISupport CenterChangelog
Home
Core APITenant APISupport CenterChangelog
Github
Instagram
|
🇺🇸 English
  • 🇮🇩 Indonesian
  • 🇺🇸 English
🇺🇸 English
  • 🇮🇩 Indonesian
  • 🇺🇸 English
  1. Home

05 - Tenant Runtime

Dokumen ini membahas endpoint tenant-scoped yang berjalan di tenant cluster context.

Scope#

Route files:
routes/tenant/billing.php
routes/tenant/integrations.php
routes/tenant/master-data.php
routes/tenant/taxonomy.php
Controllers:
app/Http/Controllers/Api/V1/Tenant/Billing/*
app/Http/Controllers/Api/V1/Tenant/Integration/*
app/Http/Controllers/Api/V1/Tenant/MasterData/*

Tenant Middleware and Cluster Flow#

Endpoint Matrix#

A. Tenant Billing (/api/v1/tenant/billing/*)#

Baseline middleware group:
auth:sanctum
tenant.context
tenant.token
ability:tenant:access,platform:access
tenant.write
MethodPathControllerMiddleware Tambahan
GET/subscriptionSubscriptionController@show-
GET/entitlementsSubscriptionController@entitlements-
PUT/subscription/planSubscriptionController@changePlan-
POST/subscription/cancelSubscriptionController@cancel-
GET/invoicesInvoiceController@index-
GET/invoices/{invoiceId}InvoiceController@show-
GET/timelineBillingTimelineController-
GET/addonsSubscriptionAddonController@index-
POST/addonsSubscriptionAddonController@storesubscription.active
PATCH/addons/{addonId}/deactivateSubscriptionAddonController@deactivate-
PATCH/addons/{addonId}/pauseSubscriptionAddonController@pause-
PATCH/addons/{addonId}/resumeSubscriptionAddonController@resume-
PATCH/addons/{addonId}/schedule-cancelSubscriptionAddonController@scheduleCancel-

B. Tenant Integrations (/api/v1/tenant/integrations/*)#

Base middleware group:
auth:sanctum
tenant.context
tenant.token
ability:tenant:access,platform:access
tenant.write
subscription.active
MethodPathControllerMiddleware Tambahan
GET/healthIntegrationAccessController@healthsubscription.feature:api_access
POST/ordersIntegrationAccessController@createOrdersubscription.feature:api_access, subscription.feature:max_monthly_orders, usage.track:max_monthly_orders
POST/users/inviteIntegrationAccessController@inviteUsersubscription.feature:api_access, subscription.feature:max_users

C. Tenant Master Data (/api/v1/tenant/master-data/*)#

Base middleware group:
auth:sanctum
tenant.context
tenant.token
tenant.required
ability:tenant:access,platform:access
MethodPathControllerTujuan
GET/taxonomiesTaxonomyController@indexList taxonomy tenant
POST/taxonomiesTaxonomyController@storeCreate taxonomy custom
PUT/taxonomies/{taxonomyId}TaxonomyController@updateUpdate taxonomy custom
DELETE/taxonomies/{taxonomyId}TaxonomyController@destroyDelete taxonomy custom

Taxonomy Rule Flow#

Class Responsibility Map#

SubscriptionController: read/change/cancel subscription tenant.
SubscriptionAddonController: addon lifecycle tenant.
InvoiceController: invoice query tenant-scoped.
BillingTimelineController: timeline billing tenant.
IntegrationAccessController: API integration tenant dengan feature gate.
TaxonomyController: CRUD taxonomy tenant local.
TaxonomyObserver: rules domain lokal taxonomy.
HasTenantClusterConnection + TenantClusterResolver: resolve koneksi cluster otomatis.
Diubah pada 2026-03-03 22:25:30
Sebelumnya
04 - Central Billing
Berikutnya
06 - FE Integration Contracts
Built with