Card Issuance API Overview
The Card Issuance API enables you to issue and manage virtual and physical payment cards programmatically. This comprehensive suite of endpoints allows you to create cards, manage budgets, control spending, process transactions, and implement 3D Secure authentication—all through a unified API.
Key Features
- Instant Card Issuance: Create virtual cards in real-time with immediate availability
- Flexible Funding Models: Choose between budget-based or dedicated funds cards
- Spending Controls: Set transaction limits, merchant restrictions, and velocity controls
- 3D Secure Support: Implement secure authentication for online transactions
- Real-Time Monitoring: Track authorizations and clearings as they occur
- Multi-Currency: Support for international transactions with transparent FX
- Budget Management: Create and manage multiple budget accounts with flexible top-ups
Authentication
All Card Issuance API endpoints require dual authentication:
Authorization: Bearer YOUR_ACCESS_TOKEN
x-api-key: YOUR_API_KEY
Obtain your access token and API key from your Ahrvo dashboard or contact your account manager.
API Categories
The Card Issuance API is organized into four main categories:
1. 3D Secure (3DS)
Implement secure authentication for card-not-present transactions. 3D Secure adds an additional layer of security by requiring cardholders to verify their identity during online purchases.
Available Endpoints:
- Create Cardholder 3DS Contact - Register cardholder contact information for 3DS authentication
- Enroll Card in 3DS - Enable 3D Secure authentication for a card
- Query 3DS Contact Details - Retrieve cardholder's 3DS contact information
- Query 3DS Enrollment Details - Check card's 3DS enrollment status
- Update 3DS Contact - Modify cardholder's 3DS contact details
- Update 3DS Enrollment - Change card's 3DS enrollment settings
Key Use Cases:
- Secure online payments with cardholder verification
- Reduce fraud on card-not-present transactions
- Meet PSD2 Strong Customer Authentication (SCA) requirements
- Manage cardholder authentication preferences
2. Budget
Create and manage budget accounts that fund multiple cards. Budget accounts act as central funding sources, allowing you to control spending across card programs.
Available Endpoints:
- Create Budget Account - Set up a new budget account
- Query Budget Balance - Check current balance and available funds
- Query Budget Transfer Order - Track inter-budget transfers
- Query Top-Up Order - View budget top-up transaction history
- Top Up Budget Account - Add funds to a budget account
- Transfer Between Budgets - Move funds between budget accounts
Key Use Cases:
- Departmental budget allocation
- Multi-program card funding
- Automated budget replenishment
- Budget consolidation and rebalancing
- Cost center accounting
- Spending pool management
Budget Types:
- Shared Budget: Multiple cards draw from same budget pool
- Dedicated Budget: Single card with isolated funds
- Parent-Child Budgets: Hierarchical budget structures
3. Card
Issue, manage, and control payment cards. This is the core card management functionality including creation, funding, spending controls, and lifecycle management.
Available Endpoints:
Card Creation & Information:
- Create Card - Issue new virtual or physical cards
- Query All Cards - List and filter cards with pagination
- Query Card Details - Retrieve comprehensive card information
- Query Card Product - View available card products and features
Spending Management:
- Control Card Spending - Set spending limits and restrictions
- Query Card Remaining Limits - Check available spending capacity
Card Funding (Dedicated Funds Cards):
- Query Dedicated Funds Card Balance - Check card balance
- Query Card Funding Orders - View top-up and withdrawal history
- Top Up Dedicated Funds Card - Add funds to card
- Withdraw Funds - Remove funds from card
Card Lifecycle:
- Unfreeze Card - Reactivate a frozen card
- Update Card Remark - Modify card labels and descriptions
Key Use Cases:
- Employee expense cards
- Contractor payment cards
- Department spending cards
- Campaign-specific cards
- Subscription management cards
- One-time use virtual cards
- Travel and entertainment cards
Card Types:
- Virtual Cards: Instant issuance for online/digital payments
- Physical Cards: Shipped cards for in-person transactions
- Budget-Based Cards: Funded from shared budget accounts
- Dedicated Funds Cards: Self-contained card balances
4. Transaction
Monitor and analyze card transactions in real-time. Track both authorization attempts and final cleared transactions for complete visibility into card activity.
Available Endpoints:
- Query Authorization Logs - View all authorization attempts (approved/declined)
- Query Clearing Logs - Track settled transactions
Authorization vs. Clearing:
| Aspect | Authorization | Clearing |
|---|---|---|
| Timing | Immediate (when card used) | 1-3 days after authorization |
| Status | Approved or Declined | Only successful transactions |
| Amount | May include holds | Final settled amount |
| Purpose | Transaction approval | Actual fund movement |
| Use Case | Fraud detection, monitoring | Reconciliation, accounting |
Key Use Cases:
- Real-time fraud detection
- Transaction monitoring dashboards
- Decline rate analysis
- Financial reconciliation
- Expense categorization
- Cross-border fee tracking
- Settlement timing analysis
- Authorization-to-clearing matching
Common Workflows
Workflow 1: Issue a Budget-Based Card
1. Create Budget Account → 2. Top Up Budget → 3. Create Card → 4. Card Ready to Use
Steps:
- Create Budget Account - Set up funding source
- Top Up Budget Account - Add initial funds
- Create Card - Issue card linked to budget
- Control Card Spending - Set spending limits (optional)
Workflow 2: Issue a Dedicated Funds Card
1. Create Card → 2. Top Up Card → 3. Card Ready to Use
Steps:
- Create Card - Issue dedicated funds card
- Top Up Dedicated Funds Card - Add funds directly to card
- Control Card Spending - Set spending limits (optional)
Workflow 3: Enable 3D Secure on a Card
1. Create 3DS Contact → 2. Enroll Card → 3. Secure Payments Enabled
Steps:
- Create Cardholder 3DS Contact - Register cardholder details
- Enroll Card in 3DS - Enable 3DS authentication
- Query 3DS Enrollment Details - Verify enrollment
Workflow 4: Monitor and Reconcile Transactions
1. Query Authorizations → 2. Analyze Patterns → 3. Query Clearings → 4. Reconcile
Steps:
- Query Authorization Logs - Monitor real-time activity
- Analyze decline rates and fraud patterns
- Query Clearing Logs - Get settled transactions
- Match authorizations to clearings for reconciliation
Workflow 5: Manage Card Lifecycle
1. Issue Card → 2. Monitor Usage → 3. Adjust Controls → 4. Withdraw/Close
Steps:
- Create Card - Issue new card
- Query Card Details - Monitor card status
- Control Card Spending - Adjust limits as needed
- Withdraw Funds - Recover unused funds (if dedicated)
Card States and Lifecycle
Card States
| State | Description | Can Transact? | Actions Available |
|---|---|---|---|
| Active | Card is operational | ✅ Yes | Freeze, update controls, transact |
| Frozen | Temporarily suspended | ❌ No | Unfreeze, update details |
| Expired | Past expiration date | ❌ No | Replace card |
| Closed | Permanently deactivated | ❌ No | None (create new card) |
State Transitions
Created → Active → Frozen → Active
↓
Expired
↓
Closed
Rate Limits
To ensure system stability and fair usage, the following rate limits apply:
| Endpoint Type | Rate Limit |
|---|---|
| Card Creation | 100 requests/minute |
| Card Queries | 1000 requests/minute |
| Budget Operations | 500 requests/minute |
| Transaction Queries | 1000 requests/minute |
| 3DS Operations | 200 requests/minute |
Exceeding rate limits will result in HTTP 429 (Too Many Requests) responses.
Error Handling
All API endpoints return standardized error responses:
{
"code": "ERROR_CODE",
"message": "Human-readable error description"
}
Common Error Codes
| Code | Description | Resolution |
|---|---|---|
INSUFFICIENT_BALANCE | Budget or card lacks funds | Top up budget/card |
INVALID_CARD_STATE | Card not in valid state | Check card status, unfreeze if needed |
LIMIT_EXCEEDED | Transaction exceeds spending limit | Increase limits or reduce amount |
CARD_NOT_FOUND | Card ID doesn't exist | Verify card ID |
BUDGET_NOT_FOUND | Budget ID doesn't exist | Verify budget ID |
UNAUTHORIZED | Invalid credentials | Check authentication tokens |
DUPLICATE_REQUEST | Duplicate idempotency key | Use unique key or check existing transaction |
Best Practices
Security
- Secure Credentials: Store API keys and tokens securely using environment variables or secret management systems
- Enable 3D Secure: Implement 3DS for online transactions to reduce fraud
- Monitor Transactions: Set up real-time monitoring for suspicious activity
- Implement Limits: Use spending controls to minimize risk exposure
- Regular Audits: Review card activity and authorization logs regularly
Performance
- Use Pagination: For large result sets, implement proper pagination
- Filter Queries: Use date ranges and filters to limit response sizes
- Batch Operations: Group similar operations when possible
- Cache Responses: Cache card details and product information
- Implement Retry Logic: Handle transient errors with exponential backoff
Financial Management
- Budget Planning: Create separate budgets for different departments/programs
- Regular Reconciliation: Match authorizations to clearings daily
- Monitor Balances: Set up alerts for low budget balances
- Track Fees: Monitor cross-border and transaction fees
- Expense Categorization: Use MCC codes for automatic expense classification
Operational
- Idempotency: Use unique idempotency keys for all operations
- Error Handling: Implement comprehensive error handling and logging
- Webhook Integration: Set up webhooks for real-time transaction notifications (if available)
- Documentation: Maintain internal documentation of card programs
- Testing: Test in staging environment before production deployment
Support and Resources
Getting Help
- Technical Support: contact-support@ahrvo.com
- Account Management: your-account-manager@ahrvo.com
- API Status: https://status.ahrvo.network
- Developer Portal: https://developers.ahrvo.network
Additional Resources
API Versioning
The Card Issuance API uses URI versioning. The current version is v2:
/api/issuing/{category}/v2/{endpoint}
Breaking changes will result in a new version. Non-breaking changes will be added to the current version with backwards compatibility.
Quick Start
1. Set Up Authentication
export AHRVO_API_KEY="your-api-key"
export AHRVO_ACCESS_TOKEN="your-access-token"
2. Create Your First Card
# Create a budget account
curl -X POST "https://api.ahrvo.network/card/issuance/api/issuing/budget/v2/account" \
-H "Authorization: Bearer $AHRVO_ACCESS_TOKEN" \
-H "x-api-key: $AHRVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_name": "My First Budget",
"currency": "USD"
}'
# Top up the budget
curl -X POST "https://api.ahrvo.network/card/issuance/api/issuing/budget/v2/top-up" \
-H "Authorization: Bearer $AHRVO_ACCESS_TOKEN" \
-H "x-api-key: $AHRVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"budget_id": "budget_id_from_above",
"amount": "1000.00",
"currency": "USD"
}'
# Create a card
curl -X POST "https://api.ahrvo.network/card/issuance/api/issuing/card/v2/apply" \
-H "Authorization: Bearer $AHRVO_ACCESS_TOKEN" \
-H "x-api-key: $AHRVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"budget_id": "budget_id_from_above",
"card_type": "virtual",
"cardholder_name": "John Doe"
}'
3. Monitor Transactions
# Query authorization logs
curl -X GET "https://api.ahrvo.network/card/issuance/api/issuing/transaction/v2/authorizations?card_id=your_card_id" \
-H "Authorization: Bearer $AHRVO_ACCESS_TOKEN" \
-H "x-api-key: $AHRVO_API_KEY"
Summary
The Card Issuance API provides everything you need to build sophisticated card programs:
- 26 Endpoints across 4 categories
- 6 3DS Endpoints for secure authentication
- 6 Budget Endpoints for funding management
- 12 Card Endpoints for card lifecycle management
- 2 Transaction Endpoints for monitoring and reconciliation
Each endpoint includes comprehensive documentation with multiple use cases, code examples in multiple languages, and best practices for implementation.
Ready to get started? Begin with Create Budget Account or Create Card!