# ContractThresholds

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

## Fields
- `maxAmount` (number(double)): Total amount the contract may bill across its lifetime before it deactivates itself.  Leave it empty for no limit. The contract create and update endpoints require a value  greater than zero when one is supplied; a non-positive value stored by an older save is  read as no limit. (nullable, min 0)
- `maxNumPayments` (integer(int32)): Total number of billing attempts, successful or not, the contract may make before it  deactivates itself. Leave it empty for no limit. The contract create and update endpoints  require at least 1 when a value is supplied; a non-positive value stored by an older save  is read as no limit. (nullable)
- `maxSuccessfulBills` (integer(int32)): Number of successful bills the contract may take before it deactivates itself. Leave it  empty for no limit. The contract create and update endpoints require at least 1 when a  value is supplied; a non-positive value stored by an older save is read as no limit. (nullable)
- `maxFailCount` (integer(int32)): Consecutive failed billing attempts that suspend the contract. Empty or `0` means the  contract is never suspended for failures and retries indefinitely. Unlike the three  capacity caps above, `0` is a valid, accepted value here. (nullable)
- `failureInterval` (integer(int32)): How many `failurePeriod` units to wait before retrying after a failed billing  attempt. Applied together with `failurePeriod`. (nullable)
- `failurePeriod` ([Period](https://devportal.demo.winkpg.io/docs/api/models/Period.md)): The unit the `failureInterval` retry delay is measured in. (nullable)
  Values:
  - `Day`
  - `Week`
  - `Month`
  - `Year`
- `failureRetryResultCodes` (array<string>): Processor response codes that count toward the `maxFailCount` suspension threshold.  If a failure's response code is NOT in this list, the failure retries indefinitely  until the contract ends. If the code IS in this list and consecutive failures reach  `maxFailCount`, the contract is suspended.  Null or empty means all failure codes count toward suspension. (nullable)

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
