---
title: "PATCH /billing/{tenantLocator}/accountBalances/{locator}/handleExcessFunds"
method: PATCH
path: "/billing/{tenantLocator}/accountBalances/{locator}/handleExcessFunds"
---

# PATCH /billing/{tenantLocator}/accountBalances/{locator}/handleExcessFunds

`PATCH /billing/{tenantLocator}/accountBalances/{locator}/handleExcessFunds`

## Request

- Base URL: `https://docs.socotra.com`
- URL: `https://docs.socotra.com/billing/{tenantLocator}/accountBalances/{locator}/handleExcessFunds`
- Auth: none declared
- TypeScript: <https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi/docs/billing/:tenantLocator/accountBalances/:locator/handleExcessFunds/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `tenantLocator` string, uuid, required
- `locator` string, ulid, required

## Query parameters

- `currency` string

## Response `200`

OK

- AccountExcessHandlingResult
  - `accountLocator` string, ulid, required
  - `currency` string, required
  - `accountCreditBalance` number, required
  - `excludedDebitsAmountResult` ExcludedDebitsAmountResult, required
    - `calculationType` 'none' | 'pastDueInvoices' | 'allInvoices' | 'invoicesAndUnbilledInstallments', required
    - `entitiesUsedInCalculation` ExcludedDebit[], required
      - `entityLocator` string, ulid, required
      - `type` 'invoice' | 'installment', required
    - `currency` string, required
    - `amountToExclude` number, required
  - `thresholdUsed` number
  - `createDisbursementResult` ExcessCreditCreateDisbursementResult
    - `disbursementLocator` string, ulid, required
    - `disbursementState` 'draft' | 'validated' | 'approved' | 'executed' | 'reversed' | 'rejected' | 'discarded', required
    - `disbursedAmount` number, required
    - `validationResult` ValidationResult
      - `validationItems` ValidationItemResponse[]
        - `elementType` string, required
        - `locator` string, ulid, required
        - `errors` string[], required
      - `success` boolean, required
  - `errors` string[], required

---

[API](https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi.md) - [All operations](https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi/llms.txt) - [OpenAPI document](https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi/revisions/6537d24b3693?raw)
