> For the complete documentation index, see [llms.txt](https://xpansionchain-1.gitbook.io/xpansionchain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xpansionchain-1.gitbook.io/xpansionchain/advanced-guides/link-sdk/link.nftcheckoutprimary.md).

# Link.nftCheckoutPrimary

## Link.nftCheckoutPrimary

FEATURE FOR MANAGED PARTNERS ONLY

This is a feature intended for managed partners. If you are not a managed partner and would like to become one, please reach out to us on our <mark style="color:blue;">#dev-discussion channel</mark> on Discord.

If you are a managed partner, your partner success manager needs to set up a commercial partnership with MoonPay for you. Please reach out to them to facilitate this.

We have partnered with MoonPay to enable you to integrate their <mark style="color:blue;">NFT Checkout</mark> feature so you can build applications that allow your users to purchase NFTs directly on XpansionChain with a credit card - no ETH or other ERC20 token required!

This primary sales flow is available in the Link SDK v1.35.7+ and is a collaboration between XpansionChain and MoonPay. It requires you to register your intent to use the service with us, and to have commercial agreement between you & MoonPay.

Once you have been approved, to initialize the NFT Checkout process you need to call the nftCheckoutPrimary function:

```
await link.nftCheckoutPrimary({
  sellerWalletAddress: '0x001', // L2 wallet address of the seller
  contractAddress: '0x002', // NFT contract address
  offerId: 'new_offer', // The identifier for the "offer"
});
```

Where:

* `sellerWalletAddress` - L2 wallet address of the seller, funds will be send to this address
* `contractAddress` - NFT contract address
* `offerId` - An identifier that represents what will be minted.

In the cases where purchasers know what they're purchasing (such as a specific pfp) `offerId` could be the token ID (i.e. `420`) and in other cases where they dont know what they're purchasing (such as a loot box) it could be something like `silver-chest`. This is simply a way to render an item in the cart, and doesnt need to tie to the actual NFT asset directly.

HANDLING THE OFFERID

Note that primary sales involve taking a payment before the mint occurs. Because the asset doesnt exist yet, we've included an `offerId` instead of an asset ID. Therefore in order to successfully render the checkout with the information seen below (Offer title, and image) - you will need to be a managed partner with XpansionChain.

This displays the Link UI with loaded MoonPay widget:

![Mint By Fiat](https://3017072639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7a6afyDwSEkvWtt1UhmH%2Fuploads%2FR3rgeiOy6OBvRPQ4KrXb%2F1%20%E6%A0%87%E9%A2%98%20%E5%9B%BE%E9%87%8C.png?alt=media\&token=3d44d8a4-a533-4fc4-98b2-930d54cd9131)

### Errors[​](https://docs.x.immutable.com/docs/x/link-nft-checkout-primary#errors) <a href="#errors" id="errors"></a>

See error responses <mark style="color:blue;">here</mark>.
