Skip to content

Limits Rail

Financial limits, transaction controls, and velocity checks.

The Limits Rail provides endpoints for managing transaction limits, velocity controls, and threshold-based restrictions.

/api/v1/limits
POST /api/v1/limits

Create 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"
}
POST /api/v1/limits/check

Check 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 /api/v1/limits/:limitId/usage

Get current limit usage.

GET /api/v1/limits

Query Parameters:

ParameterTypeDescription
scopestringGLOBAL, TENANT, CUSTOMER
typestringTRANSACTION, VELOCITY, CUMULATIVE
statusstringACTIVE, INACTIVE
PATCH /api/v1/limits/:limitId

Update limit configuration.

POST /api/v1/limits/velocity/check

Check velocity limits.

Request Body:

{
"customerId": "cust_123",
"transactionType": "PAYMENT",
"count": 1,
"period": "HOURLY"
}

Response:

{
"data": {
"allowed": true,
"currentCount": 5,
"maxCount": 10,
"periodRemaining": "45m"
}
}
TypeDescription
TRANSACTIONPer-transaction limit
DAILYDaily cumulative limit
WEEKLYWeekly cumulative limit
MONTHLYMonthly cumulative limit
VELOCITYTransaction count limit
CUMULATIVELifetime cumulative
ScopeDescription
GLOBALPlatform-wide limit
TENANTTenant-level limit
WORKSPACEWorkspace-level limit
CUSTOMERCustomer-specific limit
ACCOUNTAccount-specific limit
ActionDescription
BLOCKBlock transaction
WARNAllow with warning
REVIEWQueue for manual review
NOTIFYAllow and notify
EventDescription
limit.exceededLimit exceeded
limit.warningApproaching limit
limit.resetLimit period reset
limit.updatedLimit configuration changed