Set Monthly Amount Limit
The Set Monthly Amount Limit endpoint allows users to define a maximum total amount that can be spent from a payment card within a given calendar month. This spend rule enhances budgeting and financial management by preventing expenditures from exceeding a predefined threshold. The limit can be updated at any time, providing flexibility as financial needs change.
Endpoint
POST /api/spendRules/amountLimitMonthly
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when you need to enforce monthly expenditure caps on a payment card, such as setting budget limits for business cardholders or personal spending controls. It is particularly useful for partners building expense management features, enabling automated enforcement of monthly budgets without manual intervention. Call this endpoint whenever a cardholder or administrator wishes to establish or revise a card's monthly spending ceiling.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| paymentCardId | string | Yes | Unique identifier of the payment card to which the monthly limit will be applied. Minimum length: 1 character. |
| value | integer (int32) | No | The monthly spending limit amount in cents (e.g., 50000 = $500.00). Set to 0 or omit to remove an existing limit. |
{
"paymentCardId": "card_a1b2c3d4e5f6g7h8",
"value": 50000
}Response
200 OK
A 200 OK response indicates the monthly amount limit spend rule was successfully created or updated for the specified payment card. The response body may be empty on success.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields or validation error (e.g., paymentCardId is absent or empty) |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to apply spend rules to the specified card |
| 404 | Payment card not found for the provided paymentCardId |
| 500 | Internal server error |
Common Mistakes
- Omitting
paymentCardId— this field is required; the request will fail with a 400 error if it is missing or an empty string. - Passing
valueas a decimal (e.g.,500.00) instead of an integer in cents (e.g.,50000) — the field isint32and fractional values will be rejected or truncated. - Using an expired or invalid Bearer token — tokens have a 10-minute lifetime and must be refreshed before expiry.
- Applying a monthly limit to a card that does not belong to the authenticated partner's customer — this will result in a 403 or 404 response.
Related Endpoints
POST /api/spendRules/amountLimitDaily— Set a daily spending limit for a payment cardPOST /api/spendRules/amountLimitTransaction— Set a per-transaction spending limit for a payment cardGET /api/spendRules— Retrieve all active spend rules for a payment cardDELETE /api/spendRules/{spendRuleId}— Remove an existing spend rule from a payment card
Example
curl -X POST https://api.banking.netevia.dev/api/spendRules/amountLimitMonthly \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paymentCardId": "card_a1b2c3d4e5f6g7h8",
"value": 50000
}' 200Success
