The scenario
A payment is about to settle. Before it does, your service calls MeshQu at the decision boundary — the moment settlement becomes irreversible — with the transaction context. The policy enforces:- Amount limits — over a hard ceiling is
DENY; over a dual-approval threshold isREVIEW. - Sanctions & jurisdiction — source and destination countries must be present and not high-risk.
- Documentation — beneficiary details and a transaction reference of sufficient length must be present.
- Volume controls — daily volume and transaction-count ceilings flag unusual activity.
Mental model: MeshQu does not move money or hold funds. It governs the approval decision and hands you a signed verdict. Your payment system is what releases, queues, or blocks the transfer.
Decision boundary
Your payment service ownsSETTLE, DUAL, and BLOCK. MeshQu owns the MeshQu evaluates box and the replay proof.
Gate and record the transaction
Userecord for settlement decisions — it evaluates and persists a signed receipt with an idempotency key, which is exactly what a compliance-critical path needs. (Use the stateless evaluate only for dry-run testing or non-settling previews.)
action: { type: "payment_execute", reference_id: "INV-88423" } ties the receipt to the specific payment it authorized — the action type and reference_id are bound into the integrity hash, so the receipt proves this approval was for this transfer. See Integrity & Hashing.
Pass
action at the top level of the record request body, as the cURL tab shows. The early-access TypeScript client does not yet forward action, so use the REST API directly when you need action binding — another reason the REST API is the primary integration surface.Dual approval on REVIEW
A transaction over the dual-approval threshold returns REVIEW. Hold it, collect a second approver, then record what happened as a decision outcome — naming the human who approved it:
REVIEW) and the human resolution (accepted, who, why) are now both on the record. One outcome per decision; it is immutable once written.
Prove it later
Months on, an auditor can pull any approval and replay it against the exact policy snapshot that governed it — no access to your application or database required:replay re-evaluates the original context against the pinned snapshot and returns matches: true when the integrity hashes agree — proving the verdict was not altered. List approvals with GET /v1/decisions?decision_type=transaction_approval&decision=DENY for a clean denials report.
Operational notes
- Idempotency is mandatory on settlement — a retried
recordwith the sameidempotency_keyreturns the original receipt (is_new: false), never a duplicate approval. Key it on the transaction reference. See Idempotency. - Tighten a limit safely — lowering a threshold or adding a jurisdiction can wrongly block real payments on day one. Introduce it in
shadow_modeso itsDENYis surfaced asALERTwhile you watch real traffic, then promote. See Shadow Mode. - Page on blocked transactions — subscribe a webhook filtered to
transaction_approvalatseverity_min: criticalso compliance is notified the moment a sanctioned-jurisdiction or over-limit transfer is denied. - Fail-closed — for settlement, default to blocking when MeshQu is unreachable. See fail-open vs fail-closed.
Concept references
- Integration Patterns — the pre-execution gate, record-for-audit, and failure strategy.
- Core Concepts — Evaluate vs Record — why settlement uses
record. - Integrity & Hashing — the integrity hash, action binding, and Ed25519 signature on the receipt.
- Decision Assurance — what an auditor can prove offline.
- Policy Lifecycle — how the approval policy is versioned and ratified.
- Shadow Mode · Webhooks.