Get started with the Hedera Token Service - Part 3: How to… | Hedera Hedera Network Services Token Service Mint and configure tokens and accounts. Consensus Service Verifiable timestamps and ordering of events. Smart Contracts Run Solidity smart contracts. HBAR The Hedera network's native cryptocurrency. Insights How It Works Learn about Hedera from end to end. Explorers View live and historical data on Hedera. Dashboards Analyze network activity and metrics. Network Nodes Understand networks and node types. Devs Start Building Get Started Learn core concepts and build the future. Documentation Review the API and build using your favorite language. Developer Resources Integrations Plugins and microservices for Hedera. Fee Estimator Understand and estimate transaction costs. Open Source Hedera is committed to open, transparent code. Learning Center Learn about web3 and blockchain technologies. Grants Grants & accelerators for your project. Bounties Find bugs. Submit a report. Earn rewards. Ecosystem ECOSYSTEM Hedera Ecosystem Applications, developer tools, network explorers, and more. NFT Ecosystem Metrics Analyze on-chain and market NFT ecosystem metrics. CATEGORIES Web3 Applications Connect into the innovative startups decentralizing the web on Hedera. Enterprise Applications Learn about the Fortune 500 companies decentralizing the web on Hedera. Wallets & Custodians Create a Hedera account to manage HBAR, fungible tokens, and NFTs. Network Explorers Hedera mainnet and testnet graphical network explorers. Developer Tooling Third-party APIs, integrations, and plugins to build apps on Hedera. Grants & Accelerators Boost your project with support from the Hedera ecosystem. Partner Program Explore our partners to bring your vision into reality. Hedera Council Over 30 highly diversified organizations govern Hedera. Use Cases Hedera Solutions Asset Tokenization Studio Open source toolkit for tokenizing assets securely. Stablecoin Studio All-in-one toolkit for stablecoin solutions. Hedera Guardian Auditable carbon markets and traceability. Functional Use Cases Data Integrity & AI Reliable, secure, and ethically governed insights. Sustainability Enabling fair carbon markets with trust. Real-World Asset Tokenization Seamless tokenization of real-world assets and digital at scale. Consumer Engagement & Loyalty Mint, distribute, and redeem loyalty rewards. Decentralized Identity Maintain the lifecycle of credentials. Decentralized Logs Scalable, real-time timestamped events. DeFi Dapps built for the next-generation of finance. NFTs Low, fixed fees. Immutable royalties. Payments Scalable, real-time, and affordable crypto-payments. HBAR Overview Learn about Hedera's token, HBAR. Treasury Management Hedera’s report of the HBAR supply. Governance Decentralized Governance Hedera Council See the world's leading organizations that own Hedera. About Meet Hedera's Board of Directors and team. Journey Watch Hedera's journey to build an empowered digital future for all. Transparent Governance Public Policy Hedera's mission is to inform policy and regulation that impact the industry. Meeting Minutes Immutably recorded on Hedera. Roadmap Follow Hedera's roadmap in its journey to build the future. Resources Company What's New Partners Papers Careers Media Blog Technical Press Podcast Community Events Meetups Store Brand Navigation QUICKSTART Get started with the Hedera Token Service - Part 3: How to Pause, Freeze, Wipe, and Delete NFTs technical Nov 09, 2021 by Ed Marquez Head of Developer Relations In Part 1 of the series, you saw how to mint and transfer an NFT using the Hedera Token Service (HTS). In Part 2, you saw how to enable and disable token KYC, update token properties (if a token is mutable), and schedule transactions. Now in Part 3, you will learn how to use HTS capabilities that help you manage your tokens. Specifically, you will learn how to: Pause a token (stops all operations for a token ID) Freeze an account (stops all token operations only for a specific account) Wipe a token (wipe a partial or entire token balance for a specific account) Delete a token (the token will remain on the ledger) Note: To make sure you have everything you need to follow along, be sure to check out these getting started resources. There, you will see how to create a Hedera testnet account, and then you can configure your development environment. If you want the entire code used, skip to the Code Check section below. Pause a Token The pause transaction prevents a token from being involved in any kind of operation across all accounts. Specifying a during the creation of a token is a requirement to be able to pause token operations. The code below shows you that this key must sign the pause transaction. Note that you can’t pause a token if it doesn’t have a pause key. Also keep in mind that if this key was not set during token creation, then a token update to add this key is not possible. Pausing a token may be useful in cases where a third-party requests that you, as the administrator of a token, stop all operations for that token while something like an audit is conducted. The pause transaction provides you with a way to comply with requests of that nature. In our example below, we pause the token, test that by trying a token transfer and checking the token pauseStatus, and then we unpause the token to enable operations again. // PAUSE ALL TOKEN OEPRATIONS let tokenPauseTx = await new TokenPauseTransaction().setTokenId(tokenId).freezeWith(client).sign(pauseKey); let tokenPauseSubmitTx = await tokenPauseTx.execute(client); let tokenPauseRx = await tokenPauseSubmitTx.getReceipt(client); console.log(`- Token pause: ${tokenPauseRx.status}`); // TEST THE TOKEN PAUSE BY TRYING AN NFT TRANSFER (TREASURY -> ALICE) let tokenTransferTx3 = await new TransferTransaction() .addNftTransfer(tokenId, 3, treasuryId, aliceId) .freezeWith(client) .sign(treasuryKey); let tokenTransferSubmit3 = await tokenTransferTx3.execute(client); try { let tokenTransferRx3 = await tokenTransferSubmit3.getReceipt(client); console.log(`\n-NFT transfer Treasury->Alice status: ${tokenTransferRx3.status} \n`); } catch { // TOKEN QUERY TO CHECK PAUSE var tokenInfo = await tQueryFcn(); console.log(`- NFT transfer unsuccessful: Token ${tokenId} is paused (${tokenInfo.pauseStatus})`); } // UNPAUSE ALL TOKEN OPERATIONS let tokenUnpauseTx = await new TokenUnpauseTransaction().setTokenId(tokenId).freezeWith(client).sign(pauseKey); let tokenUnpauseSubmitTx = await tokenUnpauseTx.execute(client); let tokenUnpauseRx = await tokenUnpauseSubmitTx.getReceipt(client); console.log(`- Token unpause: ${tokenUnpauseRx.status}\n`); Copy // TOKEN QUERY FUNCTION ========================================== async function tQueryFcn() { var tokenInfo = await new TokenInfoQuery().setTokenId(tokenId).execute(client); return tokenInfo; } Copy Console output: Freeze a Token Freezing an account stops transfers of the specified token for that account. Note that this transaction must be signed by the of the token. Once a freeze executes, the specified account is marked as “Frozen” and will not be able to receive or send tokens unless unfrozen. In our example below, we first freeze Alice’s account for the token ID we’re working with, we test the freeze by trying a token transfer, and then unfreeze Alice’s account so she can transact the token again. // FREEZE ALICE'S ACCOUNT FOR THIS TOKEN let tokenFreezeTx = await new TokenFreezeTransaction() .setTokenId(tokenId) .setAccountId(aliceId) .freezeWith(client) .sign(freezeKey); let tokenFreezeSubmit = await tokenFreezeTx.execute(client); let tokenFreezeRx = await tokenFreezeSubmit.getReceipt(client); console.log(`- Freeze Alice's account for token ${tokenId}: ${tokenFreezeRx.status}`); // TEST THE TOKEN FREEZE FOR THE ACCOUNT BY TRYING A TRANSFER (ALICE -> BOB) try { let tokenTransferTx4 = await new TransferTransaction() .addNftTransfer(tokenId, 2, aliceId, bobId) .addHbarTransfer(aliceId, 100) .addHbarTransfer(bobId, -100) .freezeWith(client) .sign(aliceKey); let tokenTransferTx4Sign = await tokenTransferTx4.sign(bobKey); let tokenTransferSubmit4 = await tokenTransferTx4Sign.execute(client); let tokenTransferRx4 = await tokenTransferSubmit4.getReceipt(client); console.log(`\n-NFT transfer Alice->Bob status: ${tokenTransferRx4.status} \n`); } catch { console.log(`- Operation unsuccessful: The account is frozen for this token`); } // UNFREEZE ALICE'S ACCOUNT FOR THIS TOKEN let tokenUnfreezeTx = await new TokenUnfreezeTransaction() .setTokenId(tokenId) .setAccountId(aliceId) .freezeWith(client) .sign(freezeKey); let tokenUnfreezeSubmit = await tokenUnfreezeTx.execute(client); let tokenUnfreezeRx = await tokenUnfreezeSubmit.getReceipt(client); console.log(`- Unfreeze Alice's account for token ${tokenId}: ${tokenUnfreezeRx.status}\n`); Copy Console output: Wipe a Token This operation wipes the provided amount of fungible or non-fungible tokens from the specified account. You see from the code below that this transaction must be signed by the token's . Wiping an account's tokens burns the tokens and decreases the total supply. Note that this transaction does not delete tokens from the treasury account. For that, you must use the Token Burn operation. In this case, we wipe the NFT that Alice currently holds. We then check Alice’s balance and the NFT supply to see how these change with the wipe operation (these two values before the wipe are provided for comparison – see Part 2 for the details). // WIPE THE TOKEN FROM ALICE'S ACCOUNT let tokenWipeTx = await new TokenWipeTransaction() .setAccountId(aliceId) .setTokenId(tokenId) .setSerials([2]) .freezeWith(client) .sign(wipeKey); let tokenWipeSubmitTx = await tokenWipeTx.execute(client); let tokenWipeRx = await tokenWipeSubmitTx.getReceipt(client); console.log(`- Wipe token ${tokenId} from Alice's account: ${tokenWipeRx.status}`); // CHECK ALICE'S BALANCE aB = await bCheckerFcn(aliceId); console.log(`- Alice balance: ${aB[0]} NFTs of ID:${tokenId} and ${aB[1]}`); // TOKEN QUERY TO CHECK TOTAL TOKEN SUPPLY var tokenInfo = await tQueryFcn(); console.log(`- Current NFT supply: ${tokenInfo.totalSupply}`); Copy Console output: Delete a Token After you delete a token it’s no longer possible to perform any operations for that token, and transactions resolve to the error TOKEN_WAS_DELETED. Note that the token remains in the ledger, and you can still retrieve some information about it. The delete operation must be signed by the token . Remember from Part 1 that if this key is not set during token creation, then the token is immutable and deletion is not possible. In our example, we delete the token and perform a query to double-check that the deletion was successful. Note that for NFTs, you can’t delete a specific serial ID. Instead, you delete the entire class of the NFT specified by the token ID. // DELETE THE TOKEN let tokenDeleteTx = await new TokenDeleteTransaction().setTokenId(tokenId).freezeWith(client); let tokenDeleteSign = await tokenDeleteTx.sign(adminKey); let tokenDeleteSubmit = await tokenDeleteSign.execute(client); let tokenDeleteRx = await tokenDeleteSubmit.getReceipt(client); console.log(`\n- Delete token ${tokenId}: ${tokenDeleteRx.status}`); // TOKEN QUERY TO CHECK DELETION var tokenInfo = await tQueryFcn(); console.log(`- Token ${tokenId} is deleted: ${tokenInfo.isDeleted}`); Copy Console output: Conclusion In this article, you saw key capabilities to help you manage your HTS tokens, including how to: pause, freeze, wipe, and delete tokens. If you haven’t already, be sure to check out Part 1 and Part 2 of this blog series to see examples of how to do even more with HTS – you will see how to mint NFTs, transfer NFTs, perform token KYC, schedule transactions, and more. Continue learning more in our documentation and learning center! Code Check https://github.com/hedera-dev/hedera-example-hts-nft-blog-p1-p2-p3/blob/main/nft-part3.js Share This Back to blog What is gRPC, gRPC-Web, and Proxies? Ed Marquez Pragmatic Blockchain Design Patterns – Integrating Blockchain into Business Processes Michiel Mulders Zero Cost EthereumTransaction on Success: Hedera's New Fee Model for Relay Operators Oliver Thorn Hedera Adopts Chainlink Standard for Cross-Chain Interoperability To Accelerate Ecosystem Adoption Hedera Team Hedera Developer Highlights March 2025 Michiel Mulders Hedera Release Cycle Overview Ed Marquez View All Posts Sign up for the newsletter CONNECT WITH US Transparency Open Source Audits & Standards Sustainability Commitment Carbon Offsets Governance Hedera Council Public Policy Treasury Management Meeting Minutes LLC Agreement Node Requirements Community Events Meetups HBAR Telegram Developer Discord Twitter Community Support FAQ Network Status Developer Discord StackOverflow Brand Brand Guidelines Built on Hedera Logo Hedera Store About Team Partners Journey Roadmap Careers Contact General Inquiry Public Relations © 2018-2025 Hedera Hashgraph, LLC. All trademarks and company names are the property of their respective owners. All rights in the Deutsche Telekom mark are protected by Deutsche Telekom AG. All rights reserved. Hedera uses the third party marks with permission. Terms of Use  |  Privacy Policy