Round 5 The smallest complete workflow
| Workstream | First output |
|---|---|
| Foundation | Repository, build, configuration, deployment pipeline |
| Data model | Payment, settlement, attempt, match, exception, audit |
| Provider and file integration | Payment API and adapter; settlement upload and validation |
| Processing and reconciliation | Reliable events; deterministic rules |
| Exceptions and UI | Controlled investigation and resolution; dashboard and workbench |
| Security and operations | Authentication, authorization, audit; metrics, logs, alerts, runbooks |
httpPayment ingestion contract (Apex Financial Services)
POST /api/v1/payments
Content-Type: application/json
Idempotency-Key: provider-a:PA-778100
{
"provider": "PROVIDER_A",
"providerTransactionId": "PA-778100",
"providerReference": "REF-92001",
"loanAccount": "LN-10482",
"amount": "425.00",
"currency": "USD",
"status": "CAPTURED"
}
202 Accepted
{ "paymentId": "PAY-10021", "processingStatus": "ACCEPTED", "duplicate": false }
(the same request again)
200 OK
{ "paymentId": "PAY-10021", "processingStatus": "ACCEPTED", "duplicate": true }A repeat returns the original business record and says it is a duplicate. HTTP 200 alone does not prove idempotency; the test must check that one payment exists. Amounts travel as decimal strings with an explicit currency and are never computed in floating point.
jsonException search
{
"items": [
{
"exceptionId": "EX-20041",
"paymentId": "PAY-10021",
"reason": "AMOUNT_MISMATCH",
"status": "OPEN",
"currency": "USD",
"paymentAmount": "425.00",
"settlementAmount": "420.00"
}
],
"page": 0,
"size": 25
}- Ingestion: valid payment, duplicate notification, invalid payload, duplicate settlement file, missing settlement.
- Matching: reference normalization, amount mismatch, ambiguous match, delayed settlement, known positive and known negative examples.
- Controls and failure: unauthorized resolution, concurrent processing, database interruption, message redelivery, audit record creation.
Practical exercise
Assignment 6: a working vertical slice
Submit a working slice, not screenshots.
- Source code, migrations and API contracts.
- Integration, idempotency and reconciliation tests.
- The exception workflow, finance UI and audit evidence.
- Local run instructions.
Show a sample negative test
- doesNotMatchPrefixedAndBareReferenceWithDifferentAmounts: REF-92003 at 420.00 and 92003 at 425.00 normalize to the same reference but must become AMOUNT_MISMATCH, never MATCHED.
What you can do now
- Plan work as vertical slices.
- Write honest idempotent contracts.
- Test with positive and negative examples.
← Lesson 06: Design a System for the Customer’s Real Environment