Create a transaction
Write a balanced set of postings. Replays of the same
Idempotency-Key return the original transaction with status 200.
Set ?dry_run=true to validate without writing: no idempotency
key required, no events emitted, no balance changes.
Authorizations
Same flow; ledger:write is required for any mutation.
Headers
Required on writes. Stable identifier you choose. The same key
always returns the same transaction, forever. Can also be supplied as
idempotency_key in the request body. Header wins.
Allowed character set: A-Z, a-z, 0-9, _, :, ., -.
Max 255 bytes. Replays of an accepted key return the original
response with header Idempotent-Replayed: true so callers can
tell a replay from a freshly-committed result.
1 - 255^[A-Za-z0-9_:.\-]+$"pi_acme_1234_capture"
Query Parameters
Comma-separated. postings.account inlines each posting's
account object; balances adds the post-commit balance of every
touched account.
postings.account, balances Body
2Alternative to the Idempotency-Key header. Required if header
absent. Charset [A-Za-z0-9_:.-], max 255 bytes.
255"pi_acme_1234_capture"
Free-form caller annotations. Mutable via PATCH.
When the value transferred (vs booking_date, which is when
we recorded the entry). Used by reports. Defaults to the
booking time.
"2026-05-14T10:00:00Z"
Response
Replayed (same Idempotency-Key as a prior call).
Discriminator naming the shape of this resource (e.g. account, transaction).
transaction "account"
"3061ec4e-c959-49ba-a0f6-99186a7bd5d8"
"pi_acme_1234_capture"
Set when this transaction reverses another.
Set when this transaction has been reversed.
Set when this transaction refunds another (partial or full).
Minor units refunded, as a decimal string. Parse with a big-integer or decimal type, never a JS number. Present only on refund transactions.
^-?\d+$Decimal string. Present only when the transaction has postings in more than one currency. The rate that was in effect at write time. It is persisted for audit and restatement, never recomputed.
"1.0823"
Currency that the exchange rate quotes from. Set with exchange_rate.
"USD"
Currency that the exchange rate quotes to. Set with exchange_rate.
"USDC"
Returned only when ?expand=balances.