This article analyzes the use of contract testing to verify the compatibility of two components, specifically web servers that use an Application Programming Interface (API) for data transmission. Additionally, the article includes a comparison of APIs and contract tests and describes cases where the latter have an advantage. A contract structure for contract testing is described. The article contains a description of the ontological approach for comparing knowledge about the business systems of the provider, in the form of ontologies, with the software representation of the consumer system, stored in the form of classes. A structure of the object that supplements the contract by providing it with business logic level checks is developed. Basic predicates that form the basis of this method are proposed and described. The use of the mapping field allows for the use of thesauruses or dictionaries for automated replacement of concepts when using synonym words. An example is provided that demonstrates the operation of this approach, namely: a simplified representation of the provider system’s concepts, a simplified structure of the consumer system’s classes, an example of an API and a contract for it, an extension using the developed approach, and the result of test execution.