Skip to main content

Outcome-based billing model (events then ratings)

Outcome-based billing starts from fact events and derives billable ratings via policies.

This model is typically asynchronous and eventually consistent.

Prereqs​

Workflow​

  1. Your system emits fact events representing outcomes, activity, or telemetry.
  2. Vluna records events via:
    • POST /mgt/v1/events (single)
    • POST /mgt/v1/events/batch (batch)
  3. Downstream processing converts events into ratings based on rating policies and contract terms.

Event rules​

  • Events are fact-only. Do not attempt to embed pricing or cost semantics in event payloads.
  • Event ingestion is synchronous and idempotent:
    • 201 for first write
    • 200 for idempotent replay

Verification strategy​

For ingestion:

  • Verify 201 or 200 for your event writes.
  • Log X-Request-Id, principal_id, and any returned identifiers in the envelope.

For downstream rating:

  • Treat rating output as asynchronous.
  • Use your deployment's reporting and ops tooling to verify rated outputs and settlement.

Next​