Monitor

Guides

Decisions

Ask before a payment moves — approve, review or block, with rules, verification step-up and failure modes.

LENS scores after the fact. A decision answers before: can this payment go? Your platform applies the verdict; the money stays with you.

const decision = await dc.lens.decide({
  external_id: 'payout_5521',
  rail: 'wire',
  operation: 'withdrawal',
  direction: 'outbound',
  amount: 12400,
  currency: 'USD',
  subject: { reference: 'cus_10442' },
  counterparty: { reference: 'ext_acct_51' },
});

Verdicts

From the mildest to the strictest: allow < verification_required < hold < approval_required < deny.

{
  "id": "dec_…",
  "verdict": "verification_required",
  "effective_verdict": "verification_required",
  "reason_codes": ["KYC_L3_REQUIRED"],
  "lens_score": 25,
  "verification": { "session_id": "vs_…", "url": "https://…/s/…", "status": "created", "client_token": "vst_…" }
}
  • verification_required: a verification session is opened with the rule's flow. Approved, the decision becomes allow; rejected, expired or cancelled, deny.
  • approval_required: a person of your team approves or denies in the dashboard.
  • Each resolution sends lens.decision.updated with effective_verdict.

external_id is idempotent: the same decision is answered again (duplicate: true).

What is checked, in order

  1. The customer: frozen → deny; open sanctions alert → hold; revoked attestation → hold.
  2. The counterparty on your lists: blacklisted → deny; flagged → hold.
  3. The rules of the project, by priority.
  4. The shared lists: a critical match → deny, otherwise hold.
  5. The customer's score above the hold threshold (85 by default) → hold.

Rules

{
  "name": "Over $10,000 in 30 days: KYC L3",
  "priority": 100,
  "rails": ["ach", "wire"],
  "directions": ["outbound"],
  "condition": { "metric": "volume_30d", "op": "gt", "value": 10000, "currency": "USD" },
  "action": "verification_required",
  "reason_code": "KYC_L3_REQUIRED",
  "verify_kind": "kyc",
  "verify_level": "l3",
  "verify_flow_id": "flow_…"
}

metric: amount, volume_24h, volume_30d, count_24h, count_30d, lens_score. action: hold, deny, approval_required, verification_required. A verification rule does not apply to a customer already verified at the level it asks. Routes: GET, POST /lens/rules, PATCH, DELETE /lens/rules/:id.

When the API cannot be reached

GET and PATCH /lens/settings: fail_mode (allow or deny), fail_allow_below_usd (allow below this amount, deny above) and score_hold_threshold. The SDK caches them and applies them on a timeout:

await dc.lens.decide(input, { timeoutMs: 800 });

The target is a p95 under 300 ms; each decision records its latency.

On this page