Machine Learning pathway increased my salary by 40%
Card Controls: MCC Restrictions, Merchant Controls, Geography and Spending Limits
Architecture for programmable card controls including MCC, merchant, geography, and spending limits
Card controls enable programmable restrictions on card usage: MCC (Merchant Category Code) restrictions to allow/block specific merchant types, merchant-level blocks, geography restrictions to allow/block countries, and spending limits (per-transaction, daily, monthly, lifetime). Controls are evaluated in real-time during authorization. Key use cases: corporate expense management, family card safety, fraud prevention, and subscription spending control. Modern card-issuing platforms provide APIs for real-time control management.
Card controls are programmable restrictions that determine how, where, and when a card can be used. They are evaluated in real-time during each authorization, enabling or blocking transactions based on configured rules.
Key control types: MCC restrictions (allow/block merchant categories like gambling, entertainment), merchant blocks (block specific merchants), geography restrictions (allow/block countries), spending limits (per-transaction, daily, monthly, lifetime), and time restrictions (block certain hours or days).
This topic covers card control architecture, control evaluation, and management APIs.
Card controls are programmable rules applied to card authorizations in real-time to allow or block transactions based on criteria including MCC (Merchant Category Code), merchant identity, geography, spending amount, frequency, and time. Card controls enable use cases like corporate expense management, family card safety, fraud prevention, and spending policy enforcement.
Card controls prevent unauthorized spending, enforce spending policies, reduce fraud, and provide granular control over card usage. For corporate cards, controls ensure employees spend within policy. For family cards, controls protect children from inappropriate purchases.
Real-time controls are evaluated during authorization (within milliseconds), enabling instant blocking of non-compliant transactions. This is more effective than post-transaction monitoring.
In 2026, card controls are increasingly AI-driven, with dynamic limits based on user behavior, real-time fraud scoring, and contextual controls (e.g., block transactions when user is traveling unless pre-approved).
The convergence of card controls with expense management and spend analytics creates intelligent spend management platforms.
Card control architecture:
Reference Architecture
When an authorization arrives, the control engine evaluates all applicable controls: MCC, merchant, geography, spending limits, and time. If any control is violated, the transaction is declined. If all pass, the transaction is approved.
| Control Type | Description | Example |
|---|---|---|
| MCC Restrictions | Allow/block merchant categories | Block gambling (MCC 7995), allow restaurants (MCC 5812) |
| Merchant Blocks | Block specific merchants | Block specific merchant IDs |
| Geography Restrictions | Allow/block countries/regions | Block transactions from high-risk countries |
| Spending Limits | Per-transaction, daily, monthly, lifetime | Monthly limit: Rs 50,000 |
| Time Restrictions | Block certain hours/days | Block transactions between 12 AM and 6 AM |
| Velocity Controls | Limit transaction frequency | Max 5 transactions per hour |
Card control technical architecture:
Real-time engine that evaluates all controls for each authorization. Must respond in < 100ms to not delay authorization.
Database of merchant category codes. Each merchant is assigned an MCC by the card network. Controls match against MCC.
Geographic rules based on transaction country, derived from merchant location or IP address. Country allow/block lists.
Real-time tracking of spending against limits. Per-transaction, daily, monthly, and lifetime limits. Reset schedules.
APIs for creating, updating, and deleting controls. Real-time control updates take effect immediately.
Analytics on control effectiveness: decline reasons, control hit rates, false positive rates.
Card control API patterns:
PUT /cards/{id}/controls to set or update all controls for a card.
Configure allowed_mccs or blocked_mccs arrays.
Configure allowed_countries or blocked_countries arrays.
Configure per_transaction, daily, monthly, and lifetime limits.
/v1/cards/{id}/controlsUpdate card controls
Request
PUT /v1/cards/card_001/controls
Authorization: Bearer sk_live_xxx
{
"spending_limits": {
"per_transaction": 10000,
"daily": 20000,
"monthly": 50000
},
"mcc_restrictions": {
"blocked_mccs": ["7995", "5967", "9311"]
},
"geography_restrictions": {
"blocked_countries": ["CN", "RU", "IR"]
},
"time_restrictions": {
"blocked_hours": ["00:00-06:00"]
}
}Response
{
"card_id": "card_001",
"controls_updated": true,
"effective_immediately": true
}Card control implementations:
Context: Corporate card with real-time controls.
Problem: Enforce corporate spending policies in real-time.
Architecture: Card controls with MCC restrictions, spending limits, and real-time enforcement.
Technology: React, Node.js, card-issuing APIs
Outcomes: Reduced out-of-policy spending, automated policy enforcement.
Lessons: Real-time controls are more effective than post-transaction monitoring. MCC restrictions enforce spending policies.
Storing PAN or CVV in databases creates massive PCI DSS scope and security risk. Always use tokenization.
Missing idempotency keys on payment endpoints causes duplicate charges on retries. Every payment API must support idempotency.
Treating inherently asynchronous payment operations as synchronous causes timeouts and poor UX. Use webhooks and async patterns.
Failing to retry failed webhook deliveries causes merchants to miss critical payment status updates. Implement exponential backoff retry.
Manual reconciliation at scale is error-prone and slow. Automate reconciliation from day one.
Depending on a single payment rail creates a single point of failure. Implement multi-rail architecture with failover.
Launching without fraud monitoring leads to chargebacks and losses. Implement real-time fraud detection from day one.
Using the transaction database as the financial ledger leads to accuracy and audit issues. Maintain a separate double-entry ledger.
| KPI | Description | Target |
|---|---|---|
| Authorization Rate | Percentage of payment attempts that receive authorization | > 95% |
| Payment Success Rate | Percentage of initiated payments that complete successfully | > 97% |
| API Latency (p99) | 99th percentile API response time | < 500ms |
| TPS Capacity | Transactions per second the system can handle | Based on peak demand |
| Fraud Rate | Fraudulent transactions as percentage of total | < 0.1% |
| Chargeback Rate | Chargebacks as percentage of transactions | < 0.75% |
| Uptime | System availability | 99.99% |
| Reconciliation Accuracy | Percentage of transactions successfully reconciled | > 99.5% |
Build a Card Control Engine
Objective: Design and implement a card control engine with MCC, geography, and spending limits.
Scenario: Build a control engine for a corporate card program that enforces spending policies in real-time.
- Design MCC restriction engine
- Design geography restriction engine
- Design spending limit tracking
- Design real-time control evaluation
- Build control management API
Deliverables: Control engine, API, test suite.
Validation: Set controls. Process compliant transaction (approved). Process non-compliant transaction (declined). Verify real-time enforcement.
How are card controls evaluated in real-time?
When an authorization arrives, the control engine queries all applicable controls for the card. It checks MCC, merchant, geography, spending limits, and time restrictions. All checks must pass for approval. The evaluation must complete in < 100ms to not delay authorization.
What is MCC and how is it used in card controls?
MCC (Merchant Category Code) is a 4-digit code classifying the type of goods or services a merchant sells. Card controls use MCC to allow or block specific merchant categories (e.g., block gambling MCC 7995, allow restaurants MCC 5812).
Payment Service Provider: entity that enables merchants to accept payments through multiple payment methods via a single integration.
Payment Facilitator: entity that enables sub-merchants to accept payments under the PayFac master merchant account.
Bank or financial institution that processes card transactions on behalf of merchants.
Bank or financial institution that issues payment cards to consumers.
Fee paid between the acquiring bank and the issuing bank for card transactions, set by card networks.
Merchant ID: unique identifier assigned to a merchant by the acquirer.
Primary Account Number: the 14-19 digit number on a payment card, considered sensitive cardholder data under PCI DSS.
Process of replacing sensitive card data with a non-sensitive token.
Process of verifying that a payment account has sufficient funds and is valid for a transaction.
Process of finalizing a previously authorized transaction, triggering the transfer of funds.
Process of exchanging transaction details between acquiring and issuing banks.
Actual transfer of funds between banks to complete a payment transaction.
Transaction dispute initiated by a cardholder through their issuing bank.
Merchant Category Code: 4-digit code classifying the type of goods or services a merchant sells.
3-D Secure: authentication protocol for card-not-present transactions.
Payment Card Industry Data Security Standard: security standard for organizations handling cardholder data.
Hardware Security Module: physical computing device that safeguards and manages digital keys.
Property of an API where making the same request multiple times produces the same result as making it once.
HTTP callback triggered by an event, used in payments for asynchronous notifications.
Unified Payments Interface: India real-time payment system developed by NPCI.
National Payments Corporation of India: umbrella organization for retail payment systems in India.
Reserve Bank of India: India central bank and regulatory authority for payment systems.
International standard for electronic data interchange between financial institutions.
Automated Clearing House: US electronic payment network for batch-processed bank-to-bank transfers.
US Federal Reserve instant payment service launched in 2023.
Single Euro Payments Area: EU payment integration initiative.
Real-Time Payments: payment infrastructure enabling instant, irrevocable payments 24/7.
Financial record-keeping system using double-entry accounting.
Process of matching transaction records across different systems to ensure consistency.
Financial arrangement where a third party holds funds until conditions are met.
Buy Now Pay Later: short-term financing allowing consumers to pay in installments.
Banking-as-a-Service: model where licensed banks provide banking infrastructure via APIs.
Practice of providing secure API access to bank account data and payment initiation.
Integration of financial services into non-financial platforms via APIs.
Cryptocurrency designed to maintain stable value by pegging to a reference asset.
Merchant Category Code: 4-digit code classifying merchant type.
Programmable rules for card spending: MCC, geography, limits, time.
Real-time engine evaluating card controls during authorization.
- Architecture designed and reviewed
- API contracts defined with idempotency
- Authentication and authorization implemented
- PCI DSS scope assessed and minimized via tokenization
- Error handling and retry logic designed
- Webhook delivery and retry implemented
- Security review completed (encryption, HSM, key management)
- Regulatory requirements identified (RBI, PCI DSS, AML)
- Data model defined (transactions, ledger, reconciliation)
- Observability implemented (metrics, logs, traces, alerts)
- Testing completed (unit, integration, load, chaos)
- Disaster recovery designed and tested
- Reconciliation process validated
- Fraud detection deployed and tuned
- Production readiness assessed and approved
Designs end-to-end payment architecture including gateways, orchestration, rails, security, and compliance.
Designs comprehensive fintech platform architecture including payments, banking, ledgers, risk, and compliance.
Designs API-first payment platforms including REST APIs, webhooks, SDKs, developer portals, and API governance.
Implements and operates payment infrastructure including gateway, routing, processing, reconciliation, and settlement.
Builds internal developer platforms for payment integration, providing self-service APIs, SDKs, and golden paths.
Applies software engineering to payment operations, managing SLI/SLO/error budgets and incident response.
Monitors transaction patterns, investigates suspicious activity, tunes fraud rules, and manages chargeback disputes.
Defines payment product strategy, manages roadmap, balances user experience with compliance, and drives payment metrics.
Ensures payment systems meet PCI DSS, RBI, AML, and other regulatory requirements.
Implements and operates treasury management systems including liquidity management, settlement, FX, and bank connectivity.
2027: Card Controls will see increased AI integration with AI agents handling routine payment decisions, intelligent routing optimization, and predictive fraud prevention becoming standard capabilities.
2028: Autonomous payment systems will mature with self-healing infrastructure, AI-driven reconciliation, and cross-border real-time payments reducing settlement time from days to seconds.
2029: Programmable money and tokenized deposits will enable new payment models with conditional settlement, smart contract-based escrow, and machine-to-machine payments becoming practical.
2030: The convergence of AI, blockchain, and real-time payments will be complete. Card Controls will be managed through AI agents with humans governing policy, security, and business alignment. Payments will be invisible, instant, and intelligent.
- Card controls enable programmable restrictions on card usage.
- Key control types: MCC, merchant, geography, spending limits, time, velocity.
- Controls are evaluated in real-time during authorization (< 100ms).
- Real-time controls are more effective than post-transaction monitoring.
- Use cases: corporate expenses, family safety, fraud prevention.
