Record a terminal's answer for a reserved void or refund
Changed onRecords 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
- Base URLhttps://app.fortuneos.ai
- Authnone declared
Request body
Response
OK
Changes
- info
added the new optional request property
diagnostic - info
added the new optional request property
transaction/batchNumber - info
added the new optional request property
transaction/cardLast4
3 more changes in this revision
- info