You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connect payments and subscriptions to customer access, product keys and licence validation.
Note: Full identity/account system (OIDC, BYOI, product users, seats, devices, integration webhooks) is in Phase 7.5 (#40).
Alex tasks
Tables
entitlement_grants
entitlement_revocations
entitlement_resolution_snapshots
effective_entitlements
licences
licence_activations
entitlement_events
licence_events
licence_signing_keys
Entitlement grant resolver
Do not treat a single order or subscription as the entitlement itself
Resolver calculates effective entitlement from all grants (orders, subscriptions, manual grants, trials, promotions, compensations)
Cancelling one source must not revoke access from another valid source
Handles: lifetime purchase + active subscription, manual grace during failed payment, refund of one offer while another valid, upgrade/downgrade overlap, temporary admin grant, complimentary access
Product-key rules
High entropy key generation
Store hash only, never raw key
Show raw key only at creation or through secure redemption flow
Part of Milestone D — Paid Products. Ref: #27
Connect payments and subscriptions to customer access, product keys and licence validation.
Alex tasks
Tables
entitlement_grantsentitlement_revocationsentitlement_resolution_snapshotseffective_entitlementslicenceslicence_activationsentitlement_eventslicence_eventslicence_signing_keysEntitlement grant resolver
Product-key rules
APIs
POST /api/entitlements/checkPOST /api/entitlements/admin/grantPOST /api/entitlements/admin/revokePOST /api/licensing/redeemPOST /api/licensing/activatePOST /api/licensing/validatePOST /api/licensing/deactivateSigned licence leases
validUntil,offlineUntil,features, subscription state, signatureLicence signing-key management
licence_signing_keystableSubscription state machine
active → payment_failed → past_due → grace → suspended → recovered | cancelled | expired | refunded | chargeback | manual_revokedEmail fulfilment
Tests
offlineUntilTomas tasks
Exit gate
Rollback
Disable automated fulfilment. Keep manual entitlement grants available.