The Budgets service manages per-grant spending budgets. Allocate budgets when issuing grants, debit as agents consume resources, check remaining balances, and review transaction history.
Debit an amount from a grant’s budget. Uses atomic operations to prevent overdraft. Returns an error with HTTP 402 and code INSUFFICIENT_BUDGET if the balance is insufficient.
Debits are all-or-nothing. If the remaining budget is less than the debit amount, the API returns HTTP 402 with code INSUFFICIENT_BUDGET and the debit is not applied.