Garment.id
🇮🇩 Indonesian
  • 🇮🇩 Indonesian
  • 🇺🇸 English
Home
Core APITenant APISupport CenterChangelog
Home
Core APITenant APISupport CenterChangelog
Github
Instagram
|
🇮🇩 Indonesian
  • 🇮🇩 Indonesian
  • 🇺🇸 English
🇮🇩 Indonesian
  • 🇮🇩 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
|
🇮🇩 Indonesian
  • 🇮🇩 Indonesian
  • 🇺🇸 English
🇮🇩 Indonesian
  • 🇮🇩 Indonesian
  • 🇺🇸 English
  1. Home

20 - Billing and Provisioning Business Flows

Dokumen ini merangkum flow bisnis billing lifecycle dan tenant provisioning.

A. Billing Lifecycle#

B. Tenant Provisioning Flow#

B1. Provisioning Architecture (Centralized)#

Semua provisioning tenant melewati satu pintu: TenantProvisioningOrchestrator.
Daftar provisioner diregister di config/tenancy.php pada key provisioning.provisioners.
Setiap provisioner wajib implement TenantProvisioner dan return ProvisioningResult.
Guardrail orchestrator:
class harus implement kontrak TenantProvisioner
code() tidak boleh kosong
code() tidak boleh duplikat

B2. Manual Re-run Provisioning#

Untuk recovery/backfill tenant tertentu:
Jika menggunakan Sail:

C. Operational Commands in Flow#

Renewal generation: GenerateSubscriptionRenewalInvoicesCommand
Dunning enforcement: EnforceBillingDunningPolicyCommand
Reconciliation report: GenerateBillingReconciliationReportCommand
Provisioning re-run: ProvisionTenantCommand

D. Validation Checklist#

state transition tested
webhook idempotency validated
provisioning listener error path logged
retry policy documented and observable
queue worker untuk listener provisioning aktif (bukan sync)
Diubah pada 2026-03-03 22:25:30
Sebelumnya
19 - Migration and Model Cookbook
Berikutnya
21 - FE Error Handling Matrix
Built with