BillingTransaction billing.transaction@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/transaction.v1.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

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^txn_
typeenumyes
  • one of "purchase", "donation", "subscription", "subscription_share", "cashout_request", "cashout_paid", "cashout_denied", "recycle", "refund", "chargeback", "adjustment", "import"
statusstringyes
testbooleanyesTest money: never counted.
reverses_txnstring | nullyes
from_subjectstring | nullyes
to_subjectstring | nullyes
providerstring | nullyes
receipt_refstring | nullyes<provider>:<provider payment id> for money that arrived from a provider.
actoranyWho posted it (as recorded).
metadataanyPer type: amount_bits, paid_cents, target EntityRef, message, rates…
created_atstringyes
entriesarray of objectyes
entries[].accountobjectyes
entries[].account.kindenumyes
  • one of "user_credit", "creator_payable", "provider_clearing", "platform_revenue", "payouts_pending", "refunds", "import_adjustment", "chargeback_loss", "fx_conversion"
entries[].account.ownerstring | nullA subject id, a provider slug, or null for a platform account.
entries[].account.currencyenumyes
  • one of "vibes-bits", "usd-cents"
entries[].amountintegeryesSigned: 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 }] }