# How to verify a consumer-driven contract

> Verify the interaction a client needs against a candidate service version. See how changing a timestamp format can break a collection app.

Source: https://cueapril.com/knowledge/how-to/verify-a-consumer-contract
Updated: 2026-12-02
Index: https://cueapril.com/llms.txt

## How do I know that a provider change is compatible with a consumer?

Capture the interaction the real consumer depends on and verify it against the provider version you plan to deploy. Use a known provider state and retain both version identities with the verification result.

## Check both sides of the interaction

A contract is strongest when the consumer test exercises its real client code and the provider verification exercises its real interface.

1. Exercise the consumer with a representative response. Describe the request and the status, fields or values its behaviour actually requires.
2. Publish that interaction with the consumer version. Set up a reproducible provider state, then run the interaction against the candidate provider.
3. Compare the candidate with supported consumer versions. Record mismatches and rerun after either side intentionally changes the contract.

## Worked example: A collection screen needs its time slot

The collection app reads a slot’s start time as an ISO timestamp. A provider returns the slot with a successful status but changes the field to a display label. Provider verification against the consumer’s expected timestamp format exposes the incompatible change before the two versions ship together.

## Try it on your pull request

Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.

[Try Cue April on your repository](https://app.cueapril.com/sign-up/?next=%2Fquality-start)

## Related reading

- [Consumer-driven contract](https://cueapril.com/knowledge/definitions/consumer-driven-contract)

- [The test pyramid and testing trophy explained](https://cueapril.com/knowledge/explanations/test-layers-and-tradeoffs)

- [Choose where to test each risk](https://cueapril.com/knowledge/playbook/design-the-test-portfolio)

[Browse the Knowledge base](https://cueapril.com/knowledge)
