Charge service fees to an account
Charges service fees of the account plan of the account. Each occurrence of a code in serviceCodes is one unit. Units inside the free quota of their fee come out as quota and cost nothing; units past it come out as charged at the fee’s flat amount. Codes the account’s plan does not declare, and every code of an account without a plan, come out as not_covered and consume nothing. All charged units post in a single fee transaction in the account’s asset, debiting the account and crediting each fee’s creditAccount, on the fees’ transaction route when the ledger validates accounting routes; neither account plans nor fee packages apply to it. When no unit is charged the charge is recorded without a transaction. The X-Idempotency header is required (400, 0552); a retry with the same key and body returns the recorded charge with X-Idempotency-Replayed and charges nothing again. A code no fee of the ledger declares is refused (422, 0549), as is a code only transaction fees declare (422, 0550) and codes whose fees have different transaction routes (422, 0551). When the fee transaction is refused, for insufficient funds for instance, the charge is refused with the same error and nothing is consumed. ledgerId in the query or the body is refused with 0235.
Authorizations
JWT bearer token issued by the identity provider.
Headers
Required. Idempotency key of the charge, unique per account: a retry with the same key and body returns the recorded charge with X-Idempotency-Replayed, a different body under the same key answers 409 (0084).
Path Parameters
Organization ID (UUID)
Ledger ID (UUID)
Account ID (UUID)
Body
Service codes to charge, 1 to 100. Each occurrence is one unit; codes are normalized to trimmed upper case.
1 - 100 elementsDescription of the charge, also used as the description of the fee transaction.
256"Tarifas de serviço de outubro"
Flat metadata of the charge, also written to the fee transaction.
Response
Created
"00000000-0000-0000-0000-000000000000"
Account plan active for the account when the charge was taken; null when the account had none.
"00000000-0000-0000-0000-000000000000"
Version of the account plan in effect when the charge was taken; 0 when the account had no plan.
1
Asset of the account the charge was taken in.
"BRL"
"2026-10-22T12:00:00Z"
Fee transactions that charged the charged items; empty when nothing was charged.
"00000000-0000-0000-0000-000000000000"
One item per service code of the request, in request order.
"00000000-0000-0000-0000-000000000000"
"00000000-0000-0000-0000-000000000000"
Monthly quota period (YYYY-MM) the units were counted in, in the plan timezone.
"2026-10"
Sum of the amounts of the charged items.
"15"
"Tarifas de serviço de outubro"

