---
title: "billing.subscription@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/billing.subscription"
updated: null
---

# billing.subscription@1 · OpenVibe.Services

HTML: [billing.subscription@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/billing.subscription)

# BillingSubscription `billing.subscription@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: billing
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/billing/subscription.v1.json`](/docs/contracts/billing.subscription.json)

billing.subscription@1: one channel subscription as OpenVibe.Billing presents it (server/ops/subscriptions.js present).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  |  |
| `subscriber` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `streamer` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `tier` | any |  |  |  |
| `provider` | string | yes | credit, or the provider that takes the payments. |  |
| `provider_ref` | string \| null |  |  |  |
| `route` | string \| null |  | site or direct (paid to the streamer's own provider account). |  |
| `status` | string | yes | active, past\_due (a failed renewal, retried until grace\_until), canceled, expired, … |  |
| `auto_renew` | boolean | yes |  |  |
| `cancel_at_period_end` | boolean | yes |  |  |
| `price_cents` | integer \| null |  |  |  |
| `current_period_end` | string \| null | yes |  |  |
| `created_at` | string |  |  |  |
| `updated_at` | string \| null |  |  |  |

## Examples

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

 Valid: credit

~~~~
{
  "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"
}
~~~~

Valid: past-due

~~~~
{
  "id": "sub_01JAB3C4D5E6F7G8H9J0K1MNQ0",
  "subscriber": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "streamer": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "provider": "credit",
  "status": "past_due",
  "auto_renew": true,
  "cancel_at_period_end": false,
  "current_period_end": "2026-10-23T10:00:00.000Z"
}
~~~~

Rejected: bare-subscriber

~~~~
{
  "id": "sub_1",
  "subscriber": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "streamer": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "provider": "credit",
  "status": "active",
  "auto_renew": true,
  "cancel_at_period_end": false,
  "current_period_end": null
}
~~~~

## Validate

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