Vendor Licensing and Payment Lifecycle

Protocol specification for vendor onboarding, Stripe-facilitated payment, credit facility creation, VRK rotation, and license management in the Tide Settlement Layer.

22 min read

Overview

This document specifies the operational lifecycle governing Vendor Licensing and Payment within the Tide Cybersecurity Fabric. Before the network can issue any Anonymous Voucher (Protocol: Anonymous Voucher), the Vendor must be onboarded, funded, and linked to a credit facility. Six phases: initial Stripe checkout, webhook processing, VVK generation with credit facility linkage, admin quorum establishment, automated VRK rotation, and monthly credit refresh.
Loading diagram...

Preconditions

ArtifactHeld ByDescription
System Home ORKTideCloakNetwork address of the Tide bootstrap ORK for initial routing.
gPORKTideCloakPublic key of the Payer ORK cluster.
Stripe API CredentialsPayer ORKAPI keys enabling checkout creation and webhook validation.

Phase 1: Initial License Request and Stripe Checkout

Loading diagram...
TideCloak generates a temporary payment identity (obfGVVK = H2P(G), venID = DH(obfGVVK, vrk)) because VVK does not yet exist. Both are replaced after VVK generation in Phase 3.
The activationPackage contains: subscriptionId, customerId, licenseId, gVRK, payerPublic, maxUserAcc, maxConcAcc. After checkout, TideCloak polls the Payer ORK for activation. The Payer returns false until the Stripe webhook confirms payment (Phase 2). Upon activation, confirmInitialVRK() promotes the pending VRK, initializes the realm, and schedules the first rotation task.

Phase 2: Webhook Processing

The Payer ORK relies strictly on verified Stripe webhooks to alter license states.
checkout.session.completed - On initial checkout:
  1. Fetch Session and Subscription from Stripe API.
  2. Pause subscription (reason: waiting_for_new_key). This prevents Stripe from billing before VRK rotation completes.
  3. Fetch Invoice and Customer.
  4. Issue license with expiry = CurrentPeriodEnd + 7 days. The license record contains:
FieldDescription
LicenseIdVendor identity (obfGVVK)
GVRKActive Vendor Rotating Key (public)
ExpiryUnix timestamp: CurrentPeriodEnd + 7 days
MaxAccountsTotal user account ceiling for this license
MaxConcurrentAccountsPerMonthRolling 30-day active user limit
AllowVendorCreationBoolean gate: whether this license permits VVK generation
VendorCreatedCounter: VVK generation events consumed (maximum one)
DebitCounterCumulative usage counter incremented per metered action
PayerSignaturePayer's cryptographic signature over the license data
The Payer ORK stores the license indexed by the obfuscated vendor identity. The gVZK (Vendor Zero Key, initially equal to gVRK) is stored on the Vendor record and authenticates all subsequent management requests: subscription updates, cancellations, and portal sessions are verified by checking a timestamp signature against the gVZK.

Per-Action Metering

Every licensed operation increments the license's debit counter by an action-specific cost. The Payer enforces this metering during voucher validation, before issuing a RedemptProof.
ActionDebit CostLimit Enforced
signup30MaxAccounts (total user ceiling)
signin10MaxConcurrentAccountsPerMonth (rolling 30-day window)
updateaccount40MaxConcurrentAccountsPerMonth (rolling 30-day window)
vendorsign10None (fast path, no user tracking)
vendordecrypt5None (fast path, no user tracking)
vendorcreation30AllowVendorCreation (boolean, once per license)
reserve10MaxAccounts (total user ceiling)
Two distinct capacity limits operate independently:
  • Total accounts. The MaxAccounts ceiling limits the total number of user identities ever created under this license. Enforced on signup and reserve actions. Once the ceiling is reached, new account creation is rejected regardless of how many accounts are currently active.
  • Concurrent active accounts. The MaxConcurrentAccountsPerMonth limit counts distinct users whose last activity falls within a rolling 30-day window. Enforced on signin and updateaccount actions. A user whose last activity was more than 30 days ago does not count against this limit, even if their account still exists.
VVK generation is gated separately. The AllowVendorCreation flag permits exactly one vendorcreation action per license. Once the VendorCreated counter reaches the maximum, subsequent VVK generation requests are rejected. This ensures each license produces at most one organizational master key.
The debit counter provides aggregate usage visibility but does not itself gate operations. Capacity enforcement is performed by the specific limit checks above. The counter serves as an audit and billing reconciliation mechanism during monthly settlement.
invoice.payment_succeeded - On subsequent monthly renewals:
  • If billing_reason == "subscription_create": no action (handled above).
  • Otherwise: validate Subscription, pause (reason: waiting_for_new_license), issue renewed license with CurrentPeriodEnd + 7 days expiry.

Phase 3: Credit Facility Creation and VVK Linkage

With the license active, the Vendor generates its master identity (VVK) and cryptographically links it to the credit facility.
Loading diagram...
VVK generation is a metered operation, so TideCloak generates the first Anonymous Voucher using the funded VRK: vrk.genVoucher(obfGVVK, gPORK). TideCloak prepares a VRK-signed authorization (auth) with a 30-second expiry and random VVKiD, defines permittedORKs (100 ORKs for CVK/VVK) and TcloakSettings (return URL, gVRK, crypto model, flags).
The VVK ORKs verify gVRK with the Payer, execute Nested Shamir DKG, and register the key record on the TWLEVE-MAP directory with authority: gVRK - allowing setup to proceed before governance is established. Authority transfers to gVVK in Phase 4.
The VVK ORKs execute four signatures: permittedORKs, SignedSettings, gVRK attestation, and a semi-blind signature over gVRK with VVK (Algorithm 1). TideCloak derives the credit facility's permanent identity index and the Payer replaces the temporary venID with Y'' = gVVK · H(vrk).

Phase 4: Admin Quorum Establishment

TideCloak signs the admin creation request with VRK and routes createAdmin(gVVK) to the CMK ORKs. The CMK ORKs verify gVRK with the Payer, execute the signUp/signIn PRISM flow, and return a blindSig for the new administrator.
TideCloak compiles the governance structure:
text
signedAdmins = {
    member[1].publicKey = gCMKAuth,
    member[1].keyType = BEd255475,
    threshold = 0.7
}
The threshold value specifies the required quorum fraction: for i total admins, n = max(1, int(threshold × i)) must approve any governance change.
TideCloak signs this configuration with VRK and submits it to the VVK ORK swarm. The swarm verifies the VRK signature and gVRK funding status with the Payer, then threshold-signs the signedAdmins object with VVK.
The VVK ORKs issue the authority transfer:
text
updateKeyMAP(VVKID, gVVK, authority: gVVK)
This replaces authority: gVRK with authority: gVVK. Future modifications to the VVK swarm, admin roster, or authorization policies require a VVK-authorized threshold signature governed by the established quorum (Article 5: Governance Without God Mode). The VRK becomes a payment and communication delegate only.
TideCloak initializes the VRK rotation task scheduler and signs the finalized SignedSettings.

Phase 5: VRK Rotation Lifecycle

The VRK rotates monthly to limit compromise exposure, ensure per-period accounting, and prevent cross-period linkability. Three scheduled tasks govern this lifecycle.
Loading diagram...
Task 1: VRKGenerationTask - Executes at CurrentPeriodEnd - 1 day.
TideCloak retrieves SubscriptionInfo, generates a new VRK, and checks IsPendingLicenseActive(). If a pending license exists, the task exits. Otherwise, TideCloak generates the new VendorId, sends UpdateSubscription to the Payer, and marks the new VRK as pending. Schedules RotateVrkTask at CurrentPeriodEnd + 1 hour.
The Payer's UpdateSubscription handler validates against Stripe, lists draft invoices, and evaluates debt: if >12 consecutive unpaid months, rejects and initiates recovery. Otherwise, sets AutoAdvance = true on drafts, resumes the subscription (preserving billing anchor), and returns success.
Task 2: RotateVrkTask - Executes at CurrentPeriodEnd + 1 hour.
TideCloak retrieves GetLicenseDetails from the Payer. If the license is not yet active or the invoice is unpaid, TideCloak reschedules for +1 day. If active, TideCloak executes RotateVrk(): TideCloak signs the new gVRK with the current VRK private key, producing the pendingGVRKCertificate (certificate chain - the retiring key attests its successor). TideCloak schedules SwitchVRKTask at license expiry and the next VRKGenerationTask at next billing - 1 day.
Task 3: SwitchVRKTask - Executes at CurrentPeriodEnd + 7 days (license expiry).
TideCloak checks IsPendingLicenseActive() via the Payer. If inactive, reschedules for +1 day. If active, executes SwitchVRK(): the pending VRK is promoted to active; the retiring VRK is destroyed.

VRK Rotation Timing

DayAction
0Billing period starts. VRK_A active.
~28VRKGenerationTask: VRK_B generated, registered as pending.
~29Billing period ends. Stripe processes invoice.
~29 + 1hrRotateVrkTask: verify license, build certificate chain, schedule switch.
~29 + 7dSwitchVRKTask: VRK_B promoted to active. VRK_A retired.
The 7-day grace period (license expiry = CurrentPeriodEnd + 7 days) ensures operations using the retiring VRK continue uninterrupted while payment clears and the new VRK propagates.

Phase 6: Monthly Pre-Payment and Credit Refresh

On each monthly rotation, TideCloak prepares a renewal package:
text
newVRK = genKey()
newGVRK = newVRK.getPublic
newObfGVVK = DH(H2PVVK, H(newVRK.getPrivate))

renewalReq = {
    "VRKRenewalRequest",
    newGVRK,
    newObfGVVK,
    capacity,
    fromDate,
    toDate
}
renewalSig = VRK.sign(renewalReq)
TideCloak transmits the signed renewal to the VVK ORKs (which return updated SignedSettings) and to the Payer ORK. The Payer validates and writes the facility record to mimDB:
text
mimDB Facility Record:
  Index: H(gVRK)
  facilityID: gVRK
  credit, from, to
The Payer updates its internal store: Index: newObfGVVK → newGVRK, Capacity. Vouchers generated with the new VRK validate against this refreshed credit facility.

Algorithms

Algorithm 1 context: The Payer must track the Vendor's credit facility across billing cycles without learning the Vendor's master identity (gVVK). The VVK ORKs produce a semi-blind signature that binds the ephemeral VRK to the organizational VVK.

Notation Reference

SymbolDescription
GGGenerator point on the selected elliptic curve.
H()\textsf{H}(\cdot)Cryptographic SHA256 hash function.
H2P()\textsf{H2P}(\cdot)Hash-to-point operation.
DH(A,b)H(Ab)\textsf{DH}(A , b) \equiv \textsf{H}(A \cdot b)Diffie-Hellman key exchange function.
vrkvrk, gVRKgVRKVendor Random Key (private / public). Ephemeral payment identity, rotated monthly.
vzkvzk, gVZKgVZKVoucher Zone Key (initially =vrk/gVRK= vrk / gVRK).
VVKVVK, gVVKgVVKVendor Verifiable Key (private aggregate / public). Master organizational identity.
YY''Obfuscated VVK: gVVKH(vrk)gVVK \cdot \textsf{H}(vrk). Payer facility index.
YtmpY^{tmp}Provisional credit facility identity: GH(v)G \cdot \textsf{H}(v). Used before VVK exists.
venIDvenIDTemporary vendor identity during onboarding: H2P(G)vrk\textsf{H2P}(G) \cdot vrk.
gPORKgPORKPublic key of the Payer ORK cluster.
VVKID\textsf{VVKID}Random identifier for the Vendor Verifiable Key record on the TWELVE-MAP directory.
permittedORKspermittedORKs100-ORK roster authorized for CVK/VVK operations.
SignedSettings\textsf{SignedSettings}VVK-signed configuration: return URL, gVRK, crypto model, flags.
signedAdmins\textsf{signedAdmins}VVK-signed admin quorum: member keys, key types, threshold fraction.
activationPackage\textsf{activationPackage}Payer ORK response: Stripe session IDs, gVRK, license limits.
RedemptProof\textsf{RedemptProof}Payer-signed receipt confirming voucher validation (sibling protocol).

Actors

ActorDescriptionRole in This Protocol
AdminHuman administrator.Initiates license request, completes Stripe checkout, triggers manual renewals.
TideCloakVendor's IAM server.Orchestrates lifecycle: checkout sessions, activation, VRK task scheduling, rotation state. Generates VRKs, communicates with ORK swarms, signs renewal requests, generates vouchers.
Payer ORKsScrutinized payment-handling nodes.Creates Stripe sessions, receives webhooks, issues licenses, tracks credit facilities/balances, manages subscriptions.
VVK ORKs20 nodes holding VVK shards.Generate VVK during onboarding, semi-blind-sign gVRK, sign settings and admin quorums, register key mapping on TWELVE-MAP.
CMK ORKsNodes holding user identity shards.Create admin accounts, validate gVRK with Payer during operations.
StripeExternal payment processor.Checkout, subscription billing, invoicing, webhooks.
mimDB"Mimir" Database - Append-only Fabric synced registry. Stores committed records, Accountable Group Signatures, TWELVE-MAP entries.Stores facility records, key map records (VVK → ORK swarm mapping), license metadata.
TWELVE-MAPTide Wide Enumerated Ledger of Verifiable Entries - Mapping Authoritative Pointers is the self-verifying directory service on mimDB.Mapping key identifiers to ORK swarms.

Layer Traversal

LayerHow This Protocol Engages It
LegitimacyVRK registration with Payer establishes the Vendor's legitimacy. License validity dates enforce temporal legitimacy.
AuthorityVVK signs admin quorum, permittedORKs, and settings. Authority transfers from gVRK to gVVK after admin establishment.
AgencyEvery Agency Layer operation requires gVRK verification at the Payer. The voucher (sibling protocol) is the per-operation gate.
SettlementPrimary layer. This protocol defines the Settlement Layer's operational infrastructure: Credit Facility management, licensing, Stripe integration, VRK rotation.

Security Properties

PropertyMechanismAssumption
Payment-before-serviceEvery ORK operation requires Payer validation of gVRK. No valid license = no service.-
Exposure limitationMonthly VRK rotation limits the window of a compromised payment key. Each period uses a fresh key.Server integrity during key generation.
Facility unlinkabilityPayer indexes facility by Y=gVVKH(vrk)Y'' = gVVK \cdot \textsf{H}(vrk). Without vrkvrk, the Payer cannot recover gVVKgVVK. Monthly rotation changes YY''.Collision resistance of hash function.
Certificate chainRetiring VRK signs incoming gVRK. Verifiable succession without quorum-gated VVK signature per rotation.Unforgeability of signature scheme.
Licensing enforcementPayer tracks two independent limits per facility: total accounts (MaxAccounts) and rolling 30-day concurrent active users (MaxConcurrentAccountsPerMonth). Exceeded limits → voucher rejection for the gated action type.Database integrity at Payer.
Grace period resilienceLicense expiry = CurrentPeriodEnd + 7 days. Covers Stripe webhook delays and VRK propagation.-
Billing synchronizationStripe subscription paused before VRK generation, resumed after rotation. Prevents billing/key desynchronization.Stripe API reliability.
Debt protection>12 unpaid months triggers recovery. Prevents unbounded debt from abandoned tenants.-
Semi-blind Facility LinkageVVK ORKs compute semi-blind signature over gVRK without observing vrkvrk. Unforgeable bond between master identity and credit facility.Security of Nested Shamir DKG.
Authority transferTWELVE-MAP directory authority transitions gVRK → gVVK. Post-transfer, governance changes require VVK-authorized quorum.TWELVE-MAP ZK-proven integrity.

Call Summary

CallDirectionPhasePurpose
CreateCheckoutSessionTideCloak → Payer ORK1Initiate Stripe session with billing anchor.
CreateCustomer / CreateSessionPayer ORK → Stripe1Create Stripe customer and checkout session.
IsLicenseActiveTideCloak → Payer ORK1Poll for license activation (1s intervals, 60s timeout).
Webhook: session.completedStripe → Payer ORK2Trigger license issuance on initial checkout.
Webhook: invoice.payment_succeededStripe → Payer ORK2Trigger license renewal on monthly billing.
GenVVKTideCloak → VVK ORKs3Generate master VVK via distributed key generation.
addKeyMAPVVK ORKs → mimDB3Register Vendor key record (initially authority: gVRK).
updateLicenseTideCloak → Payer ORK3Replace temporary facility ID with permanent YY''.
createAdminTideCloak → CMK ORKs4Create administrator accounts via PRISM.
signVVK(signedAdmins)TideCloak → VVK ORKs4VVK-sign the admin quorum configuration.
updateKeyMAPVVK ORKs → mimDB4Transfer key authority from gVRK to gVVK.
GetSubscriptionInfoTideCloak → Payer ORK5Retrieve billing state for VRK generation.
UpdateSubscriptionTideCloak → Payer ORK5Register new VRK, resume Stripe subscription.
IsPendingLicenseActiveTideCloak → Payer ORK5Check pending license before switch.
VRK.sign(renewalReq)TideCloak → Payer ORK6Monthly pre-payment and credit refresh.

References

  • Hall, J. L., Hertzog, Y., et al. (2023). Manifesting Unobtainable Secrets: Threshold Elliptic Curve Key Generation using Nested Shamir Secret Sharing. arXiv:2309.00915. Presented at AustMS 2021.
  • Tide Developer Documentation: docs.tidecloak.com
  • Stripe API Reference: stripe.com/docs/api
Related Protocol Articles: