Skip to main content

Data Model

This page describes the main active data entities currently used in the working LiVi billing and access architecture.

Current scope

At the current stage, the most important documented entities are:

  • entitlements
  • payment_orders

These entities support billing state, access state and payment processing logic.

entitlements

The entitlements entity is used to store active user access state.

Purpose

Its role is to determine whether a user has the required access level for product usage.

Typical fields

  • email
  • plan
  • period
  • valid_until
  • source
  • updated_at

Meaning

This entity acts as the main backend access reference for determining current FREE or PRO state.

payment_orders

The payment_orders entity is used to store payment-related events.

Purpose

Its role is to track payment attempts, completed payments and processing state.

Typical fields

  • order_reference
  • email
  • plan
  • period
  • status
  • amount
  • currency
  • provider
  • source
  • created_at
  • updated_at

Meaning

This entity supports payment history, processing visibility and idempotent handling of repeated payment callbacks.

Current data principle

At the current stage, payment state and access state are separated logically but connected operationally.

  • payment_orders tracks payment events
  • entitlements defines active access state