Before you begin
You need:
- A running Tracer instance
- Credentials for one of the two supported auth modes
cURL. Replace $API_KEY with your API key or $JWT with your Bearer token, and https://tracer.sandbox.lerian.net with your Tracer URL.
Auth mode depends on deployment. A self-hosted deployment with an API key uses
X-API-Key. On Lerian Cloud, use Authorization: Bearer $JWT, which Access Manager issues with the tenantId claim, and replace every -H "X-API-Key: $API_KEY" in this guide with -H "Authorization: Bearer $JWT". Tracer resolves the tenant from the token automatically, so never pass the tenant identifier in any other field.Step 1: Create a rule
Create a validation rule with a CEL expression. Every new rule starts in
DRAFT status. They do not affect transactions until you activate them.
cURL
ruleId. You will use it to activate the rule.
Monetary values (transaction
amount, spending limit maxAmount, and usage counters) appear as decimal strings, for example "1500.00" or "10000.00".Step 2: Activate the rule
Activate the rule. Tracer then evaluates it against incoming transactions.
cURL
DRAFT to ACTIVE.
Rule lifecycle
INACTIVE rules can transition back to DRAFT for re-editing using POST /v1/rules/{id}/draft.
Step 3: Create a spending limit
Create a spending limit to control transaction amounts by scope and time period. Like rules, limits start in
DRAFT status. The optional resetTime starts each period at a UTC time of day. The example starts each day at 03:00 UTC.
cURL
Limit types
Activate the limit the same way you activated the rule:
cURL
Step 4: Validate a transaction
Send a transaction to Tracer for real-time validation against the rules and limits that apply to it. To decide by rules alone, without checking or counting any limit, send the same request to
POST /v1/validations/rules-only. See Rules-only validation.
cURL
Decision types
Tracer returns decisions as recommendations. Your system must act on the decision (block, approve, or queue the transaction).
Payment schemes
scheme takes 1 to 50 characters from A-Z, 0-9, _ and -, after Tracer trims the value and converts it to upper case. The four values above are examples, not a closed list. transactionType is the deprecated name of scheme. A validation request must carry one of the two. If you send both, they must carry the same value, or Tracer returns 0540. subType is a free-form string (up to 50 characters, normalized to lowercase). The subtypes listed are common examples, not a closed list.
Step 5: Check limit usage
Read how much of a limit the current period has consumed. For the consumption behind a single decision, read
limitUsageDetails on the POST /v1/validations response.
cURL
currentUsage here covers the current period of the limit, for the scope that consumed the most. It includes the capacity that unconfirmed Midaz ledger reservations hold.
Step 6: Review audit events
Tracer records validation decisions and configuration changes in an immutable audit log. Query audit events for compliance reporting and debugging.
cURL
Audit event types
This table shows the most common event types. For the complete list (including update, delete, draft, and reservation lifecycle events), see Audit and compliance.
Step 7: Verify audit integrity
Verify the cryptographic hash chain of audit events.
cURL
Next steps
Getting started with Tracer
Business overview of the validation lifecycle and core concepts.
Rule engine
Detailed guide to CEL expressions and advanced rule configuration.
Spending limits
Configure and manage limits by scope, period, and payment scheme.
Error handling
Complete list of error codes and how to resolve them.

