BillingEntitlementResult billing.entitlement-result@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- billing
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/billing/entitlement-result.v1.json
billing.entitlement-result@1: answers of billing.entitlement.check on OpenVibe.Billing. GET /api/v1/entitlements/:subject?streamer= → billing.entitlement@1; without streamer → { subject, entitlements } (every active one); GET /api/v1/subscriptions → { subscriptions }; GET /api/v1/subscriptions/:id → { subscription, entitlement }.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: all
{
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"entitlements": [
{
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"streamer": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"kind": "channel_subscription",
"active": true,
"expires_at": "2026-10-25T18:00:00.000Z",
"subscription": {
"id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPW",
"status": "active",
"auto_renew": 1,
"cancel_at_period_end": 0,
"provider": "credit"
}
}
]
}Valid: one
{
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"streamer": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"kind": "channel_subscription",
"active": true,
"expires_at": "2026-10-25T18:00:00.000Z",
"subscription": {
"id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPW",
"status": "active",
"auto_renew": 1,
"cancel_at_period_end": 0,
"provider": "credit"
}
}Rejected: bare-subject
{
"subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"entitlements": []
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('billing.entitlement-result@1', value); // { valid, errors: [{ path, message }] }