Operator

Transactions

GET /api/transactions reads journaled purchases, linking payment, any hold, backend call and receipt with a state derived from saved records.

Supported since 2.6.0The journal and this response shape are supported from 2.6.0. Receipts, events and payment attempts also support transactionId.

The journal links a paid purchase's payment attempt, any AP2 hold, backend call and receipt under one transactionId. The built-in SQLite store creates the row and payment attempt together during replay reservation. Free calls, 402 challenges and refused replays have no row. Journal entries hold references and an optional input digest; keep payment proofs, signatures, mandates and input bodies out of them. Both routes require the admin token.

List transactions

GET/api/transactionsBearer adminToken

Query

unresolvedbooleandefault: false
true leaves out delivered and payment-failed rows, listing purchases still awaiting a payment or delivery outcome.
statestring
One state from the table below; an unknown state is 400 INPUT_INVALID.
requestIdstring
Filter by the request that created the purchase.
limitintegerdefault: 50
Values above 500 are capped at 500; zero or less returns 400 INPUT_INVALID.
cursorstring
The previous page's nextCursor. A malformed cursor is 400 INPUT_INVALID. A filtered page can hold fewer rows than limit and still carry a nextCursor; keep paging until it is absent.
curl -s "http://localhost:8080/api/transactions?unresolved=true" \
  -H "Authorization: Bearer $ADMIN_TOKEN"

States

state is derived from the recorded facts each time a row is read, and ageSeconds is computed at read time. Payment status always comes from the payment attempt.

StateMeaning
payment-pendingreserved, with no settlement verdict recorded
payment-failedthe payment attempt is recorded as rejected
payment-uncertainsettlement-uncertain or legacy failed: funds may have moved
delivery-startedbefore the backend deadline, with no completion recorded; the call may still be in progress
delivery-unknownsettled; the backend ended without a response, or its deadline passed without confirmed delivery
settled-undeliveredsettled, with no backend call recorded or a recorded non-2xx response
deliveredsettled, with a recorded 2xx backend result and pipeline completion

Once the backend deadline passes, an unfinished delivery-started row reads as delivery-unknown if settled, or payment-pending otherwise, with no write needed. Handle state names you do not recognize: later releases may add more.

Fields

paymentobjectrequired
Provider, attempt ID, replay key, status, amount and currency. Optional fields identify the network, asset, payee, transaction ID and public locator coordinates for reconciliation. settlingAt records when settlement was called; expiresAt records when the authorization can no longer land.
authorizationobject
For AP2 resources: the mandate record, its reservationId and hold (reserved, consumed, released or uncertain).
backendobject
dispatchedAt and deadlineAt (dispatch plus the backend timeout and a margin). If the dispatch write failed, these timestamps fall back to the recorded result time. When known, the entry also includes status (0 when the call ended without one) and errorCode.
receiptIdstring
inputDigeststring
sha256: and the hex digest of the canonical JSON input; omitted for input that cannot be canonicalized.
configDigeststringrequired
Digest of the pricing and settlement terms, without credentials.
persistenceFailuresstring[]
Store writes that failed without stopping the call: payment-attempt, receipt or journal, and labels later releases may add.
createdAt / updatedAt / completedAtISO 8601
completedAt records pipeline completion when the final journal write succeeds.

Get one transaction

GET/api/transactions/{id}Bearer adminToken

Returns transaction, its payment attempt and receipt when available, and up to 50 of the request's events, newest first. An unknown id is 404 RESOURCE_NOT_FOUND.

bash
curl -s "http://localhost:8080/api/transactions/txn_…" \
  -H "Authorization: Bearer $ADMIN_TOKEN"
Resolve what you find with agent-commerce reconcile, which reads chain evidence, or record a verdict with POST /api/payment-attempts/:id/resolve.