Integration testing
Run these cases in an authorized non-production environment before enabling live settlement traffic. Obtain tenant-specific fixtures from Vantrace; do not invent magic amounts or identifiers to force outcomes.
Core test cases
Section titled “Core test cases”| ID | Scenario | Expected result |
|---|---|---|
TEST-001 |
Valid non-blocking evaluation | HTTP 200; evaluation_status: "complete"; should_block: false |
TEST-002 |
Valid blocking evaluation using an approved fixture | HTTP 200; evaluation_status: "complete"; should_block: true |
TEST-003 |
Invalid HMAC signature | HTTP 401 |
TEST-004 |
Missing required request field | HTTP 422 with a validation detail |
TEST-005 |
Malformed timestamp | HTTP 400 |
TEST-006 |
Timestamp outside the five-minute window | HTTP 401 |
TEST-007 |
Approved simulated core-rule failure | HTTP 200; evaluation_status: "incomplete"; should_block: true |
TEST-008 |
Client timeout after submission | Local outcome is unknown; no blind retry; identifiers retained for reconciliation |
Authentication assertions
Section titled “Authentication assertions”- A valid API key and HMAC signature return a decision.
- A missing, invalid, or revoked API key returns
401. - A missing or incorrect signature returns
401. - A missing or unsupported
X-Signature-Versionis rejected;v2is accepted. - A missing or malformed
X-Request-IDis rejected. - Changing whitespace or a field after signing causes signature verification to fail.
- Reusing an
X-Request-IDis not treated as idempotency.
Request validation assertions
Section titled “Request validation assertions”- Missing
transaction.amountreturns422. - Missing
source_account_idreturns422. - An amount of zero or less returns
422. - A KYC tier outside
1to3returns422. - Unknown
account_snapshotproperty names return422. - A valid new-account snapshot is accepted.
Account mapping assertions
Section titled “Account mapping assertions”- Outbound transfer evaluates the bank-owned source account.
- Inbound transfer evaluates the bank-owned beneficiary account.
- Internal transfer preserves both accounts and uses the declared primary account.
-
customer_idbelongs to the evaluated account owner. - An external counterparty is never submitted as the bank customer being evaluated.
Decision assertions
Section titled “Decision assertions”- Settlement branches only on
should_block. - An incomplete evaluation returns
should_block: true. - Settlement does not wait for
alert_idsor depend on Mule status. -
highest_severity: "low"with no triggered rules is treated as the baseline, not a finding.
Reliability assertions
Section titled “Reliability assertions”- The caller prevents concurrent submissions for the same transaction reference.
- A timeout is recorded as an unknown outcome.
- A timed-out request is not retried blindly.
- Reconciliation retains the original reference and request ID.
-
500,503, and non-JSON error bodies follow the approved continuity policy. - API keys, HMAC secrets, and raw signatures are absent from logs.
Finish with the production checklist.