Developers
Rule Engine
Allows businesses to define, manage, and execute automated compliance rules based on logical conditions. Each rule follows a clear structure:
If (Condition), then (Action)
These rules automatically evaluate incoming data, such as transactions, against defined compliance criteria. When a condition is met, the system takes the configured action, such as sending a RULE_BREACHED webhook, so compliance teams can respond quickly and accurately.
Typical use cases include:
Automating compliance checks
Enforcing country-specific regulations
Detecting and escalating suspicious activity
Endpoint reference. Rule evaluation (POST /api/v2/engine/evaluate), its request and response schemas, and examples are documented under Rule Engine API in the API Reference — in Live and Demo editions. Evaluation needs an API Key with the rule_engine:write Scope.
Travel Rule Threshold by Country
Rule code: TransferThresholdByCountry
Purpose: Apply country-specific transaction thresholds in line with jurisdictional Travel Rule requirements. Each country has a Jurisdiction threshold: an amount and the currency it is stated in. For each transaction, the amount is converted into the currency of that country’s threshold and compared against it. The threshold currency need not be the country’s own currency (it may be USD, for example).
Condition / Action: If the converted amount is equal to or exceeds the threshold, the rule returns breach and runs the configured action, such as a RULE_BREACHED webhook. Below the threshold it returns pass: no action is taken. The result carries a human-readable message naming the threshold applied, for example “Transfer exceeds threshold(3500 AED) for AE”. A threshold of 0 means the Travel Rule applies to every transfer for that country; a transfer then returns breach with the message “Travel rule applies to every transfer for AE”.
If a breach’s action could not be delivered, the result is still breach, and it also carries action_status and action_message describing the failure.
Errors: The rule returns a third status, error, when it could not judge the transaction. For example, no threshold is configured for the transaction’s country (“No threshold is configured for country DE”), a requested rule code is not configured for your business, or the rule failed to run. The response is still HTTP 200, so always check each result’s status. Treat error as not checked (fail closed), for example by sending the transfer for review. Never treat it as a pass.
Request: Send the transaction in a transaction object with transaction_id, amount, currency (ISO 4217) and country_code (ISO 3166-1 alpha-2), all required. Also send rule_codes, a list of the rule codes to evaluate. An empty list evaluates all of your active rules.
JSON · Sample data
{ "transaction": { "transaction_id": "txn-2026-08-31-000417", "amount": 18500.0, "currency": "AED", "country_code": "AE" }, "rule_codes": []}
Ospree supplies a Jurisdictional default threshold for each country. Managers can set their own Override for a country in the Dashboard; clearing it restores the default. For more information, contact support@ospree.io.