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

# billing.transaction.settled@1 · OpenVibe.Services

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

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

billing.transaction.settled v1 (OpenVibe.Billing server/ops/purchases.js summary(); emitted by purchases, transfers, subscriptions, cashouts recycle and admin adjustments). A journal transaction was posted. Envelope: subject { type: transaction, id: txn\_… }, visibility internal, priority important, actor service:billing.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `transaction_id` | string | yes |  | - `pattern ^txn_[0-9A-HJKMNP-TV-Z]{26}$` |
| `type` | enum | yes |  | - `one of "purchase", "donation", "subscription", "subscription_share", "cashout_request", "cashout_paid", "cashout_denied", "recycle", "refund", "chargeback", "adjustment", "import"` |
| `test` | boolean | yes | Test money: never counted. |  |
| `from_subject` | string \| null | yes | Subject id (usr\_…) value moved from, null for provider money. |  |
| `to_subject` | string \| null | yes | Subject id (usr\_…) value moved to. |  |
| `provider` | string \| null | yes | stripe, paypal, powerchat…; null for credit movements. |  |
| `metadata` | object | yes | Transaction metadata as posted (amount\_bits, paid\_cents, value\_cents, target EntityRef, intent\_id, message, donor\_name, rates…). Its keys depend on the transaction type. |  |

## Examples

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

 Valid: donation

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ1",
  "type": "donation",
  "test": false,
  "from_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "to_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "provider": null,
  "metadata": {
    "amount_bits": 500,
    "target": {
      "service": "tips",
      "type": "interaction",
      "id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ"
    },
    "message": "gg"
  }
}
~~~~

Valid: purchase

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ1",
  "type": "purchase",
  "test": false,
  "from_subject": null,
  "to_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "provider": "stripe",
  "metadata": {
    "paid_cents": 500,
    "bits": 500,
    "value_cents": 500,
    "revenue_cents": 0,
    "pricing": "bits",
    "intent_id": "pi_01JAB3C4D5E6F7G8H9J0K1MNQ2",
    "rates": {
      "bits_per_usd": 100
    }
  }
}
~~~~

Rejected: subject-ref-instead-of-id

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ1",
  "type": "donation",
  "test": false,
  "from_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "to_subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "provider": null,
  "metadata": {
    "amount_bits": 500,
    "target": {
      "service": "tips",
      "type": "interaction",
      "id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ"
    },
    "message": "gg"
  }
}
~~~~

Rejected: unknown-type

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ1",
  "type": "tip",
  "test": false,
  "from_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "to_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "provider": null,
  "metadata": {
    "amount_bits": 500,
    "target": {
      "service": "tips",
      "type": "interaction",
      "id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ"
    },
    "message": "gg"
  }
}
~~~~

## Validate

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