Charge the maintenance fee of a period
Charges the maintenance fee of a period: for each enabled maintenance billing package of the ledger, or the one billingPackageId names (a disabled one is skipped, as billing/calculate skips it, and answers no account), and each active target account, posts one internal fee transaction of feeAmount from the account to maintenanceCreditAccount in the package asset, described "Billing - <label> - <period>" with metadata billingType, billingPackageId and period. When the ledger validates accounting routes the transaction takes the package accounting routes, and a package without them refuses the call (422, 0547) before anything is posted. Each package, account and period is charged at most once: the charge is recorded durably before it posts, an account already posted answers replayed with its transaction and posts nothing, and one another call is posting answers in_flight. A fee transaction the ledger refuses answers refused with its code, for insufficient funds for instance (0018) or an account in another asset, and the other accounts proceed; a later call for the period tries the refused accounts again. With deferrable, the share of the fee the account's available balance cannot fund opens a fee debt of the charge (origin billing_charge with the charge id on GET .../fee-debts; debts opened before name billing_package), settled by the account's later credits, instead of refusing: an account holding nothing opens the whole fee as a debt, posted without a fee transaction and so without transactionId; the overdraft is not drawn. period is YYYY-MM, not later than the current month (UTC) (400, 0082). The call walks the packages by id and, within each, the accounts by id, and visits at most limit accounts (1 to 500, default 100; 0080 above it), replayed ones included. When accounts remain it answers hasMore=true and nextCursor; sending that cursor in the next call resumes after the last account visited, and a call without cursor starts from the first account. A cursor that does not decode is refused (400, 0082). billing/calculate is unaffected and posts nothing. ledgerId in the query or the body is refused with 0235.
POST
Charge the maintenance fee of a period
Parámetros de ruta
Cuerpo
application/json
Respuesta
OK

