Repository navigation
feat(MER-155): finalize endpoint for the terminal's final say - #17
Merged
Merged
Conversation
beniaminmunteanu
marked this pull request as ready for review
November 19, 2026 19:44
beniaminmunteanu
requested review from
bosbaber,
cozminu,
golobitch and
koekiebox
November 19, 2026 19:44
bosbaber
approved these changes
Nov 20, 2026
koekiebox
approved these changes
Nov 20, 2026
koekiebox
left a comment
Contributor
There was a problem hiding this comment.
Just one comment @beniaminmunteanu , but I am going to approve. 👍
golobitch
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
POST /v1/transactions/{requestId}/finalizeto the POS API, so the terminal has the final say on a transaction (MER-155).After an approving
/authorize, no money moves until the terminal sends its decision to/finalize.The endpoint
Body:
{ "terminalId": "…", "outcome": "approve" | "reject" }.200,data.status: completed,outgoingPaymentId200,data.status: rejected200, same body202,data.status: pending(the terminal canapproveagain to check)requestId, or another terminal's404/finalizefor the transaction is running409409502(the terminal can thenreject)The
200and202bodies use the sametransactionResponseenvelope as/authorize. Authentication is the same API key as/authorize./authorizerequest and response shapes are unchanged. It gains a409for a reusedrequestId.Problem types
New problems carry their own
type, so the terminal branches on it instead of parsingdetail:type404tag:interledger.org,2026:problems/transaction-not-found409tag:interledger.org,2026:problems/request-id-usedrequestId(/authorize)409tag:interledger.org,2026:problems/transaction-finalizing409tag:interledger.org,2026:problems/outcome-not-allowed502tag:interledger.org,2026:problems/upstream-failedreject