Apply Authorization Controls
The POST /api/authorizationControls endpoint allows partners to apply authorization control rules to one or more payment cards. Rules can restrict per-transaction amounts, monthly spending limits, daily ATM withdrawal limits, allowed or blocked merchant categories, and allowed or blocked merchant countries. Each rule is applied independently and the response reports per-card success or failure.
Endpoint
POST /api/authorizationControls
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 spending controls on a cardholder's payment cards — for example, blocking gambling merchants for a corporate card program, capping daily ATM withdrawals for a prepaid card, or restricting international transactions to specific countries. You can apply multiple rule types in a single call and target multiple cards simultaneously, making it suitable for bulk policy updates across an account or subprofile.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
paymentCardIds | array of string | No | List of payment card IDs to apply the rules to. |
rules | array of rule objects | No | One or more authorization control rule objects. Each rule must include a type field identifying the rule type. See rule object definitions below. |
Base rule fields (all rule types)
| Field | Type | Required | Description |
|---|---|---|---|
type | string (enum) | Yes | Rule type. One of: TransactionAmount, MonthlyAmount, DailyAtmWithdrawal, MerchantCategory, MerchantCountry. |
id | string | No | Optional identifier for the rule. |
TransactionAmount rule — maximum single-transaction spending limit
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "TransactionAmount". |
amount | integer (int64) | Yes | Maximum allowed transaction amount in cents (e.g., 5000 = $50.00). |
MonthlyAmount rule — maximum monthly spend limit
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "MonthlyAmount". |
amount | integer (int64) | Yes | Maximum allowed monthly spend in cents. |
DailyAtmWithdrawal rule — maximum daily ATM withdrawal limit
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "DailyAtmWithdrawal". |
amount | integer (int64) | Yes | Maximum allowed daily ATM withdrawal in cents. |
merchantCategoryRule | object | No | Optional nested merchant category rule applied alongside the ATM limit. |
MerchantCategory rule — allow or block specific merchant category codes
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "MerchantCategory". |
allowed | array of string | No | List of merchant category codes that are permitted. |
blocked | array of string | No | List of merchant category codes that are blocked. |
MerchantCountry rule — allow or block transactions by merchant country
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "MerchantCountry". |
allowed | array of string | No | List of ISO 3166 alpha-3 country codes that are permitted (e.g., "USA", "CAN"). |
blocked | array of string | No | List of ISO 3166 alpha-3 country codes that are blocked. |
{
"paymentCardIds": [
"card_abc123",
"card_def456"
],
"rules": [
{
"type": "TransactionAmount",
"amount": 50000
},
{
"type": "MonthlyAmount",
"amount": 500000
},
{
"type": "DailyAtmWithdrawal",
"amount": 30000
},
{
"type": "MerchantCategory",
"blocked": [
"BETTING_CASINO_GAMBLING",
"GOVERNMENT_LICENSED_ON_LINE_CASINO",
"PACKAGE_STORES_BEER_WINE_AND_LIQUOR"
]
},
{
"type": "MerchantCountry",
"allowed": [
"USA",
"CAN",
"GBR"
]
}
]
}Response
200 OK
Returns an array of result objects, one per payment card ID submitted.
| Field | Type | Description |
|---|---|---|
paymentCardId | string | The payment card ID the result corresponds to. |
success | boolean | true if all rules were successfully applied to this card; false if any rule failed. |
errors | string | Error detail message if success is false; null otherwise. |
[
{
"paymentCardId": "card_abc123",
"success": true,
"errors": null
},
{
"paymentCardId": "card_def456",
"success": false,
"errors": "Card not found or not eligible for authorization controls."
}
]Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields, invalid rule type value, or malformed rule object |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to apply controls to the specified cards |
| 404 | One or more paymentCardIds not found |
| 500 | Internal server error |
Common Mistakes
- Omitting the
typefield from a rule object — every rule must include"type"to identify which rule schema applies. - Providing
amountvalues in dollars instead of cents — all monetary amounts are in the smallest currency unit (cents).$50.00must be submitted as50000. - Setting both
allowedandblockedon the sameMerchantCategoryorMerchantCountryrule — use one or the other, not both, to avoid ambiguous behavior. - Using ISO 3166 alpha-2 country codes (e.g.,
"US") instead of the required alpha-3 codes (e.g.,"USA") inMerchantCountryrules. - Submitting a stale Bearer token — tokens expire after 10 minutes. Refresh before making calls in long-running processes.
Related Endpoints
POST /api/auth/v2— Obtain a Bearer tokenPOST /api/auth/refresh— Refresh an existing Bearer tokenGET /api/paymentCards— Retrieve payment card IDs for a customerPOST /api/cards— Create a new payment card (physical, virtual, or burner)
Example
curl -X POST https://api.banking.netevia.dev/api/authorizationControls \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paymentCardIds": [
"card_abc123"
],
"rules": [
{
"type": "TransactionAmount",
"amount": 50000
},
{
"type": "MerchantCategory",
"blocked": [
"BETTING_CASINO_GAMBLING",
"GOVERNMENT_LICENSED_ON_LINE_CASINO"
]
},
{
"type": "MerchantCountry",
"allowed": [
"USA",
"CAN"
]
}
]
}'