Virtual Accounts
Create and manage virtual testing accounts using the Bloque SDK.
Overview
Virtual accounts are simple testing accounts requiring only basic personal information. They're perfect for:
- Development & Testing: Quick account creation for integration tests
- Sandbox Environment: Safe testing without real financial data
- Simple KYC: Minimal information required (first name, last name)
- Fast Setup: Instant account creation
Creating a Virtual Account
Basic Creation
Create a virtual account with minimal information:
create-virtual-account.ts
Parameters
types.ts
Response
types.ts
Managing Virtual Accounts
Update Metadata
Update custom metadata on a virtual account:
update-metadata.ts
Metadata Restrictions
The source field is reserved and cannot be modified through metadata updates.
All metadata values must be strings.
Account States
Manage the state of virtual accounts:
manage-state.ts
Available States
Use Cases
Integration Testing
integration-test.ts
Automated Testing
test-factory.ts
Error Handling
Handle errors appropriately when working with virtual accounts:
error-handling.ts
Complete Example
complete-example.ts
Best Practices
- Use Sandbox Mode: Always use
sandboxmode for virtual accounts - Meaningful Metadata: Add metadata to track test scenarios and purposes
- Cleanup: Disable or delete test accounts after use
- Error Handling: Always wrap operations in try-catch blocks
- Test Isolation: Use unique identifiers to isolate test accounts
- Webhooks: Configure webhooks for event notifications during testing
- Status Checks: Verify account status before performing operations
Differences from Other Account Types
Next Steps
- Virtual Cards - Create payment cards
- Transfers - Transfer funds between accounts
- Bancolombia - Bancolombia integration