Accounts Overview
The Bloque SDK provides comprehensive functionality for managing various types of financial accounts.
Account Types
The SDK supports multiple account types, each designed for specific use cases:
Virtual Cards
Create instant virtual cards for online payments. Cards are:
- PCI-compliant: Secure storage and display of sensitive card data
- Instant: Cards are created immediately and ready to use
- Multiple: Users can have multiple cards for different purposes
Learn more about Virtual Cards
Bancolombia Accounts
Create payment accounts that integrate with Bancolombia's banking system:
- Reference codes: Unique codes for receiving payments
- Bank integration: Direct integration with Bancolombia
- Payment tracking: Full visibility into payment status
Learn more about Bancolombia Accounts
BRE-B Keys
Create and resolve BRE-B payment keys for real-time payment routing:
- Supported key types:
PHONE,EMAIL,ID,ALPHA,BCODE - Key creation: Create a BRE-B account and associate it to a
ledgerIdwhen provided, or create one automatically - Key resolution: Resolve a key before initiating a payment flow
- Lifecycle management: Suspend, activate, and delete stored keys
- Payouts: Pay to resolved keys with
session.swap.breb.create()
Common Operations
All account types support common operations:
Listing Accounts
List all accounts for a user with their current balances:
Get Account by URN
Fetch full account details (including balance) for any account by URN:
Checking Balance
Get the current balance for any account by URN (works for card, virtual, bancolombia, breb, us-account, polygon):
Viewing Transactions
List transaction history with pagination:
Viewing Global Transactions (All Accounts)
List transactions across all your accounts (cards, virtual, polygon, etc.) without account URN:
Transfers
Transfer funds between any accounts:
Supported Assets
User Sessions
Most account operations require connecting to a user session first:
This ensures proper authentication and authorization for user-specific operations.
Account Webhooks
All account types support webhook notifications for lifecycle events. Pass a webhookUrl when creating an account to receive real-time POST notifications when state transitions occur ā such as when an account becomes active after on-chain settlement.
Learn more about Account Webhooks
Best Practices
- Use User Sessions: Connect to user sessions for account operations
- Verify Users: Ensure users complete KYC before creating accounts
- Handle States: Check account status before operations
- Pagination: Use pagination for large transaction lists
- Error Handling: Always use try-catch blocks
- Test First: Test in sandbox mode before production
- Configure Webhooks: Set up webhooks to react to account activation instead of polling
Next Steps
- Account Webhooks - Real-time account lifecycle notifications
- Virtual Cards - Create and manage virtual cards
- Bancolombia - Bancolombia account integration
- BRE-B - Create and resolve BRE-B keys
- Transfers - Transfer funds between accounts
- Compliance - KYC verification