Limits Rail
Limits Rail
Section titled “Limits Rail”Financial limits, transaction controls, and velocity checks.
Overview
Section titled “Overview”The Limits Rail provides endpoints for managing transaction limits, velocity controls, and threshold-based restrictions.
Base URL
Section titled “Base URL”/api/v1/limitsEndpoints
Section titled “Endpoints”Create Limit
Section titled “Create Limit”POST /api/v1/limitsCreate a new limit configuration.
Request Body:
{ "name": "Daily Transfer Limit", "type": "TRANSACTION", "scope": "CUSTOMER", "scopeId": "cust_123", "maxAmount": "50000.00", "currency": "SAR", "period": "DAILY", "action": "BLOCK"}Check Limit
Section titled “Check Limit”POST /api/v1/limits/checkCheck if a transaction is within limits.
Request Body:
{ "customerId": "cust_123", "transactionType": "TRANSFER", "amount": "10000.00", "currency": "SAR"}Response:
{ "data": { "allowed": true, "limits": [ { "limitId": "lim_abc", "name": "Daily Transfer Limit", "currentUsage": "15000.00", "maxAmount": "50000.00", "available": "35000.00", "utilizationPercent": 0.3 } ] }}Get Limit Usage
Section titled “Get Limit Usage”GET /api/v1/limits/:limitId/usageGet current limit usage.
List Limits
Section titled “List Limits”GET /api/v1/limitsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
scope | string | GLOBAL, TENANT, CUSTOMER |
type | string | TRANSACTION, VELOCITY, CUMULATIVE |
status | string | ACTIVE, INACTIVE |
Update Limit
Section titled “Update Limit”PATCH /api/v1/limits/:limitIdUpdate limit configuration.
Velocity Check
Section titled “Velocity Check”POST /api/v1/limits/velocity/checkCheck velocity limits.
Request Body:
{ "customerId": "cust_123", "transactionType": "PAYMENT", "count": 1, "period": "HOURLY"}Response:
{ "data": { "allowed": true, "currentCount": 5, "maxCount": 10, "periodRemaining": "45m" }}Limit Types
Section titled “Limit Types”| Type | Description |
|---|---|
| TRANSACTION | Per-transaction limit |
| DAILY | Daily cumulative limit |
| WEEKLY | Weekly cumulative limit |
| MONTHLY | Monthly cumulative limit |
| VELOCITY | Transaction count limit |
| CUMULATIVE | Lifetime cumulative |
Limit Scopes
Section titled “Limit Scopes”| Scope | Description |
|---|---|
| GLOBAL | Platform-wide limit |
| TENANT | Tenant-level limit |
| WORKSPACE | Workspace-level limit |
| CUSTOMER | Customer-specific limit |
| ACCOUNT | Account-specific limit |
Actions
Section titled “Actions”| Action | Description |
|---|---|
| BLOCK | Block transaction |
| WARN | Allow with warning |
| REVIEW | Queue for manual review |
| NOTIFY | Allow and notify |
Events
Section titled “Events”| Event | Description |
|---|---|
limit.exceeded | Limit exceeded |
limit.warning | Approaching limit |
limit.reset | Limit period reset |
limit.updated | Limit configuration changed |
See Also
Section titled “See Also”- Risk Rail - Risk management
- Compliance Rail - Compliance checks