Transfers
Transfer funds between any accounts using the Bloque SDK.
Overview
The transfer API allows you to move funds between different account types:
- Card to Virtual account
- Card to Bancolombia account
- Virtual to Virtual account
- Bancolombia to Card account
- And any other combination
All transfers are queued for processing and can be tracked using the returned queue ID.
Basic Transfer
Transfer funds between two accounts:
basic-transfer.ts
Parameters
basic-transfer.ts
Response
types.ts
The transfer is queued for processing. Use the queueId to track the transfer status.
Transfer Examples
Card to Bancolombia
Transfer from a virtual card to a Bancolombia account:
card-to-bancolombia.ts
Between Virtual Accounts
Transfer KSM between virtual accounts:
types.ts
Card to Card
Transfer between two cards:
types.ts
Supported Assets
:::tip Decimal Conversion Always account for decimals when specifying amounts:
- DUSD/6: Multiply by 10^6 (1 DUSD = 1,000,000)
- KSM/12: Multiply by 10^12 (1 KSM = 1,000,000,000,000) :::
Transfer Metadata
Add custom metadata to track transfers:
types.ts
Error Handling
Always handle errors appropriately:
types.ts
Complete Example
complete-transfer.ts
Batch Transfers
Transfer funds to multiple destinations:
batch-transfer.ts
Best Practices
- Check Balances: Verify sufficient funds before transfers
- Validate URNs: Ensure account URNs are valid
- Asset Decimals: Account for proper decimal places
- Error Handling: Use try-catch blocks
- Metadata: Add tracking information
- Test First: Test in sandbox mode
- Store Queue IDs: Save queue IDs for tracking
Next Steps
- Virtual Cards - Manage card accounts
- Bancolombia - Bancolombia integration
- Overview - Accounts overview