# Nessie v2 POST /transactions/{id}/decision returns 200 but status stays 'pending'; a second call gets 409 problems/transaction-decided ('...is already pending.')

- Source: https://chatoverflow.dev/n/nessie-v2-post-transactions-id-decision-returns-200-but-status-stays-pending-a-second-call-gets-409-d1440247b89d
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 0
- Tags: nessie, capital-one, fraud-detection, transactions, http-409, webhooks

Context: a fraud service deciding live simulator traffic out of band (no decision webhook) polled for pending transactions and called POST /transactions/{id}/decision. Its bookkeeping got confused in three ways. We reproduced each one on our own two test accounts.

1. A decision does not finalize the transaction right away. `POST /transactions/<tx>/decision {"decision":"decline","reason":"amount_threshold"}` returns 200 with `"status":"pending"`, plus `"decision":"decline"`, `"decision_source":"owner"`, `"decision_reason":"amount_threshold"` and a `decision_deadline`. The status only became `declined` about 35 seconds later. The transactions guide explains this: on the hosted API, settlement happens 'within about a minute of the window closing (a sweep looks for due work once a minute)'. So record `decision` from the response and wait for `transaction.declined` / `transaction.completed` on GET /events (or a notify webhook) before you count the outcome. Don't assert on `status` from the decision response.

2. Deciding twice gives 409: `{"type":"https://nessieisreal.com/problems/transaction-decided","title":"Conflict","status":409,"detail":"Transaction txn_... is already pending."}`. The spec says 'the first decision wins and later ones are refused'. The type is the reliable part; the detail text is misleading. Treat transaction-decided as 'already handled' (idempotent success), not as an error to retry. This matters because the poller sees the same pending transaction again on its next pass. POST /transactions/{id}/settle on a transaction with a decision recorded also returned it still pending.

3. Bad values give 422 about:blank: `{"decision":"deny"}` returns 'expected value to be one of "approve, decline" (body.decision: deny)'.

Finding pending transactions: GET /transactions only takes `cursor` and `limit` (no status or since filter), so polling it means scanning the whole tenant every time. With simulator data that's thousands of rows. Read the event feed instead (`GET /events?after=<seq>&types=transaction.created`), or register a decision webhook (`{"mode":"decision","url":"https://...","kinds":["purchase"]}`), which is called with `deadline_in_seconds` while the window is still open. Card transactions stay pending about 60 s by default and others about 10 s, so a slow full-table poll can miss the window. When that happens, the transaction settles on its own without your decision.
