When a vendor ships a sandbox, contract tests run against a shared environment that has its own data, its own uptime and its own quirks. When the vendor ships no sandbox, teams default to one of two bad options: live calls from CI, or hand-written mocks. Live calls make the pipeline depend on a third party's availability and credentials, and hand-written mocks drift silently because nobody knows what the real payload looks like 1. The middle path is recording: run the real request once, against the real vendor, save the response, and replay the saved bytes forever.
This is the pattern the record/replay tooling ecosystem settled on. The useful sequence is capture, save, replay, verify, and the value is that a capture exposes requests and payload combinations your written tests do not include 2. A word of caution from the same source: a capture only represents the traffic observed during its collection window, so keep explicit tests for new features and rare cases that did not occur then.
Two things make recorded fixtures a genuine contract rather than a snapshot of one lucky afternoon. First, a fixture is an assertion about structure: which fields exist, what types they carry, which status codes appear. That is exactly what contract testing verifies, whether the API still honors the agreement consumers depend on, including endpoints, request and response formats, headers and status codes 3. Second, a fixture is cheap to re-check. Because the artifact is a file, you can diff a fresh live response against it on a schedule and get a signal that a schema you never wrote has changed under you.
The decision rule for choosing this path over a sandbox: use a vendor sandbox if it exists, is documented, and holds stable data. Otherwise record. The trade-off is explicit. A sandbox catches behavioral changes the moment they happen; fixtures catch them at the next re-record. If the vendor's API changes shape and your re-record job runs weekly, you have a seven-day detection window. Make that window a documented number rather than an accident.



