BillingSubscriptionResult billing.subscription-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/subscription-result.v1.json
billing.subscription-result@1: answers about subscriptions on OpenVibe.Billing. POST /api/v1/subscriptions (201) → { subscription, entitlement, transaction }; POST /api/v1/subscriptions/:id/cancel → { subscription, provider_sync }; GET /api/v1/subscriptions?subscriber=&streamer=&status= → { 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: cancelled
{
"subscription": {
"id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPW",
"subscriber": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"streamer": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"tier": 1,
"provider": "credit",
"provider_ref": null,
"route": null,
"status": "active",
"auto_renew": true,
"cancel_at_period_end": false,
"price_cents": 499,
"current_period_end": "2026-10-25T18:00:00.000Z",
"created_at": "2026-09-25T18:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z"
},
"provider_sync": "not_needed"
}Valid: paid
{
"subscription": {
"id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPW",
"subscriber": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"streamer": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"tier": 1,
"provider": "credit",
"provider_ref": null,
"route": null,
"status": "active",
"auto_renew": true,
"cancel_at_period_end": false,
"price_cents": 499,
"current_period_end": "2026-10-25T18:00:00.000Z",
"created_at": "2026-09-25T18:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z"
},
"entitlement": {
"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"
}
},
"transaction": {
"id": "txn_01JAB2C3D4E5F6G7H8J9K0MNPS",
"type": "donation",
"status": "posted",
"test": false,
"reverses_txn": null,
"from_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"to_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
"provider": null,
"receipt_ref": null,
"actor": {
"type": "service",
"id": "live"
},
"metadata": {
"kind": "tip",
"amount_bits": 500,
"message": "gg"
},
"created_at": "2026-09-25T18:00:00.000Z",
"entries": [
{
"account": {
"kind": "user_credit",
"owner": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"currency": "vibes-bits"
},
"amount": -500
},
{
"account": {
"kind": "creator_payable",
"owner": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
"currency": "vibes-bits"
},
"amount": 500
}
]
}
}Rejected: partial
{
"subscription": {
"id": "sub_1"
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('billing.subscription-result@1', value); // { valid, errors: [{ path, message }] }