> For the complete documentation index, see [llms.txt](https://xact.gitbook.io/xact/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xact.gitbook.io/xact/sdk/php/buy-a-nft-from-qr-code.md).

# Buy a NFT from QR Code

There is another way to buy a NFT. You can also show a QR code on any page ! Once scanned via the Xact Wallet application, the end user will be able to process the payment.

## Prerequisites: <a href="#pre-requisites" id="pre-requisites"></a>

{% content-ref url="/pages/-MiuYfwyCPSgSMPD92ob" %}
[Sell a NFT](/xact/sdk/php/sell-a-nft.md)
{% endcontent-ref %}

## Step 1: Get your NFT <a href="#step-2-initializing-token-transfer" id="step-2-initializing-token-transfer"></a>

{% hint style="info" %}
Please Note that your NFT need to be on sale.
{% endhint %}

```php
 /* TokenId of the NFT */
$tokenId = '';
/* Account ID of the seller */
$sellerAccountId = '';
/* Custom uniq ID */
$uniqId = '';
/* NFT ID - is optional for old token */
$nftId = '';

$nft = $client->getNFTForSaleByTokenId([$tokenId, $uniqId, $sellerAccountId, $nftId]);
```
