Create an account using the account create API
A transaction that creates a Hedera account. A Hedera account is required to interact with any of the Hedera network services as you need an account to pay for all associated transaction/query fees. You can visit the Hedera Developer Portal to create a previewnet or testnet account. You can also use third-party wallets to generate free mainnet accounts. To process an account create transaction, you will need an existing account to pay for the transaction fee. To obtain the new account ID, request the receipt of the transaction.When creating a new account using the
AccountCreateTransaction()API you will need an existing account to pay for the associated transaction fee.Account Properties
- The sender pays for the token association fee and the rent for the first auto-renewal period.
- Please see the transaction and query fees table for the base transaction fee.
- Please use the Hedera fee estimator to estimate your transaction fee cost.
- The account paying for the transaction fee is required to sign the transaction.
Maximum Auto-Associations and Fees
Accounts have a property,maxAutoAssociations, and the property’s value determines the maximum number of automatic token associations allowed.
The sender pays the
maxAutoAssociations fee and the rent for the first auto-renewal period for the association. This is in addition to the typical transfer fees. This ensures the receiver can receive tokens without association and makes it a smoother transfer process.Methods
Account Hooks (HIP-1195)You can attach Hiero Hooks to an account at creation time using
addHook(). Hooks are programmable EVM extension points that let you enforce custom validation logic on transfers involving this account. See Create and Manage Hooks for full details and utility class reference.Create an account with an EVM hook
This example creates a new account with an account allowance hook attached. The hook contract must be deployed first viaContractCreateTransaction.