BillingBalanceReadResult billing.balance-read-result@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/balance-read-result.v1.json

billing.balance-read-result@1: answers of billing.balance.read on OpenVibe.Billing. GET /api/v1/balances/:subject → billing.balance@1; GET /api/v1/transactions?subject=&limit=&cursor= → { transactions, next_cursor } (newest first, at most 200 a page; subject is required); GET /api/v1/transactions/:id → { transaction, reversed_by } (ids of the transactions that reverse it).

Fields

This schema has no named fields.

Examples

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

Valid: balance
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "currency": "vibes-bits",
  "credit": 1200,
  "payable": 5500,
  "pending_payouts": 0,
  "payable_value_cents": 5500,
  "bits_per_usd": 100
}
Valid: history
{
  "transactions": [
    {
      "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
        }
      ]
    }
  ],
  "next_cursor": null
}
Rejected: partial-transaction
{
  "transactions": [
    {
      "id": "txn_1"
    }
  ],
  "next_cursor": null
}

Validate

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