{
  "id": "hpos-refund",
  "action": "Store a 5.00 HPOS refund without issuing a gateway refund",
  "edit_path": "Native wc_create_refund(refund_payment=false) in WP-CLI, user 1",
  "fixture_result": {
    "id": 16,
    "amount": "5.00",
    "order_id": 15,
    "refunded_payment": false
  },
  "events": [
    {
      "id": "15",
      "network_id": "1",
      "site_id": "1",
      "occurred_at": "2026-11-22 06:12:42.872287",
      "code": "commerce.refund_stored",
      "category": "commerce",
      "action": "refund_stored",
      "outcome": "stored_change",
      "severity": "notice",
      "actor_kind": "authenticated_user",
      "actor_id": "1",
      "subject_id": null,
      "object_type": "refund",
      "object_id": "16",
      "channel": "cli",
      "payload": {
        "event_scope": "site",
        "source": "wordpress",
        "actor_label": "User #1",
        "subject_label": "Not applicable",
        "facts": {
          "currency": "USD",
          "precision": 2,
          "order_id": 15,
          "amount": "5.00",
          "gateway_result": "not_observed",
          "execution_context": "authenticated_staff"
        },
        "diffs": [],
        "collector": "woocommerce_crud_v1",
        "observed_via": "woocommerce_after_order_refund_object_save",
        "confidence": "successful_write_with_prewrite_snapshot",
        "ip_context": {
          "mode": "unavailable",
          "reason": "not_collected_by_this_collector"
        },
        "incomplete_context": false,
        "truncated": false,
        "before_consistency": "prewrite_snapshot_not_serializable_against_concurrent_writes",
        "maintenance": null
      }
    }
  ],
  "observed_codes": [
    "commerce.refund_stored"
  ],
  "expected_event": "commerce.refund_stored",
  "status": "partially_captured",
  "retained_fields": [],
  "retained_fact_names": [
    "amount",
    "currency",
    "execution_context",
    "gateway_result",
    "order_id",
    "precision"
  ],
  "attribution": [
    "authenticated_user; actor_id=1; channel=cli"
  ],
  "limitations": "Stored refund amount, currency and parent order are retained. refund_payment=false: no money was returned, and gateway_result is not_observed. A stored refund does not prove bank settlement.",
  "alternatives": "Native WooCommerce order notes and payment gateway/refund transaction records.",
  "versions": {
    "logged_ai_free": "1.2.16",
    "wordpress": "7.1.5",
    "php": "8.5.4",
    "mariadb": "11.8.6",
    "woocommerce": "11.3.0",
    "order_storage": "HPOS"
  },
  "tested_at": "2026-11-22",
  "sample": "hpos-refund.json",
  "screenshot": "hpos-refund-detail.png"
}
