Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Idempotency
string

Idempotency key to safely retry the create; an identical retry returns the original transaction

X-TTL
string

Idempotency slot TTL in seconds (default 300)

Body

application/json

Transaction request body. debits and credits are the two required, non-empty leg arrays of the transaction; one debit paired with many credits, or the reverse, is a valid request. Every leg names the organizationId and ledgerId its account belongs to; all of them must name the SAME pair, and that pair is the organization and ledger the transaction is created in. A request whose accounts name different pairs is rejected. asset, amount, description, code, routeId, operationRouteId and metadata sit alongside the two leg arrays, and amount is the transaction total that the legs' share expressions divide. Each leg array holds at most 500 legs.

amount
string
required
asset
string
required
credits
object[]
required
Required array length: 1 - 500 elements
debits
object[]
required
Required array length: 1 - 500 elements
code
string
description
string
metadata
object
operationRouteId
string<uuid>
Example:

"00000000-0000-0000-0000-000000000000"

routeId
string<uuid>
Example:

"00000000-0000-0000-0000-000000000000"

Response

Created

amount
string | null
required
Example:

"1500"

assetCode
string
required
Required string length: 2 - 10
Example:

"BRL"

createdAt
string<date-time>
required
Example:

"2021-01-01T00:00:00Z"

credit
string[] | null
required
Example:
debit
string[] | null
required
Example:
deletedAt
string<date-time> | null
required
Example:

"2021-01-01T00:00:00Z"

description
string
required
Maximum string length: 256
Example:

"Transaction description"

feesSkipped
boolean
required
Example:

false

id
string<uuid>
required
Example:

"00000000-0000-0000-0000-000000000000"

ledgerId
string<uuid>
required
Example:

"00000000-0000-0000-0000-000000000000"

operations
object[] | null
required
organizationId
string<uuid>
required
Example:

"00000000-0000-0000-0000-000000000000"

status
object
required
tracerSkipped
boolean
required
Example:

false

updatedAt
string<date-time>
required
Example:

"2021-01-01T00:00:00Z"

metadata
object
parentTransactionId
string<uuid>
Example:

"00000000-0000-0000-0000-000000000000"

routeId
string<uuid>
Example:

"00000000-0000-0000-0000-000000000000"