---
title: "Undo a duplicate Stripe journal entry repair"
method: POST
path: "/accountant/companies/{customerId}/agent/stripe-duplicate-je-repairs/by-evidence/{evidenceId}/unwind"
tags: ["Accountant Portal"]
---

# Undo a duplicate Stripe journal entry repair

`POST /accountant/companies/{customerId}/agent/stripe-duplicate-je-repairs/by-evidence/{evidenceId}/unwind`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/agent/stripe-duplicate-je-repairs/by-evidence/{evidenceId}/unwind`
- Auth: HTTP bearer

A human super-admin only; the agent's key and the bookkeeping service token get 404. Not gated by the agent's settings. Works from the server's record: the voided entry is posted back as an identical copy (same date, lines, source, posting key and hash); on the transaction side the soft-deleted transaction is restored first (a transaction the repair kept must still be live); on the system side the Stripe row is linked to the copy. The copy's lines keep the FX rate revision the entry was booked at. One database transaction with the record's undo stamp. The record stays, so the row is never repaired again automatically (the next audit raises its blocker again). A second call answers `already_reverted`. 409 `DUPLICATE_STRIPE_JE_REPAIR_BLOCKED` when the period is filing-locked or the row, entry or transaction changed.

## Path parameters

- `customerId` string, uuid, required
- `evidenceId` string, uuid, required

## Request body

- object
  - `reason` string, required

## Response `200`

Success envelope

- object
  - `success` boolean, required
  - `data` object, required
    - `repairId` string, uuid, required
    - `strategy` 'void_system_je' | 'void_transaction_je_and_soft_delete_txn', required
    - `state` 'reverted' | 'already_reverted', required
    - `restoredJournalEntryId` string, uuid, nullable, required
    - `restoredTransactionId` string, uuid, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: The undo is blocked now, or the repair changed
- `422`: A missing or malformed reason

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/agent/stripe-duplicate-je-repairs/by-evidence/:evidenceId/unwind/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
