Initiate a DARF payment
Initiates a DARF (federal tax) payment with specific tax fields.
Authorizations
JWT bearer token issued by the identity provider.
Headers
Midaz organization the account and the ledger entry live under. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025.
Client-supplied idempotency key, a UUID. Required: a request without it, or with a value that is not a UUID, is refused with 400 PBP-0012.
Body
Fine amount as a decimal string, up to two decimal places. Must be non-negative.
32"5.00"
Interest amount as a decimal string, up to two decimal places. Must be non-negative.
32"10.00"
Principal amount as a decimal string, up to two decimal places. Must be positive.
32"100.00"
Midaz account the payment settles from. The TAXPAYER of the DARF is the registered owner of this account, read from the Midaz CRM — the request does not state one. A holder whose registered name exceeds 80 bytes cannot be paid on this rail: the name is never shortened to fit, and the refusal is 422 PBP-0207.
Tax period reference date, YYYY-MM-DD.
"2026-04-01"
Federal revenue code (código da receita) of the DARF: the four digits of the code, zero-padded, for example 0086. A value in the provider's prefixed form, such as TRC_0086, is also accepted. At most 20 characters. The code is not checked against the revenue code catalogue by this API; the payment provider refuses an unknown code.
"0086"
DARF type: S for Simples, N for Normal.
"S"
Optional free-text description carried on the payment.
Optional due date, YYYY-MM-DD.
"2026-05-10"
Optional free-text history carried on the payment.
Midaz ledger the account lives in and the entry is posted to. Required: absent, blank or not a canonical UUID is refused with 400 PBP-0026.
Optional reference number carried to the tax authority.
Optional total income amount as a decimal string.
32Optional total income percentage as a decimal string.
32Response
Created. The payment provider acknowledged the DARF payment: it is in status CREATED and carries the provider's providerId. Its outcome arrives later; follow it with GET /v1/payments/{id}. A request under an Idempotency-Key that already names a DARF payment the provider acknowledged is answered 201 too, with that payment as it stands, in whatever status it has reached. Compare the 202, where the outcome at the provider is not known.
Midaz ledger the payment was written with. Always present.
Midaz organization the payment was written with. Always present.
The payment's status when this answer was produced. CREATED on a 201 for a new payment; UNCONFIRMED on a 202, while the outcome at the payment provider is unknown. A request already on record is answered with the payment's status at that moment, which may be any status a payment takes. A replay of the same Idempotency-Key serves the stored answer, whose status may since have changed: read the payment by id for its current state.
Identifier the payment provider assigned to this payment. Quote it, together with providerRequestId, when you contact the provider about this payment. Absent while the payment is UNCONFIRMED (the 202 answer): the provider has acknowledged nothing yet. Read the payment by id later to obtain it.
Reference this API sent to the payment provider when it instructed the payment, exactly as sent. Which of providerId and providerRequestId the provider accepts for a lookup depends on the provider and on the payment type, so quote both when you contact the provider. Absent when the payment carries no such reference.

