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

# billing.subscription.canceled@1 · OpenVibe.Services

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

# BillingSubscriptionCanceledPayload `billing.subscription.canceled@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
- Decision: [ADR-012](/docs/adr/ADR-012)
- Schema: [`https://openvibe.network/contracts/events/payloads/billing.subscription.canceled.v1.json`](/docs/contracts/billing.subscription.canceled.json)

billing.subscription.canceled v1 (OpenVibe.Billing server/ops/subscriptions.js cancel). A subscription was set to cancel at period end (for Stripe, after Stripe accepted it); the paid period still runs. Envelope: subject { type: subscription, id: sub\_… }, visibility internal, priority important, actor service:billing.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `subscription` | object | yes |  | - `no other fields` |
| `subscription.id` | string | yes |  | - `pattern ^sub_[0-9A-HJKMNP-TV-Z]{26}$` |
| `subscription.subscriber` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `subscription.streamer` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `subscription.tier` | integer | yes |  | - `minimum 1` |
| `subscription.provider` | string | yes |  |  |
| `subscription.provider_ref` | string \| null | yes |  |  |
| `subscription.route` | string \| null | yes |  |  |
| `subscription.status` | enum | yes |  | - `one of "active", "canceled", "expired"` |
| `subscription.auto_renew` | boolean | yes |  |  |
| `subscription.cancel_at_period_end` | boolean | yes |  |  |
| `subscription.price_cents` | integer | yes |  | - `minimum 0` |
| `subscription.current_period_end` | string \| null | yes |  |  |
| `subscription.created_at` | string | yes |  |  |
| `subscription.updated_at` | string | yes |  |  |
| `provider_sync` | enum | yes |  | - `one of "not_needed", "stripe_cancel_at_period_end"` |
| `actor` | object | yes | Who asked: the calling principal and the person it acted for. | - `no other fields` |
| `actor.principal` | string \| null | yes | Token sub of the caller (svc:…, usr\_…). |  |
| `actor.request_id` | string \| null | yes |  |  |
| `actor.on_behalf_of` | [identity.subject-ref](/docs/contracts/identity.subject-ref) |  |  |  |

## Examples

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

 Valid: stripe

~~~~
{
  "subscription": {
    "id": "sub_01JAB3C4D5E6F7G8H9J0K1MNQ0",
    "subscriber": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "streamer": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "tier": 1,
    "provider": "stripe",
    "provider_ref": "sub_1Q2w3E4r5T6y",
    "route": "site",
    "status": "active",
    "auto_renew": false,
    "cancel_at_period_end": true,
    "price_cents": 499,
    "current_period_end": "2026-10-23T10:00:00.000Z",
    "created_at": "2026-09-23T10:00:00.000Z",
    "updated_at": "2026-09-23T11:00:00.000Z"
  },
  "provider_sync": "stripe_cancel_at_period_end",
  "actor": {
    "principal": "svc:vip",
    "request_id": "req_abcdefgh",
    "on_behalf_of": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    }
  }
}
~~~~

Rejected: no-actor

~~~~
{
  "subscription": {
    "id": "sub_01JAB3C4D5E6F7G8H9J0K1MNQ0",
    "subscriber": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
    },
    "streamer": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "tier": 1,
    "provider": "stripe",
    "provider_ref": "sub_1Q2w3E4r5T6y",
    "route": "site",
    "status": "active",
    "auto_renew": false,
    "cancel_at_period_end": true,
    "price_cents": 499,
    "current_period_end": "2026-10-23T10:00:00.000Z",
    "created_at": "2026-09-23T10:00:00.000Z",
    "updated_at": "2026-09-23T11:00:00.000Z"
  },
  "provider_sync": "not_needed"
}
~~~~

## Validate

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