Skip to main content

Metadata-driven configuration

Vluna has several configuration points that use JSON objects. This page defines the keys that are currently consumed by system behavior.

Use this page for semantic contracts. For endpoint schema details, use API reference.

Design rule

  • If a JSON key is listed here, runtime or orchestration logic reads it.
  • If a JSON key is not listed here, treat it as application-owned annotation only.

Plan metadata

Object: billing_plans.metadata

Supported keys

Key pathPurpose
gate_bundle_keySelects the runtime gate bundle for this plan/package.
grants[]Declares grant templates that can be compiled into grant assignments for active plan assignments.
billing_defaults.period.billing_modePlan-level billing mode default.
billing_defaults.period.issue_anchorPlan-level issue anchor default.

Priority notes

  • For bundle key resolution, plan metadata is the runtime source of truth.
  • For billing defaults, assignment metadata can override plan metadata.

Related guides:

Feature and meter metadata

Objects:

  • meters.metadata
  • feature_families.metadata
  • features.metadata

Supported keys

ObjectKey pathPurpose
meters.metadataresidual_modeControls residual carry mode for pricing rounding behavior.

Internal keys

  • Auto-registration flows may write metadata markers such as auto, source, and fallback on feature families/features/meters.
  • Treat these markers as system-internal state, not integration contract keys.

Related guide:

Catalog metadata

Objects:

  • catalog_products.metadata
  • catalog_prices.metadata

Supported keys

Key pathPurpose
billing_plan_codeMaps a purchased price to a billing plan assignment flow.
grants[]Declares grant bindings for purchase-driven issuance.
gate_bundle_keyOptional catalog packaging input that should be materialized onto the billing plan; runtime does not read catalog metadata directly.

Merge behavior

  • Grant bindings are read from both product and price metadata.
  • For the same grant program, price-level fields override product-level fields.

Validation notes

  • metadata.grants must not contain duplicate grant_program_code values.

Related guides:

Catalog presentation config

Object: catalog_products.presentation_config

  • Must be a JSON object.
  • Used as product presentation configuration (for example, recommended badge, tagline, CTA, sale display).

Related guide:

Gate policy metadata

Object: gate_policies.metadata

Supported keys used by runtime

Key pathPurpose
feature_code or params.feature_codeOverrides policy feature target in quota/rate window projection.
counter_key or params.counter_keyOverrides quota/rate counter key.
seat_limitAccount seat-capacity packaging, resolved onto billing_accounts.seat_limit.

Important boundary

  • gate_policy_bundles.metadata is currently not used by runtime decision logic.
  • Keep bundle metadata for labels or application annotations only.

Related guides:

Grants and campaign metadata

Objects:

  • grant_campaigns.metadata
  • grant_assignments.metadata
  • grant_programs.eligibility_payload

Supported keys

ObjectKey pathPurpose
grant_campaigns.metadatagrants[]Campaign-level grant binding list.
grant_assignments.metadatagrant_overridePer-assignment override payload used for manual/ops assignment behavior.
grant_programs.eligibility_payloadsubscription_group_id / group_keyEligibility targeting for subscription_group programs.

Related guides:

Contract term JSON

Object: contract_terms.value_json

  • Required payload for each term version.
  • Version identity is (kind, term_key, effective_at).
  • Writing the same identity with different value_json is rejected.

Related guide: