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

# billing.usage-record-result@1 · OpenVibe.Services

HTML: [billing.usage-record-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/billing.usage-record-result)

# BillingUsageRecordResult `billing.usage-record-result@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/usage-record-result.v1.json`](/docs/contracts/billing.usage-record-result.json)

billing.usage-record-result@1: answer of billing.usage.record on OpenVibe.Billing. POST /api/v1/usage → { record } (201 when stored; 200 with \`Idempotent-Replayed: true\` when the same reading was already stored under its idempotency\_key). Storing a reading charges nothing.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `record` | object | yes |  |  |
| `record.id` | string | yes |  |  |
| `record.idempotency_key` | string | yes | The reading's own idempotency\_key |  |
| `record.project` | string \| null |  |  |  |
| `record.subject` | string \| null |  |  |  |
| `record.service` | string | yes |  |  |
| `record.at` | string | yes |  | - `format date-time` |
| `record.received_at` | string | yes |  | - `format date-time` |
| `record.principal` | string | yes | The service principal that recorded the reading |  |
| `record.reading` | [platform.usage-sample](/docs/contracts/platform.usage-sample) | yes |  |  |

## Examples

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

 Valid: recorded

~~~~
{
  "record": {
    "id": "1",
    "idempotency_key": "media:delivery:2",
    "project": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "subject": "user:usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "service": "media",
    "at": "2026-09-30T10:00:00.000Z",
    "received_at": "2026-09-30T10:00:01.000Z",
    "principal": "media",
    "reading": {
      "id": "use-2",
      "idempotency_key": "media:delivery:2",
      "service": "media",
      "project": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "subject": "user:usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "operation": "deliver",
      "quantity": 1.5,
      "unit": "GiB",
      "at": "2026-09-30T10:00:00Z",
      "source": "media.egress",
      "free_allowance_used": 1,
      "vibes_charged": 4
    }
  }
}
~~~~

Rejected: reading-without-idempotency-key

~~~~
{
  "record": {
    "id": "1",
    "idempotency_key": "media:delivery:2",
    "project": null,
    "subject": null,
    "service": "media",
    "at": "2026-09-30T10:00:00.000Z",
    "received_at": "2026-09-30T10:00:01.000Z",
    "principal": "media",
    "reading": {
      "id": "use-2",
      "service": "media",
      "operation": "deliver",
      "quantity": 1.5,
      "unit": "GiB",
      "at": "2026-09-30T10:00:00Z",
      "source": "media.egress"
    }
  }
}
~~~~

## Validate

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