The mock provider exposes magic trigger values that pick a deterministic outcome at intake. Use them to drive demos and tests through any path — happy, rejection, stuck, or slow — without timing flakiness.Documentation Index
Fetch the complete documentation index at: https://docs.clevis.dev/llms.txt
Use this file to discover all available pages before exploring further.
Order of evaluation
Triggers are checked in order — first match wins:X-Mock-Outcome header
If present and recognised, the header overrides everything else (including
body triggers).
external_id prefixes
| Prefix | Outcome | status_code | status_detail ends with |
|---|---|---|---|
MOCK_OK_ | Happy path (explicit; same as default) | "200" | Payout received and queued. |
MOCK_REJECT_INTAKE_ | Reject at intake — no PROCESSING step | "300" | Rejected at intake (mock trigger). |
MOCK_REJECT_BANK_ | PENDING → PROCESSING → REJECTED | "301" | Beneficiary bank rejected the transfer (mock trigger). |
MOCK_SLOW_ | Happy path forced to 30s per step | "200" | Payout received and queued. |
MOCK_STUCK_ | Advances to PROCESSING and never settles | "200" | Stuck in processing (mock trigger). |
MOCK_SLOW_ ignores any processing.step_seconds override and uses 30 seconds
per step — useful for demoing a “watch it process” UI.Examples
Amount suffixes
The mock looks at the 2-decimal string form ofamount (so 1000.13 →
.13, but 1000.1300001 also rounds to .13 and triggers).
| Suffix | Outcome | status_code | status_detail ends with |
|---|---|---|---|
.13 | PENDING → PROCESSING → REJECTED | "302" | Insufficient funds in payout account (mock trigger). |
.99 | Reject at intake (no PROCESSING) | "303" | Amount exceeds per-payout limit (mock trigger). |
Document ID trigger
| Field | Value | Outcome | status_code | status_detail ends with |
|---|---|---|---|---|
beneficiary.document_id | "00000000000" | Reject at intake | "304" | Beneficiary failed compliance screening (mock trigger). |
Header overrides
TheX-Mock-Outcome header takes precedence over everything. Combine with
X-Mock-Outcome-At: intake for REJECTED to skip the PROCESSING step.
| Header values | Outcome |
|---|---|
X-Mock-Outcome: PAID | PENDING → PROCESSING → PAID |
X-Mock-Outcome: REJECTED | PENDING → PROCESSING → REJECTED (bank reject) |
X-Mock-Outcome: REJECTED + X-Mock-Outcome-At: intake | Reject at intake (no PROCESSING) |
X-Mock-Outcome: CANCELLED | PENDING → PROCESSING → CANCELLED |
Example
Reading the trigger off the response
Every mock-triggered terminal outcome carries astatus_detail ending in
"(mock trigger)." — so your tests can assert on the trigger without
hardcoding the message.
Tip: synchronous + magic trigger = great for unit tests
Combineprocessing.step_seconds: 0 with any trigger. The terminal state is
already applied in the create response — no polling, no timer, no flakiness.
status: "REJECTED" and status_code: "301"
on the same line that creates the payout.