# 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="sell-a-nft" %}
[sell-a-nft](https://xact.gitbook.io/xact/sdk/php/sell-a-nft)
{% 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]);
```
