Commit
Scope
This page defines commit-time validation, pricing, and settlement behavior for lease-backed usage.
Required inputs
Idempotency-Keyis required.lease_tokenis required and must be valid.feature_codemust match the lease feature.quantity_minoris required and must be> 0.meters[]is optional; when omitted, primary activity meter is used.
Validation sequence
- Resolve and lock lease by token.
- Validate feature match and optional seat match against lease metadata.
- Validate lease state and expiry status.
- Resolve quota windows from lease metadata; missing/mismatched window metadata causes quarantine semantics.
- Validate meter set against feature-meter allowlist for activity semantic kind.
- Resolve pricing for each meter line.
- Build aggregate pricing and apply settlement.
Quarantine semantics
Commit supports non-fatal quarantine behavior:
- Invalid or disallowed meter mapping
- Missing policy window metadata at commit time
- Missing pricing for one or more meters
- Lease not active or late commit beyond grace
When quarantined:
application_statusisquarantined- applied quantity is set to
0 - settlement amount is set to
0 - rating/line records are still written for traceability
- hints and reason codes are returned
Pricing and settlement semantics
- Pricing is resolved at commit time (floating model).
- Feature quantity and meter quantities are separate dimensions.
- Each line carries pricing snapshot and cost snapshot fingerprints.
- Residual rounding is maintained per billing account + meter + pricing identity.
- Settlement allocates funding sources and persists pending settlement facts.
Hint semantics at commit
Commit may emit:
lease.closed_at_commitlease.expiredpolicy.window_not_foundfeature.meter_not_allowedpricing.not_configuredpricing.meter_price_missingpricing.contract_term_invalidpricing.changedquota.remainingbudget.low_headroom
Idempotency behavior
- Commit idempotency is scoped to lease + key.
- Same key + same request hash returns stored response snapshot.
- Same key + different request hash returns
409.
Verify checklist
- Replayed idempotent commit returns stable commit id and lines.
- Quarantined commits write traceable facts but do not settle.
- Missing pricing meters are reflected in hints and reason codes.
- Late commit within grace emits hint; beyond grace quarantines application.