Skip to content

Rule Engine

Apply transaction policy decisions in your backend or manage policy configuration.

The Rule Engine evaluates published incoming or outgoing policies and returns a decision with the transaction. Your backend applies that decision to its withdrawal, deposit, or review process.

Choose your task

TaskStart here
Use an existing policy in a transaction flow.Follow the decision-handling steps below.
Configure policies without building an editor.Use the Client Dashboard to edit, simulate, and publish rules.
Build programmatic policy management.Follow Manage Rule Engine policies for drafts, simulation, publication, and version history.

Read the outcome in a transaction

Read ruleEngine from the transaction create response, a later detail read, or a transaction notification. If evaluation is unavailable, the field can be null. If there are no published rules, the decision is null; follow your own fallback policy rather than treating absence as approval.

This example transaction matches a published outgoing rule for amounts of at least USD 10,000. The returned WAIT decision includes the matched rule, policy version, a 120-second waiting period, and the REVIEW timeout action. Converted amounts are illustrative; the API calculates them from available pricing.

curl --location 'https://api-dev.cryptoswift.eu/transactions/233e3fd4-2ef0-477c-a398-8f993d131a19' \
  --header "X-Api-Key: $API_KEY"
decisionYour application's action
PROCEEDContinue when all other checks required by your policy are satisfied.
WAITPersist the waiting state and enforce the policy deadline in your backend.
REVIEWRoute the case to your reviewer workflow.
BLOCKStop the transfer or hold the deposit according to your policy. For an outgoing payment abandoned before broadcast, explicitly cancel the Travel Rule message.

A Rule Engine decision is separate from the message status. PROCEED does not itself broadcast a payment, and CONFIRMED does not itself credit a customer's ledger. Your backend performs those actions.

The Travel Rule data model defines the decision fields, matched rule, scope, and policy version. Keep relevant IDs and the version with your decision record for audit.

Handle WAIT and timeouts

  1. When your application enters WAIT, store its start time, waitForSeconds, and onTimeoutDecision durably.
  2. Continue receiving webhooks or polling the latest transaction. Re-evaluate relevant updates before acting.
  3. At the deadline, reconcile the current transaction and apply the stored timeout action if the case is still waiting.
  4. Make transitions idempotent; duplicate notifications must not restart the timer or broadcast another payment.

CryptoSwift returns the waiting duration and timeout policy. It does not run your application's timer, execute a transfer, or automatically PATCH a transaction when your deadline passes. Apply one deliberate decision path when a notification and timeout arrive together.

Publish and test before using a policy

Draft edits do not change the active policy. Simulate the draft and publish it before expecting it to affect transaction responses. See policy management.

For operational ownership, review procedures, and example policies, see the Rule Engine compliance workflow.

Next steps