How-to for developers · NFTs

Mint and Burn NFTs Using Python

In plain words

This tutorial shows how to mint new NFTs, list the NFTs an account owns and burn an NFT, using a Python sample app. To mint is to create an NFT. To burn is to destroy it for good.

Written by zerps in plain words, from the source linked below.
Section
Tutorials

What you need

Download the Quickstart Samples archive, then open and run lesson3-mint-token.py. The app works with two test accounts, called the Standby account and the Operational account. You can load them from Testnet seeds you already have or get new ones.

Minting an NFT

Set the Flags field. The page recommends the value 8 for testing, which sets the tfTransferable flag so the NFT can be transferred to another account. Otherwise it can only be transferred back to the issuing account. Enter the NFT URI, which points to the data or metadata of the NFT, and the Transfer Fee. Enter a Taxon as a whole number, or 0 if you do not use one. Then click Mint NFT. In the code, the mint_token method builds the mint transaction, and the NFT URI must be converted to a hex string first.

Listing and burning

Click Get NFTs to list the NFTs owned by the account. The get_tokens method sends an AccountNFTs request for this. The current owner of an NFT can always burn it. Enter the Token ID and click Burn NFT. The burn_token method takes the owner's seed and the NFT ID and sends an NFTokenBurn transaction.

The transfer fee

The Transfer Fee is a percentage of the proceeds from future sales of the NFT that goes back to the original creator. It is a value from 0 to 50000, which allows rates between 0.000% and 50.000% in steps of 0.001%. If the Flags field does not make the NFT transferable, set the fee to 0.

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.