Skip to main content
POST
Create a PIX transaction

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Idempotency
string
required

Idempotency key for this payment order: any stable string you choose, up to 255 bytes, sent as the X-Idempotency request header (the same header, by the same name, that MED writes and the Midaz ledger take). REQUIRED: omitting it, sending only whitespace, or sending more than 255 bytes is refused 400 PIX-0061 before anything is read, held or sent. Send the SAME value again to retry the SAME order: once an order is recorded under the key, a resend is answered 409 PIX-0029 and moves no money, whether that order went to SPI or settled on-us, so read its outcome with GET /v1/transactions. Keys are scoped to the payer: the organization, plus the indirect participant on an indirect order. A new order needs a new key. BREAKING CHANGE: this replaces the optional body field clientRequestId, which no longer exists.

Example:

"order-2026-09-25-0001"

Body

application/json
accountId
string
required

The Midaz ledger account id of the payer.

Example:

"019a1b2c-3d4e-7f60-8a9b-0c1d2e3f4a5b"

amount
integer<int64>
required

Transaction amount in centavos (an integer, e.g. 10050 = R$ 100,50).

Example:

10050

payee
object
required

The recipient bank data.

description
string

Free-text payment description.

Example:

"Invoice 42"

endToEndId
string

SPI end-to-end id. Omit ONLY for a manually-typed payment order: per JDPI §8.4.1 the id does not exist yet and is generated by SPI on this call. If you obtained one from POST /v1/qrcodes/decode (§8.3.3) or from GET /v1/entries/{entryId}/lookup (§8.2.14) you MUST send it: omitting it makes SPI mint a DIFFERENT id, and on a payment by key it makes the order go out as manually typed. The endToEndId alone does NOT make an order a QR payment: a Pix paid from a decoded QR must also send qrCodeType (and txId as qrCodeType requires: optional on STATIC, required on DYNAMIC), or it goes out as a payment by key and the payee cannot conciliate it.

Example:

"E1234567890"

indirectId
string<uuid>

Optional registered-indirect identifier (UUID) routing this outbound order through an indirect participant's PIX position. Omit for a direct order. Validated server-side before any money moves; unknown or inactive is rejected. Refused 422 PIX-0111, naming the setting to enable, while this deployment's indirect-participants feature is off — the order is never executed as a direct one, which would hold the funds on the payer's own account instead of the indirect's PIX position.

Example:

"3f2504e0-4f89-41d3-9a0c-0305e82c3301"

payerIspb
string

The ISPB of the institution the money leaves from. This deployment may act as SEVERAL direct SPI participants — one ISPB each, each with its own books — and this field is the only thing on the order that says which of them pays. OPTIONAL while it acts as a single participant: omit it and that one pays. REQUIRED once it acts as several — omitted is 422 PIX-0127, and an ISPB this deployment does not act as is 422 PIX-0128. It is ROUTING DATA you supply and guarantee, exactly like indirectId: never a credential, never read from a header or a path, and it never widens what your token can reach. It also decides what counts as on-us — a payee on the PAYING institution ISPB settles as an internal transfer, a payee on a sibling institution of this same deployment is an ordinary Pix over SPI. On an order carrying indirectId it must be blank or the participant recorded at that indirect's registration, which is not necessarily the deployment default one (422 PIX-0102). Send it as an absent key, not an empty string; an empty value is refused 400 PIX-0061.

Pattern: ^[0-9]{8}$
Example:

"12345678"

priority
integer<int64>

Numeric eTransactionPriority (1=PRIMARY,2=SECONDARY).

Example:

1

qrCodeType
enum<string>

The qrCodeType POST /v1/qrcodes/decode answered, copied verbatim, on a Pix paid from a QR. It makes the order go out as a QR payment (JDPI §8.4.1 tpIniciacao 2 for STATIC, 3 for DYNAMIC) instead of a payment by key. Requires payee.key and endToEndId, both as the decode answered them. Omit it on a key or a manually typed payment. Validated before anything is held: an invalid combination is refused 400 PIX-0061 naming the field. When the payee banks at the paying institution (an on-us transfer sends no order to SPI) it routes nothing: it is recorded as the initiation type (tpIniciacao) of the TRCK.002 report that on-us Pix owes Bacen. Ignored on a transfer to another core of the same ISPB.

Available options:
STATIC,
DYNAMIC
Example:

"DYNAMIC"

txId
string

The txId POST /v1/qrcodes/decode answered, copied verbatim and never trimmed (whitespace is refused 400 PIX-0061); sent to JDPI as idConciliacaoRecebedor so the payee conciliates the payment. Only with qrCodeType (alone it is refused 400 PIX-0061). STATIC: optional, up to 25 alphanumeric characters ([a-zA-Z0-9]); the static default *** is accepted and sent as absent. A static QR may decode to a txId outside that band (e.g. TX-001: JDPI §8.3.1/§8.3.3 state no charset, §8.4.1 does); such a QR cannot be paid as a QR payment, and sending its txId is refused 400 PIX-0061 before anything is held. DYNAMIC: required, 26 to 35 alphanumeric characters.

Example:

"KJ8H2ZQ0RX4T7W1N9C3V5B6M8P"

Response

Created

amount
integer<int64>
required

Transaction amount in centavos.

Example:

10050

id
string
required

The created transaction id.

Example:

"d1f9c0a2-..."

status
string
required

eTransactionStatus name.

Example:

"PENDING"

description
string

Payment description.

Example:

"Invoice 42"

endToEndId
string

The SPI end-to-end id.

Example:

"E1234567890"

flow
integer<int64>

Numeric eTransactionFlow (2=CASH_OUT,3=INTRA_PSP).

Example:

2

jdpiRequestId
string

The JDPI request id (external CASH_OUT).

Example:

"REQ-123"

priority
integer<int64>

Numeric eTransactionPriority.

Example:

1