Skip to main content
POST
Initiate a DARF payment

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Organization-Id
string

Tenant organization ID. Accepted but ignored: the tenant is determined by the credentials you authenticate with, so sending this header, or sending a different value in it, changes nothing.

Idempotency-Key
string

Client-supplied idempotency key. Required in practice even though the schema marks it optional: a request that omits this header is refused with 400 PBP-0012.

Body

application/json
fineAmount
string
required

Fine amount as a decimal string, up to two decimal places. Must be non-negative.

Maximum string length: 32
Example:

"5.00"

interestAmount
string
required

Interest amount as a decimal string, up to two decimal places. Must be non-negative.

Maximum string length: 32
Example:

"10.00"

mainAmount
string
required

Principal amount as a decimal string, up to two decimal places. Must be positive.

Maximum string length: 32
Example:

"100.00"

midazAccountId
string
required

Midaz account the payment settles from.

name
string
required

Taxpayer name, up to 80 bytes (UTF-8; accented characters count as more than one byte).

Example:

"Fulano de Tal"

personType
string
required

Taxpayer person type: F for an individual (CPF, 11 digits) or J for a legal entity (CNPJ, 14 digits). It must agree with taxId: a length that does not match the person type, or a failing check digit, is refused with 400 PBP-0200.

Example:

"F"

referenceDate
string<date>
required

Tax period reference date, YYYY-MM-DD.

Example:

"2026-04-01"

taxId
string
required

Taxpayer CPF or CNPJ, digits only. Its length and check digits are validated against personType.

Example:

"12345678909"

treasuryRevenueCode
string
required

Federal treasury revenue code (codigo da receita): the four zero-padded digits listed in the tax code catalogue the provider publishes as TaxMessageCodes.pdf. Send the four digits alone — the service prefixes them with TRC_ on the way to the provider, and a value that already carries that prefix is forwarded unchanged. The code is not checked against the catalogue here; an unknown code is refused by the provider.

Example:

"0086"

type
string
required

DARF type: S for Simples, N for Normal.

Example:

"S"

description
string

Optional free-text description carried on the payment.

dueDate
string

Optional due date, YYYY-MM-DD.

history
string

Optional free-text history carried on the payment.

referenceNumber
integer<int64>

Optional reference number carried to the tax authority.

totalIncomeAmount
string

Optional total income amount as a decimal string.

Maximum string length: 32
totalIncomePercent
string

Optional total income percentage as a decimal string.

Maximum string length: 32

Response

Created

createdAt
string
required
id
string
required
providerId
string
required
status
string
required
totalAmount
string
required
type
string
required