Virtual Cards
Create and manage virtual cards for online payments using the Bloque SDK.
Overview
Virtual cards provide a secure way to make online payments without exposing sensitive financial information. Features include:
- Instant Creation: Cards are created immediately
- PCI Compliant: Secure handling of card data
- Multiple Cards: Users can have multiple cards
- Real-time Balances: Check balances across multiple assets
- Transaction History: Full transaction tracking
Creating a Virtual Card
Basic Creation
Create a virtual card for a user:
Parameters
Response
Listing Cards
List all card accounts for a user with their balances:
Checking Balance
Get the current balance for a specific card:
Transaction History
Basic Listing
List transactions for a card:
With Filters and Pagination
Pagination Example
Card Management
Update Card Name
Card States
Cards can be in different states:
Viewing Card Details
The detailsUrl field provides a secure, PCI-compliant URL where users can view their full card number, CVV, and expiration date:
Never store or log full card numbers, CVVs, or other sensitive card data. Always use the provided detailsUrl for displaying card details to users.
Multiple Cards
Users can have multiple cards for different purposes:
Error Handling
Always handle errors appropriately:
Complete Example
Best Practices
- User Sessions: Always connect to a user session
- KYC First: Ensure users complete KYC verification
- Meaningful Names: Help users identify their cards
- Check Status: Verify card status before use
- Security: Never store full card numbers
- Error Handling: Use try-catch blocks
- Test in Sandbox: Test thoroughly before production
Next Steps
- Transfers - Transfer funds between accounts
- Bancolombia - Bancolombia integration
- Compliance - KYC verification