Skip to content

feat(licensing): wholesale reseller License Keys, SKU catalog, secure redemption and Filament admin - #2

Draft
mstfkhazaal wants to merge 45 commits into
mainfrom
feat/universal-billing-foundation
Draft

mstfkhazaal wants to merge 45 commits into
mainfrom
feat/universal-billing-foundation

Conversation

@mstfkhazaal

@mstfkhazaal mstfkhazaal commented Oct 29, 2026 •

Copy link
Copy Markdown

Universal subscription + license marketplace (Draft)

This FNX fork is reusable in Fenix and standalone Laravel applications. A host Fenix Accounts/ZITADEL service may authenticate users and resolve owning organizations, but the package core never depends directly on it.

Completed

  • Exact decimal multi-currency subscription pricing, customer/organization billables and optional fail-closed tenant checks.
  • Named product SKU (crm, invoice, etc.) + Plan-specific license offers. Set official retail, approved-reseller wholesale, minimum quantity and license duration.
  • Authorized Provider application and administrator approval/suspension; wholesale purchases are tied to the Provider's verified owning Eloquent organization.
  • Server-priced retail/wholesale orders (MOQ, unique idempotency reference) with immutable snapshots of price, app SKU, plan and duration.
  • Trusted payment-fulfillment service that issues only after confirmed settlement, using cryptographically random 128-bit license keys, encrypted plaintext and SHA-256 lookup.
  • Authorized export, one-time redemption to the customer's individual/organization subscription and duration starting on first activation. Subsequent keys extend the same app subscription without duplication; after redemption the encrypted key is wiped.
  • Independent resale price logging (e.g. $140 per key purchased wholesale at $100) and exact per-currency gross margin; configurable retail-ceiling policy.
  • Filament 5 resources: Products, Offers, Provider approvals, Orders and masked License Key inventory. Full keys never appear in ordinary admin tables.
  • Security Gates and TenantAccess checks throughout account onboarding, purchase, key export, redemption, resale and dashboards.
  • Standalone upgrade migrations, PHP/Testbench tests, installation guide, security and financial release checklist.

Tested

  • GitHub Actions 40842273565: 42 tests, 108 assertions, code/style checks, Composer validation and security audit.
  • Wholesale example 12 × $100; $140 resale, $40 gross margin, approval and ownership requirements, idempotency.
  • License term begins at customer redemption, does not change if catalog is later edited, double redemption denied.
  • Tenant safety and Filament resource protections.
  • Compatible payment checkout/webhook implemented in sibling Subbase Payment Draft PR #2.

Still required before production/merge

  • Real Fenix Accounts OIDC organization permissions, public Provider UX and cross-app entitlement verification.
  • Provider contracts, tax rules, price policy/legal review; full refunds, chargebacks, lost/stolen key revocation and reissue.
  • PostgreSQL/MySQL full integration, concurrency/race and performance tests; real gateway sandboxes and multi-merchant reconciliation.
  • Safe migration from nafiswatsiq/subbase installations in CRM/Zeno with backups, full legacy Pint, coordinated default-branch Composer identity release.

Documentation: docs/LICENSING-RESELLERS.md, docs/INSTALLATION.md, docs/PROGRESS.md, Changelog.md.

Draft; do not deploy live payment flows or merge to main until production gates pass.

@mstfkhazaal mstfkhazaal changed the title feat!: universal subscription foundation for standalone and multi-tenant Laravel apps feat!: universal FNX Subbase subscriptions, exact money, tenant guards and cancellation Oct 29, 2026
… lifecycle, security and Fenix host integration
@mstfkhazaal mstfkhazaal changed the title feat!: universal FNX Subbase subscriptions, exact money, tenant guards and cancellation feat(licensing): wholesale reseller License Keys, SKU catalog, secure redemption and Filament admin Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant