VipEntitlement vip.entitlement@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
vip
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/vip/entitlement.v1.json

vip.entitlement@1: an entitlement answer of OpenVibe.VIP (server/domain/entitlements.js check): is the member a member of the creator right now, from VIP's short-lived projection of OpenVibe.Billing's entitlements (source projection, stale when past valid_until but within the grace period) or from Billing itself (source billing). status unknown (source none) means VIP could not confirm it and never authorizes; active is true only for status active. A creator asked about themselves is inactive with a reason.

Fields

FieldTypeRequiredDescriptionConstraints
memberidentity.subject-refyes
creatoridentity.subject-refyes
kindstringyesThe Billing entitlement kind; channel_subscription today.
statusenumyes
  • one of "active", "inactive", "unknown"
activebooleanyes
expires_atstring | nullyesEnd of the paid period, as Billing reported it.
cancel_at_period_endbooleanyes
sourceenumyes
  • one of "projection", "billing", "none"
stalebooleanyes
valid_untilstring | nullyesUntil when the projection may answer without asking Billing; null for unknown.
  • format date-time
checked_atstringyes
  • format date-time
membershipone ofyes
reasonstringWhy it is unknown or inactive: no_projection, projection_expired, billing_unavailable, self (as text), …

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: active
{
  "member": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "kind": "channel_subscription",
  "status": "active",
  "active": true,
  "expires_at": "2026-10-20T18:04:11.000Z",
  "cancel_at_period_end": false,
  "source": "projection",
  "stale": false,
  "valid_until": "2026-09-25T09:17:40.118Z",
  "checked_at": "2026-09-25T09:12:40.118Z",
  "membership": {
    "id": "vms_01JAB2C3D4E5F6G7H8J9K0MNPX",
    "member": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "plan_id": "vpl_01JAB2C3D4E5F6G7H8J9K0MNPW",
    "plan_version": {
      "id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
      "version": 2,
      "name": "Supporter",
      "terms": {
        "name": "Supporter",
        "description": "Back the stream every month.",
        "benefits": [
          "Supporter badge in chat",
          "Members-only VOD chapters"
        ],
        "perks": [
          {
            "key": "chat-badge",
            "name": "Chat badge",
            "kind": "badge",
            "scope": "creator"
          }
        ],
        "billing_kind": "channel_subscription",
        "price": "set and charged by OpenVibe.Billing",
        "digest": "3fa9c0d27e5b8814"
      }
    },
    "perks": [
      "chat-badge"
    ],
    "origin": "checkout",
    "joined_at": "2026-09-20T18:04:11.402Z",
    "terms_since": "2026-09-20T18:04:11.402Z"
  }
}
Valid: unknown
{
  "member": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "kind": "channel_subscription",
  "status": "unknown",
  "active": false,
  "expires_at": null,
  "cancel_at_period_end": false,
  "source": "none",
  "stale": false,
  "valid_until": null,
  "checked_at": "2026-09-25T09:12:40.118Z",
  "reason": "billing_unavailable",
  "membership": null
}
Rejected: bad-status
{
  "member": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "kind": "channel_subscription",
  "status": "maybe",
  "active": true,
  "expires_at": "2026-10-20T18:04:11.000Z",
  "cancel_at_period_end": false,
  "source": "projection",
  "stale": false,
  "valid_until": "2026-09-25T09:17:40.118Z",
  "checked_at": "2026-09-25T09:12:40.118Z",
  "membership": {
    "id": "vms_01JAB2C3D4E5F6G7H8J9K0MNPX",
    "member": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "plan_id": "vpl_01JAB2C3D4E5F6G7H8J9K0MNPW",
    "plan_version": {
      "id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
      "version": 2,
      "name": "Supporter",
      "terms": {
        "name": "Supporter",
        "description": "Back the stream every month.",
        "benefits": [
          "Supporter badge in chat",
          "Members-only VOD chapters"
        ],
        "perks": [
          {
            "key": "chat-badge",
            "name": "Chat badge",
            "kind": "badge",
            "scope": "creator"
          }
        ],
        "billing_kind": "channel_subscription",
        "price": "set and charged by OpenVibe.Billing",
        "digest": "3fa9c0d27e5b8814"
      }
    },
    "perks": [
      "chat-badge"
    ],
    "origin": "checkout",
    "joined_at": "2026-09-20T18:04:11.402Z",
    "terms_since": "2026-09-20T18:04:11.402Z"
  }
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('vip.entitlement@1', value);   // { valid, errors: [{ path, message }] }