# Developer - Redeem a Capsule NFT

Users have the option to store tokens within a Capsule NFT at the time of mint and embed the Capsule NFT with artwork. The Capsule NFT can be redeemed at any time to retrieve the tokens stored inside. Redemption of a Capsule NFT requires an already minted Capsule NFT, which you can create [here](/capsulenft/developer-walkthroughs/developer-mint-a-capsule-nft.md).

Below are some examples of redeeming a Capsule NFT.

**Note:** Redemption of the Capsule NFT requires burning of the Capsule NFT in return for acquiring the stored tokens. Thus, methods below are named `burnXYZ`.

### Methodology

In order to redeem a Capsule NFT you mus&#x74;**:**

* know the address of the Capsule Collection from which your Capsule NFT resides (this is the same as getting the address of your NFT, which can be found on Etherscan, OpenSea, or Metamask)
* know the ID of your Capsule NFT (the NFT ID, is the unique identification number given to your NFT. It can also be found on Etherscan, OpenSea, or Metamask)

### Capsule NFT Redemption Types and Methods

More information on the methods below can be found at the [CapsuleMinter.sol](/capsulenft/developer-walkthroughs/contracts/capsuleminter.sol.md) page. Depending on the type of Capsule NFT you are redeeming, you will call either:

#### Simple Capsule NFT

```solidity
function burnSimpleCapsule(address _capsule, uint256 _id) external
```

#### ERC-20 Capsule NFT or Multi ERC-20 Capsule NFT

```solidity
function burnSingleERC20Capsule(address _capsule, uint256 _id) external
```

```solidity
function burnMultiERC20Capsule(address _capsule, uint256 _id) external
```

#### ERC-721 Capsule NFT or Multi ERC-721 Capsule NFT

```solidity
function burnSingleERC721Capsule(address _capsule, uint256 _id) external
```

<pre class="language-solidity"><code class="lang-solidity"><strong>function burnMultiERC721Capsule(address _capsule, uint256 _id) external
</strong></code></pre>

#### ERC-1155 Capsule

Given that only [`mintMultiERC1155Capsule`](/capsulenft/developer-walkthroughs/developer-mint-a-capsule-nft.md#erc-1155-capsule-nft-minting) is available to users, `burnMultiERC1155Capsule` must be used.

```solidity
function burnMultiERC1155Capsule(address _capsule, uint256 _id) external
```

### Example Capsule NFT Redemption Call

Methods for redeeming a Capsule NFT are largely the same - the only difference lying in the type of Capsule (method) called.

**Note:** Burning a Simple Capsule NFT will not return any stored tokens (as none are placed inside), and thus has no special effect unless your application has built logic for such. An example has been shown for clarity.

Some example calls to redeem (burn) any type of Capsule NFT are shown here:

```
burnSimpleCapsule(
    "0x1a0a69a267b3e72d22dEB970b2Cc6296aC31A80c", // Capsule Collection (NFT) address
    1, // Capsule NFT ID
);

burnSingleERC20Capsule(
    "0x1a0a69a267b3e72d22dEB970b2Cc6296aC31A80c", // Capsule Collection (NFT) address
    2, // Capsule NFT ID
);

burnMultiERC721Capsule(
    "0x1a0a69a267b3e72d22dEB970b2Cc6296aC31A80c", // Capsule Collection (NFT) address
    3, // Capsule NFT ID
);
```

These calls will redeem any Capsule NFT:

* From the Capsule Collection at address `0x1a0a69a267b3e72d22dEB970b2Cc6296aC31A80c`
* Depending on the method above - with the ID `1`, `2`, or `3`

While the redemption parameters are the same for each Capsule NFT type, the method call differs for each.

You must use the same redemption method call as was used to mint the Capsule NFT (for example, a Single ERC-721 Capsule **must** be redeemed using the `burnSingleERC721Capsule` method).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.capsulelabs.xyz/capsulenft/developer-walkthroughs/developer-redeem-a-capsule-nft.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
