In one paragraph
Payments, tax, search, returns, support, reviews, attribution, migration — the functional layer is where commerce quietly breaks. An integration audit is mostly plumbing work: find the contract, watch the traffic, and prove each side agrees. All of it can be done with open-source tools you run yourself.
What you end up with
- A written contract per integration: endpoint, payload, auth, retry behaviour, owner
- A captured trace of a real transaction through every hop, with timings
- A failure-mode list including what happens at 3am when the provider 500s
- A replay harness that proves a fix before it ships
The reference stack
Every project below is open source and self-hostable. Licences are the ones the project publishes today; check them against your own distribution model before you ship, because a licence can change and an AGPL project has obligations a MIT project does not.
| Layer | Open-source project | Licence | What it does for you |
|---|---|---|---|
| Traffic capture | mitmproxy | MIT | Intercept and inspect HTTPS API calls between platform, app and provider; script assertions over captured flows. |
| Contract testing | Pact (contract testing) | MIT | Record what the consumer expects and verify the provider still satisfies it, before a provider change breaks checkout. |
| Payload validation | JSON Schema / Ajv | MIT | Assert every webhook and API payload shape, so a silently nullable field is a failed test rather than a lost order. |
| Queue + retry | RabbitMQ or NATS | MPL-2.0 / Apache-2.0 | Buffer outbound calls so a provider outage becomes a delay rather than a lost transaction. |
| Reconciliation | dbt-core + a warehouse | Apache-2.0 | Match orders, payments and refunds across systems daily; the unmatched set is the bug list. |
| Webhook replay | your own CLI + platform sandbox | n/a | Replay captured payloads at a sandbox endpoint to reproduce a failure deterministically. |
Build it
1. Write the contract before touching anything
For each integration: direction, endpoint, auth method, payload sample, idempotency key, retry policy, timeout, and who is paged when it fails. Most integration incidents are a missing line in this document, not a code bug.
2. Capture one real transaction end to end
Run a test order through the live path with the proxy in place and record every hop with timings. You now have a factual baseline: which system is slow, which one calls twice, which one silently drops a field.
3. Turn the capture into assertions
Each captured payload becomes a schema assertion plus a few value rules (currency present, totals reconcile, idempotency key unique). Wire them into the provider’s sandbox so the assertion runs on every push.
4. Test the failure paths deliberately
Timeout, 500, 429, malformed payload, duplicate webhook, out-of-order webhook. Six scenarios per integration, all automated. This is where the honest answer to “is the integration resilient” gets produced.
5. Reconcile daily
One query that matches orders to payments to refunds across systems. Any unmatched row is either a bug or a business event nobody recorded; both need an owner. Publish the daily count.
6. Document the blast radius
If this integration goes down, what exactly stops working, and what does the customer see? That sentence belongs on the runbook, not in an architect’s head.
Acceptance checks
If you cannot verify a claim, it is not a finding. These are the checks that close the work; each one can be run by somebody who did not build it.
| Acceptance check | How to verify it |
|---|---|
| Every integration has a contract with auth and retry defined | Repository checklist; a missing section fails review. |
| A captured trace exists for the happy path | Stored HAR/mitmproxy flow per integration, dated, with the release it was taken from. |
| All six failure scenarios have an automated test | Test suite count per integration = 6; skipped tests are counted as missing. |
| Webhook payloads validate against schema | Ajv validation in the test suite, plus a production sampler that logs violations. |
| Daily reconciliation unmatched count is published and zero or explained | dbt test + a dashboard tile; every non-zero day needs a note. |
| Retry and idempotency verified by replay | Replay the same payload twice and assert one effect, not two. |
Effort and cost
| Estimate | |
|---|---|
| Skill needed | Advanced: HTTP, auth flows, queues, SQL |
| Build time | 1–2 days per integration for contract + assertions; 1 day for the reconciliation models |
| Running cost | Reconciliation daily (automated); contract review on every provider change |
| What you must host | Proxy on a laptop, queue and dbt on a small VM. No paid services required. |
What open source does not give you
The honest half of the comparison. Each of these is a reason somebody buys the service instead of building it, and pretending otherwise would make the rest of this page worthless.
- You cannot proxy a provider that pins certificates or blocks non-browser clients. For those, the audit falls back to sandbox logs and provider-side dashboards.
- Some platforms do not expose webhooks for every event (refund settlement and chargeback states are the usual gap). Absence of an event is not absence of a problem.
- Pact-style contract testing only helps if both sides are testable. A closed SaaS provider will change under you, and the contract test is then a detector, not a preventer.
- Reconciliation tells you that something is wrong; it cannot tell you which system is wrong. That still takes a human reading logs.
What the service adds
Scope only, stated so you can compare it with the build above.
- A written contract and failure matrix for each integration, reviewed against the platform’s actual behaviour
- The reconciliation queries wired to your real order and settlement data, with the unmatched set triaged
- Verification after each fix, with the before and after captured
Sources and further reading
Related guides
What this page does not include. This guide documents an open-source implementation of the same outcome. It deliberately leaves out 5 Kings’ internal playbooks, client data, vendor terms and unpublished method: we publish what any competent team can reproduce, and we do not publish what belongs to a client or to a contract. Where a step depends on a decision only your business can make, the guide says so instead of guessing.
Take it with you
Audit a functional integration on open source
The full guide as an A4 PDF: the reference stack with licences, the build steps, the acceptance checks and the honest limits — in one file you can hand to an engineer or print for a planning session.