Quickstarts
Performing Token Transfers
Organizational Custody allows your application to move assets directly from a wallet set using your API key. This guide covers how to transfer native blockchain assets (e.g., ETH, SOL) and fungible tokens (e.g., USDC, USDT).
1. Prerequisites
- MPC Mode: If your organization is in Trustless MPC mode, you must provide your
encryptedOrganizationSecretwith each transfer request. - Token IDs: Ensure you have the correct Planbok
tokenIdfor the asset you wish to send. You can find these via theGET /v2/tokensendpoint.
2. Initiating a Transfer
Use a single API call to broadcast a transfer to the blockchain.
Endpoint: POST /v2/organization/transactions/transfer
Headers:
PLANBOK-X-API-KEY:<your_api_key>
Request Body (Standard MPC):
Code
Request Body (Trustless MPC):
Code
idempotencyKey: A unique UUID v4 to prevent double-spending on retries.amounts: An array of strings. Most transfers use a single amount, but some chains/scenarios support multi-recipient outputs.
3. Handling the Response
The API returns a transactionId and, once broadcast, the transactionHash.
Response Example:
Code
4. Multi-Chain Considerations
- EVM: Gas fees are automatically estimated and handled by the MPC nodes.
- Solana: The system automatically handles Associated Token Account (ATA) creation if the recipient doesn't have one for the specific token.
- Bitcoin: The system manages UTXO selection and change address derivation automatically.
Next Steps
For interacting with smart contracts beyond simple transfers, see the Smart Contract Interactions guide.
Last modified on