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

# billing.transaction@1 · OpenVibe.Services

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

# BillingTransaction `billing.transaction@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/transaction.v1.json`](/docs/contracts/billing.transaction.json)

billing.transaction@1: one journal transaction as OpenVibe.Billing's /api/v1 presents it (server/ledger.js present). Amounts are integers: bits for vibes-bits, cents for usd-cents; each transaction's entries balance per currency. Subjects are bare Network subject ids.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^txn_` |
| `type` | enum | yes |  | - `one of "purchase", "donation", "subscription", "subscription_share", "cashout_request", "cashout_paid", "cashout_denied", "recycle", "refund", "chargeback", "adjustment", "import"` |
| `status` | string | yes |  |  |
| `test` | boolean | yes | Test money: never counted. |  |
| `reverses_txn` | string \| null | yes |  |  |
| `from_subject` | string \| null | yes |  |  |
| `to_subject` | string \| null | yes |  |  |
| `provider` | string \| null | yes |  |  |
| `receipt_ref` | string \| null | yes | <provider>:<provider payment id> for money that arrived from a provider. |  |
| `actor` | any |  | Who posted it (as recorded). |  |
| `metadata` | any |  | Per type: amount\_bits, paid\_cents, target EntityRef, message, rates… |  |
| `created_at` | string | yes |  |  |
| `entries` | array of object | yes |  |  |
| `entries[].account` | object | yes |  |  |
| `entries[].account.kind` | enum | yes |  | - `one of "user_credit", "creator_payable", "provider_clearing", "platform_revenue", "payouts_pending", "refunds", "import_adjustment", "chargeback_loss", "fx_conversion"` |
| `entries[].account.owner` | string \| null |  | A subject id, a provider slug, or null for a platform account. |  |
| `entries[].account.currency` | enum | yes |  | - `one of "vibes-bits", "usd-cents"` |
| `entries[].amount` | integer | yes | Signed: negative leaves the account. |  |

## Examples

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

 Valid: donation

~~~~
{
  "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: unknown-type

~~~~
{
  "id": "txn_1",
  "type": "gift",
  "status": "posted",
  "test": false,
  "reverses_txn": null,
  "from_subject": null,
  "to_subject": null,
  "provider": null,
  "receipt_ref": null,
  "created_at": "x",
  "entries": []
}
~~~~

## Validate

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