---
title: "Record a terminal's answer for a reserved void or refund"
method: POST
path: "/api/public/v1/payments/reportTerminalReversal"
---

# Record a terminal's answer for a reserved void or refund

`POST /api/public/v1/payments/reportTerminalReversal`

## Request

- Base URL: `https://app.fortuneos.ai`
- URL: `https://app.fortuneos.ai/api/public/v1/payments/reportTerminalReversal`
- Auth: none declared

Records what the terminal answered for the operation `operationId` reserved of the payment `paymentId`, as the shell and the SDK reported it: the shell's `state`, its `startRefusal`, the SDK's `errorName` (stored as sent), the host's `hostResponseCode`, the SDK's `reversal` of the operation, `isRequestSent` from the SDK's own record, and with an approval only its `transaction`, whose empty `referenceRetrievalNumber` or `authorizationCode` reads as none. The server derives the outcome. An approval is recorded once: a `CANCELLATION` makes the payment Voided, a `REFUND` makes it Refunded, and the order is refunded once by the frozen principal and exactly the frozen card-paid tip, as money already returned: none of payments.refund's checks apply, the pass rules included, and a pass the order sold is still taken back; with nothing left on the order it refunds nothing more and is logged. A host decline owing no reversal records a declined void or a failed refund with the code and allows an operation again (code `94`, even one the SDK answered without sending the request, allows none). An operation that never reached the host, was refused by the shell before it started or was reversed is closed with its error name and posts nothing. Anything else, `cancelled` included, stays unresolved and blocks the payment until a later report settles it. An approval's payment history is written in the report's own transaction, so a failed write fails the report and records nothing, and the same report again records it. `unknown` (an operation id the terminal does not know) closes it as never sent, unless a stored fact says its request left (the SDK said so, the host answered with a code, or a reversal is still owed): it then stays unresolved, its state and facts unchanged, and `paymentHistory.get` answers that it needs support. A final operation (approved, declined, not performed, or unresolved with a reversal `REFUSED` or `UNSENDABLE`) answers its recorded state and changes nothing on a later report, a conflicting approval included, with one exception: a matching approval after a decline or a not-performed report keeps that state, books nothing and writes no payment history, is logged and blocks further operations as `reversalConflict` until a person reconciles it. Accepted after the order's shift closed and whatever the `payments-sdk` flag. Refused with BAD_REQUEST `terminalAnswerMismatch` when the approved amount, currency or terminal differs from the reservation or a reserved void comes back as a `REFUND` and `notAReversal` for a `PAYMENT`, and NOT_FOUND for an operation not reserved for the payment; neither changes anything. Needs `order:refund`. Refused with FORBIDDEN as `paywallLocked` when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.

## Request body

- object
  - `paymentId` string, required
  - `operationId` string, uuid, required
  - `state` 'approved' | 'declined' | 'failed' | 'cancelled' | 'unknown' | 'startRefused' | 'timedOut', required
  - `startRefusal` string
  - `errorName` string
  - `hostResponseCode` string
  - `diagnostic` string
  - `reversal` 'CONFIRMED' | 'NOT_DELIVERED' | 'REFUSED' | 'UNSENDABLE'
  - `isRequestSent` boolean
  - `transaction` object
    - `operation` 'CANCELLATION' | 'REFUND' | 'PAYMENT', required
    - `amount` integer, required
    - `currency` integer, required
    - `terminalId` string, required
    - `referenceRetrievalNumber` union
      - ''
      - string
    - `authorizationCode` union
      - ''
      - string
    - `merchantId` string, nullable
    - `number` integer, nullable
    - `batchNumber` integer, nullable
    - `paymentSystem` string, nullable
    - `cardLast4` string, nullable

## Response `200`

OK

- object
  - `operationId` string, required
  - `kind` 'void' | 'refund', required
  - `state` 'pending' | 'unresolved' | 'approved' | 'declined' | 'notPerformed', required

## Changes

- **2026-11-30** `9ae0f10c769d`: 6 info
  - added the new optional request property `diagnostic`
  - added the new optional request property `transaction/batchNumber`
  - added the new optional request property `transaction/cardLast4`
  - added the new optional request property `transaction/merchantId`
  - …2 more
- **2026-11-27** `00f8d142b9fa`: 2 breaking, 4 info
  - the `transaction/authorizationCode/anyOf[subschema #1]/` request property type changed from `string` to no type
  - the `transaction/referenceRetrievalNumber/anyOf[subschema #1]/` request property type changed from `string` to no type
  - added `subschema #1, subschema #2` to the `transaction/authorizationCode/anyOf[subschema #1]/` request property `anyOf` list
  - added `subschema #1, subschema #2` to the `transaction/referenceRetrievalNumber/anyOf[subschema #1]/` request property `anyOf` list
  - …2 more
- **2026-11-26** `bf4929817ed8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fortis/apis/fortune-os-api/changes/api/public/v1/payments/reportTerminalReversal/post.md)

---

[API](https://skmtc.dev/fortis/apis/fortune-os-api.md) - [All operations](https://skmtc.dev/fortis/apis/fortune-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fortis/apis/fortune-os-api/revisions/522f3cea550d?raw)
