Saltar al contenido principal
POST
Charge service fees to an account

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

X-Idempotency
string

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).

Parámetros de ruta

organization_id
string
requerido

Organization ID (UUID)

ledger_id
string
requerido

Ledger ID (UUID)

account_id
string
requerido

Account ID (UUID)

Cuerpo

application/json
serviceCodes
string[] | null
requerido

Service codes to charge, 1 to 100. Each occurrence is one unit; codes are normalized to trimmed upper case.

Required array length: 1 - 100 elements
Ejemplo:
description
string

Description of the charge, also used as the description of the fee transaction.

Maximum string length: 256
Ejemplo:

"Tarifas de serviço de outubro"

metadata
object

Flat metadata of the charge, also written to the fee transaction.

Respuesta

Created

accountId
string
requerido
Ejemplo:

"00000000-0000-0000-0000-000000000000"

accountPlanId
string
requerido

Account plan active for the account when the charge was taken; null when the account had none.

Ejemplo:

"00000000-0000-0000-0000-000000000000"

accountPlanVersion
integer<int64>
requerido

Version of the account plan in effect when the charge was taken; 0 when the account had no plan.

Ejemplo:

1

assetCode
string
requerido

Asset of the account the charge was taken in.

Ejemplo:

"BRL"

createdAt
string<date-time>
requerido
Ejemplo:

"2026-10-22T12:00:00Z"

feeTransactionIds
string[] | null
requerido

Fee transactions that charged the charged items; empty when nothing was charged.

id
string
requerido
Ejemplo:

"00000000-0000-0000-0000-000000000000"

items
object[] | null
requerido

One item per service code of the request, in request order.

ledgerId
string
requerido
Ejemplo:

"00000000-0000-0000-0000-000000000000"

organizationId
string
requerido
Ejemplo:

"00000000-0000-0000-0000-000000000000"

period
string
requerido

Monthly quota period (YYYY-MM) the units were counted in, in the plan timezone.

Ejemplo:

"2026-10"

totalAmount
string
requerido

Sum of the amounts of the charged items.

Ejemplo:

"15"

description
string
Ejemplo:

"Tarifas de serviço de outubro"

metadata
object