Why use spending limits
- Customer protection: Detect overspending and return DENY decisions for unauthorized large transactions
- Risk management: Monitor exposure per account, segment, or portfolio
- Flexible scoping: Apply limits at different granularity levels
- Real-time tracking: Monitor usage and remaining amounts instantly
- Automatic resets: Daily and monthly limits reset automatically
- Understand limit types and scoping options
- Create and configure spending limits
- Monitor limit usage in real-time
- Manage the limit lifecycle
Core concepts
Understand the building blocks of spending limits.
Limit types
Tracer supports three types of spending limits:| Type | Description | Reset behavior |
|---|---|---|
DAILY | Maximum amount per day | Resets at midnight UTC |
MONTHLY | Maximum amount per month | Resets on 1st of month, midnight UTC |
PER_TRANSACTION | Maximum amount per single transaction | No tracking; each transaction evaluated independently |
Scopes
Scopes define which transactions a limit applies to. A limit matches transactions that fit within its scope definition. Scope fields (all optional, at least one required):segmentId- Apply to transactions from a specific segmentportfolioId- Apply to transactions from a specific portfolioaccountId- Apply to transactions from a specific accountmerchantId- Apply to transactions to a specific merchanttransactionType- Apply to specific transaction types (CARD, WIRE, PIX, CRYPTO)
Usage tracking
ForDAILY and MONTHLY limits, Tracer tracks:
- Current usage - Total amount consumed in the current period (in smallest currency unit)
- Utilization percent - Percentage of limit used
- Reset time - When the limit will reset to zero
How limits work
Tracer evaluates limits during every validation request.
Limit check flow
When a transaction is validated, Tracer checks all applicable limits:
- Find limits - Query all active limits matching the transaction scope
- Calculate projected usage - Add transaction amount to current usage
- Compare threshold - Check if projected usage exceeds limit amount
- Return result - If any limit is exceeded, Tracer returns a DENY decision (your system should then block the transaction)
Example scenario
A corporate segment has a daily limit of R$ 50,000 (5,000,000 centavos) for CARD transactions. If current usage is R 8,000 arrives:- Projected usage: R 8,000 = R$ 53,000
- Limit: R$ 50,000
- Result: Tracer returns DENY decision (your system should block the transaction)
Create a limit
Create limits using
POST /v1/limits. Limits are created in DRAFT status by default.
A limit requires:
- name: A descriptive name (e.g., “Daily Corporate Card Limit”)
- limitType: DAILY, MONTHLY, or PER_TRANSACTION
- maxAmount: Maximum amount in smallest currency unit
- currency: ISO 4217 currency code (e.g., BRL, USD)
- scopes: At least one scope to define which transactions it applies to
Query limit usage
Monitor limit consumption using
GET /v1/limits/{limitId}/usage.
The response includes:
- currentUsage: Amount consumed in current period
- utilizationPercent: Percentage of limit used
- nearLimit: True when usage exceeds 80% (for proactive management)
- resetAt: When the limit resets (DAILY/MONTHLY only)
The
nearLimit flag activates at 80% utilization, allowing proactive management before limits are exceeded.Update a limit
Update limits using
PATCH /v1/limits/{limitId}. The limitType and currency fields are immutable and cannot be changed after creation.
Limit lifecycle
Limits follow the same lifecycle as rules:

States
| State | Description |
|---|---|
DRAFT | Limit created but not active; can be modified freely |
ACTIVE | Limit is checked during validations |
INACTIVE | Limit is not checked; preserved for audit trail; can be reactivated |
DELETED | Permanently removed; does not appear in listings |
Transitions
| Operation | From | To | Description |
|---|---|---|---|
| Create | - | DRAFT | Limits are created in DRAFT status by default |
| Activate | DRAFT, INACTIVE | ACTIVE | Start checking this limit |
| Deactivate | ACTIVE | INACTIVE | Stop checking this limit |
| Delete | DRAFT, INACTIVE | DELETED | Permanently remove (cannot delete ACTIVE limits) |
Best practices
Recommendations for effective limit management.
Naming
- Be descriptive - Include the scope and type in the name
- Use consistent patterns - e.g., “Daily Limit”
| Less clear | More clear |
|---|---|
Limit 1 | Daily Corporate Card Limit |
VIP limit | Monthly VIP PIX Limit |
Scope design
- Start broad, refine as needed - Begin with segment-level limits, add account-level for exceptions
- Avoid overlapping scopes - Multiple limits on the same scope can cause confusion
- Use transaction types - Different payment methods may need different limits
Monitoring
- Watch nearLimit flags - Proactively contact customers nearing limits
- Review denied transactions - High denial rates may indicate limits are too restrictive
- Adjust seasonally - Consider temporary limit increases during high-spending periods
Reliability and enforcement
Spending limits in Tracer are designed for production environments where accuracy and trust are non-negotiable.
Atomic evaluation
Limit checks are performed atomically. When a transaction is validated, Tracer reads the current usage and evaluates the limit in a single, indivisible operation. This means that even when multiple transactions arrive simultaneously for the same account or scope, each evaluation reflects the true state of usage at that moment. There is no window in which concurrent transactions can bypass a limit. If two transactions arrive at the same time and only one fits within the remaining budget, exactly one is approved.Server-side timestamps
All usage tracking relies on server-side timestamps generated by Tracer. Clients cannot influence when a transaction is recorded or when a period resets. This eliminates any possibility of timestamp manipulation affecting limit calculations.What this means in practice
- Concurrent safety: High-throughput environments with many simultaneous transactions per account are fully supported. Limits behave correctly under load.
- Accurate tracking: Usage totals always reflect the actual state, even during peak traffic.
- Trustworthy resets: Daily and monthly resets happen based on Tracer’s internal clock, not client-reported times.
These guarantees apply to all limit types (DAILY, MONTHLY, PER_TRANSACTION) and all scope combinations.
Quick reference
Key endpoints and configuration options.
Endpoints
| Operation | Method | Endpoint |
|---|---|---|
| Create limit | POST | /v1/limits |
| List limits | GET | /v1/limits |
| Get limit | GET | /v1/limits/{limitId} |
| Update limit | PATCH | /v1/limits/{limitId} |
| Activate limit | POST | /v1/limits/{limitId}/activate |
| Deactivate limit | POST | /v1/limits/{limitId}/deactivate |
| Delete limit | DELETE | /v1/limits/{limitId} |
| Get usage | GET | /v1/limits/{limitId}/usage |
Limit types
| Type | Reset | Use case |
|---|---|---|
DAILY | Midnight UTC | Daily spending caps |
MONTHLY | 1st of month | Monthly budgets |
PER_TRANSACTION | None | Single transaction limits |
Scope fields
| Field | Type | Description |
|---|---|---|
segmentId | UUID | Filter by segment |
portfolioId | UUID | Filter by portfolio |
accountId | UUID | Filter by account |
merchantId | UUID | Filter by merchant |
transactionType | enum | CARD, WIRE, PIX, CRYPTO |

