Skip to main content
The /api/v1/transactions endpoint posts a new double-entry transaction to the ledger. Every transaction must carry at least two journal lines that balance — the sum of all DEBIT amounts must equal the sum of all CREDIT amounts for each currency. A unique Idempotency-Key header is required on every request.

Endpoint

Authorization

Requires an API key with the TRANSACTIONS_WRITE scope. Pass as Authorization: Bearer <key>.

Headers

string
required
A client-generated unique key (max 255 characters) that prevents duplicate transaction posting on retries. If you retry a request with the same key after a successful commit, the original transaction is returned.

Request Body

array
required
Array of journal lines (minimum 2, maximum 1000). Debits must equal credits per currency.
object
Arbitrary key-value string map attached to the transaction, up to 50 entries. Optional — defaults to an empty map if omitted. Use this to store your own reference data (customer IDs, order numbers, etc.).
The Idempotency-Key is consumed on a successful 201 response. Retrying with the same key returns the original transaction. A 409 means a transaction with that key is still in progress — wait and retry.

Request Examples

Response

string
UUID of the committed transaction.

Response Example

Error Codes

A 422 error has two possible causes: (1) Unbalanced transaction — the total DEBIT amount does not equal the total CREDIT amount for a given currency. Check that each currency’s debits and credits sum to the same value. (2) Account not found — one or more accountId values in your lines array do not correspond to an account in your tenant. Verify all account IDs before retrying.