Get Spend Rules by Card
The GET /api/spendRules/byCard endpoint retrieves the spending rules applied to a specific payment card. It returns detailed information on spending limits, merchant category restrictions, country restrictions, and velocity rules associated with the card. This endpoint helps partners and customers review the financial controls in place for individual cards to ensure compliance and efficient card management.
Endpoint
GET /api/spendRules/byCard
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 display or audit the current spending rules applied to a customer's payment card. It is useful when building card management dashboards, verifying that the correct restrictions are in place before processing, or when a cardholder wants to review their transaction limits and merchant restrictions.
Note: This endpoint is marked as deprecated. Consider using updated spend rules endpoints if available for new integrations.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| paymentCardId | string | No | The unique identifier of the payment card for which to retrieve spend rules. |
Response
200 OK
The response returns a payment card edge object containing the card details along with all attached spend rules and velocity rules.
Top-level response object (bank.client.graph.edge_paymentcard):
| Field | Type | Description |
|---|---|---|
| cursor | string | Pagination cursor for this edge. |
| node | object | The payment card object (bank.client.paymentcard.paymentcard). |
Payment card node (node):
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the payment card. |
| bin | string | Bank Identification Number (first 6 digits) of the card. |
| last4 | string | Last 4 digits of the card number. |
| status | string | Current status of the card (e.g., OPEN, SUSPENDED, CLOSED). |
| formFactor | string | Card form factor: PHYSICAL, VIRTUAL, or BURNER. |
| expirationDate | string | Full expiration date of the card. |
| expirationMonth | string | Expiration month of the card. |
| expirationYear | string | Expiration year of the card. |
| network | string | Card network (e.g., VISA, MASTERCARD). |
| financialAccounts | array | Financial accounts linked to this card. |
| physicalPaymentCardOrders | array | Physical card order history (for physical cards only). |
| attachedSpendRules | object | Paginated collection of spend rules attached to this card. |
| attachedVelocityRules | object | Paginated collection of velocity rules attached to this card. |
| cardProfileSet | object | Card profile set information. |
| cardProduct | object | Card product details. |
Spend rule node (attachedSpendRules.edges[].node) — base spend rule:
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the spend rule. |
| name | string | Human-readable name of the spend rule. |
| version | string | Version identifier of the spend rule. |
| createdAt | string (date-time) | Timestamp when the rule was created. |
| updatedAt | string | Timestamp when the rule was last updated. |
| spendRuleType | integer | Type of spend rule: 0 = base, 1 = amount limit, 2 = merchant category. |
| maximumAmount | object | Maximum allowed transaction amount (value in cents + currencyCode). |
| merchantCategoryAllowed | array | List of allowed merchant category codes (ISO merchant category strings). |
| merchantCategoryBlocked | array | List of blocked merchant category codes. |
| merchantCountryAllowed | array | List of allowed country codes (ISO 3166 alpha-3). |
| merchantCountryBlocked | array | List of blocked country codes (ISO 3166 alpha-3). |
Amount limit spend rule (subtype of spend rule):
| Field | Type | Description |
|---|---|---|
| maximumAmount | object | Maximum transaction amount: { value: integer, currencyCode: string }. |
Merchant category spend rule (subtype of spend rule):
| Field | Type | Description |
|---|---|---|
| allowed | array | Merchant categories explicitly allowed for this rule. |
| blocked | array | Merchant categories explicitly blocked for this rule. |
Merchant country spend rule (subtype of spend rule):
| Field | Type | Description |
|---|---|---|
| allowed | array | Country codes (ISO 3166 alpha-3) explicitly allowed. |
| blocked | array | Country codes (ISO 3166 alpha-3) explicitly blocked. |
Velocity rule node (attachedVelocityRules.edges[].node):
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier of the velocity rule. |
| name | string | Human-readable name of the velocity rule. |
| velocityRuleWindow | integer | Time window for the velocity rule: 0 = transaction, 1 = daily, 2 = monthly. |
| cumulativeRule | object | The cumulative spend rule applied within the velocity window. |
| spendRules | array | Individual spend rules grouped within this velocity rule. |
Pagination (pageInfo) for spend rules and velocity rules:
| Field | Type | Description |
|---|---|---|
| startCursor | string | Cursor pointing to the first item in the page. |
| endCursor | string | Cursor pointing to the last item in the page. |
| hasNextPage | boolean | Indicates whether more pages follow. |
| hasPreviousPage | boolean | Indicates whether previous pages exist. |
{
"cursor": "eyJpZCI6ImNhcmRfMTIzNDU2In0=",
"node": {
"id": "pc_9a8b7c6d5e4f3a2b1c0d",
"bin": "411111",
"last4": "1234",
"status": "OPEN",
"formFactor": "VIRTUAL",
"expirationDate": "2027-06",
"expirationMonth": "06",
"expirationYear": "2027",
"network": "VISA",
"financialAccounts": [
{
"id": "fa_abc123def456",
"last4": "7890",
"name": "Primary Checking"
}
],
"attachedSpendRules": {
"pageInfo": {
"startCursor": "eyJpZCI6InNyXzAwMSJ9",
"endCursor": "eyJpZCI6InNyXzAwMyJ9",
"hasNextPage": false,
"hasPreviousPage": false
},
"edges": [
{
"cursor": "eyJpZCI6InNyXzAwMSJ9",
"node": {
"id": "sr_001aabbcc",
"name": "Daily Transaction Limit",
"version": "1",
"spendRuleType": 1,
"maximumAmount": {
"value": 50000,
"currencyCode": "USD"
},
"createdAt": "2025-01-15T10:00:00Z",
"updatedAt": "2025-03-20T08:30:00Z"
}
},
{
"cursor": "eyJpZCI6InNyXzAwMiJ9",
"node": {
"id": "sr_002ddeeff",
"name": "Blocked Merchant Categories",
"version": "1",
"spendRuleType": 2,
"allowed": [],
"blocked": [
"BETTING_CASINO_GAMBLING",
"PAWN_SHOPS"
],
"createdAt": "2025-01-15T10:00:00Z",
"updatedAt": null
}
}
]
},
"attachedVelocityRules": {
"pageInfo": {
"startCursor": "eyJpZCI6InZyXzAwMSJ9",
"endCursor": "eyJpZCI6InZyXzAwMSJ9",
"hasNextPage": false,
"hasPreviousPage": false
},
"edges": [
{
"cursor": "eyJpZCI6InZyXzAwMSJ9",
"node": {
"id": "vr_001aabbcc",
"name": "Monthly Spend Limit",
"velocityRuleWindow": 2,
"cumulativeRule": {
"id": "sr_003ccddeef",
"name": "Monthly Max",
"spendRuleType": 1,
"maximumAmount": {
"value": 200000,
"currencyCode": "USD"
}
},
"spendRules": []
}
}
]
}
}
}Error Codes
| Code | When it happens |
|---|---|
| 400 | The paymentCardId query parameter is malformed or references an invalid card format. |
| 401 | Token missing, expired, or invalid. |
| 403 | Insufficient permissions — the caller does not have access to the specified card's spend rules. |
| 404 | No card found matching the provided paymentCardId. |
| 500 | Internal server error. |
Common Mistakes
- Omitting the
paymentCardIdquery parameter — the API may return an empty or unfiltered result rather than an explicit error. - Using an expired Bearer token. Tokens expire after 10 minutes; refresh via
POST /api/auth/refreshbefore making the request. - Expecting monetary values in dollars — all
valuefields in amount objects are expressed in cents (e.g.,50000= $500.00 USD). - This endpoint is marked deprecated. Avoid building new features against it; check for updated spend rule endpoints in the Netevia API catalog.
Related Endpoints
GET /api/spendRules— List all spend rules available for a partner or profile.POST /api/spendRules— Create a new spend rule.POST /api/spendRules/attach— Attach a spend rule to a payment card.DELETE /api/spendRules/detach— Remove a spend rule from a payment card.
Example
curl -X GET "https://api.banking.netevia.dev/api/spendRules/byCard?paymentCardId=pc_9a8b7c6d5e4f3a2b1c0d" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"