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

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

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

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

billing.transaction.reversed v1 (OpenVibe.Billing server/ops/reversals.js reverseReceipt, transfers.js refund, cashouts.js deny). A transaction reversing an earlier one was posted: a provider refund or chargeback, a donation refund, a denied cash-out, a refund of a credit-paid subscription period (type refund, reverses\_txn names the subscription transaction, from\_subject and to\_subject swapped, provider null; the entitlement then changes with reason credit\_refund). Envelope: subject { type: transaction, id: txn\_… (the reversing transaction) }, 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. |  |
| `reverses_txn` | string | yes | The transaction this one reverses. | - `pattern ^txn_[0-9A-HJKMNP-TV-Z]{26}$` |
| `review` | enum |  | Provider reversals only: required when Billing kept value it could not recover (staff review). | - `one of "required", null` |
| `entitlements_revoked` | integer |  | Provider reversals only: subscription periods revoked. | - `minimum 0` |

## Examples

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

 Valid: chargeback

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ3",
  "type": "chargeback",
  "test": false,
  "from_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "to_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "provider": "stripe",
  "metadata": {
    "cents": 500,
    "original_paid_cents": 500,
    "reason": "charge.dispute.created",
    "review": "required"
  },
  "reverses_txn": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ1",
  "review": "required",
  "entitlements_revoked": 0
}
~~~~

Valid: credit-subscription-refund

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ4",
  "type": "refund",
  "test": false,
  "from_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "to_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "provider": null,
  "metadata": {
    "original_type": "subscription",
    "subscription_id": "sub_01JAB3C4D5E6F7G8H9J0K1MNQ0",
    "amount_bits": 500
  },
  "reverses_txn": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ5"
}
~~~~

Valid: donation-refund

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

Rejected: no-original

~~~~
{
  "transaction_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNQ1",
  "type": "refund",
  "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.reversed@1', value);   // { valid, errors: [{ path, message }] }
~~~~
