> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sakawave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reconcile transactions

> Match transfers to ledger entries and safely handle reversals.

Transactions are Sakawave ledger entries. A transfer may be related to multiple entries, including its debit, fees, and a later reversal. Reconcile by stable identifiers, not amount alone.

## List by account and category

```bash theme={null}
curl --request GET \
  --url "$SAKAWAVE_BASE_URL/v1/transactions?accountId=$SOURCE_ACCOUNT_ID&category=transfer&sort=-createdAt" \
  --header "Authorization: Bearer $SAKAWAVE_API_KEY" \
  --header "Accept: application/json"
```

Store these fields:

* `id` as the unique ledger-entry identifier;
* `internalReference` as Sakawave's operational reference;
* `externalReference` to match your transfer intent when present;
* `groupReference` to group related entries when present;
* `reversalOfTransactionId` to link a reversal to the original entry;
* `amount`, `fee`, `balanceBefore`, and `balanceAfter` as minor-unit strings.

## Retrieve transaction context

`GET /v1/transactions/{transactionId}` adds `relatedOperation`. For a transfer it includes the transfer ID, reference, status, currencies, destination summary, and failure details.

Do not consider a transfer settled merely because a debit exists. Confirm the transfer reached `completed`. If a transaction or transfer becomes `reversed`, post a compensating state in your own ledger rather than mutating historical records.

## Recovery loop

Use webhooks for low-latency updates, then run a scheduled reconciliation job that pages through transactions since the last successful checkpoint. Keep a small overlap window and upsert by transaction `id`; this safely handles late visibility and repeated pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.