NFT Checkout

NFT Checkout

⁠This feature requires an enterprise agreement

Contact Sales

Magic's NFT Checkout enables fiat-based NFT primary sales purchases via a simple function call using Magic's SDK. We partner with PayPal for secure, verified transactions and allow you to control your own Merchant account.

#Use Cases

Magic's NFT Checkout can be used any time you want to charge users Fiat currency to purchase NFTs. Some example projects include:

  • NFT collections to promote your brand
  • Event ticketing
  • Token-gated experiences and membership NFTs


We can break NFT Checkout implementation down into two parts - Onboarding and Usage. Below are the general steps to take for each:

#Merchant Onboarding

  1. Work with your Magic Customer Success rep to plan out your NFT project.
  2. Use a signup link from Magic to set up your PayPal Business account. Magic is a PayPal Partner, so we will initiate and manage transactions/orders for you, but ultimately you will be able to manage all of your own post-purchase data via the PayPal Business Dashboard.
  3. Finalize partnership details and sign a Partnership Agreement Contract.
  4. Set up and deploy your NFT Collection. See Smart Contracts for more information.
  5. Set up tokens, prices, and quantities on Magic's platform.
  6. Integrate and test the Magic SDK in your application.

#Usage / User Flow

  1. A user goes to your website or app and browses NFTs for purchase (other scenarios are possible, this is a base case).
  2. The user clicks a "Purchase" button. Your app checks whether the user is logged into Magic, and logs them in if not via the Magic SDK.
  3. Once the user is logged in and their wallet is available, your app launches the Magic SDK NFT Checkout. An embedded checkout widget pops up.
  4. The user reviews the purchase, enters their payment information or logs into PayPal, and confirms the order.
  5. Magic's Minting and Delivery service is triggered once the payment is confirmed. The user waits for the minting to finish.
  6. The user sees a confirmation page of successful NFT delivery to their wallet and can then close the popup to return to your app.

#Merchant Account Setup

Once you have a signed Partnership Agreement Contract, your Magic Customer Success rep will send you a signup link for PayPal. Once you click the link, you will be prompted to either set up a new account or link your existing PayPal Business account. Please notify your rep once the account setup is completed.

To note:

  • The PayPal account you use or create must be a Business account, not a Personal account
  • You must authorize Magic for the requested permissions for Magic to link your account to our platform

#NFT Smart Contract

Whether you are working with Magic Studios for custom smart contract creation or deploying your own smart contract for the minting and delivery of your NFTs, we will need to enter token information into the database. You will need to send to your Magic Customer Success rep:

  • List of your NFTs, with an ID for each
  • Maximum quantity, including the number of previously minted NFTs for each collection
  • Price in USD for each NFT
  • If you want to enable crypto payments, send Magic the name of the crypto-enabled function for minting

Make sure to set up a contract on the Polygon Mumbai testnet in order to test checkout with test credit card numbers in the PayPal sandbox.

#Connect to Wallet

Now, you can go to the Magic Dashboard to create a new App or use an existing one.

Once you have an app, you can initialize the Magic SDK using the "publishable key" found in the dashboard.

The user needs to create or connect a wallet in order for them to receive the NFT they are purchasing. You can do this by logging the user into their Magic wallet before or once the user chooses to buy an NFT in your app. For example:

01import { Magic } from "magic-sdk";
03const magic = new Magic('YOUR_LIVE_PUBLISHABLE_API_KEY');
04const isLoggedIn = await magic.user.isLoggedIn();
05if (!isLoggedIn) {
06    await magic.wallet.connectWithUI();

#Start an NFT Checkout

Once you have your Magic instance initialized and the user is logged into their wallet, you can initiate the NFT checkout flow for the user by running:

01const userInfo =  await magic.user.getInfo();
02const response = await magic.nft.checkout(
03    {
04        contractId: "11112222333334444",
05        contractAddress: "0x1234567890",
06        name: "My NFT Collection",
07        imageUrl: "",
08        quantity: 1,
09        tokenId: 1, // Set to 0 for ERC721
10        walletAddress: userInfo.publicAddress,
11        isCryptoCheckoutEnabled: false, // Optional
12    }

Notes on the fields:

  • contractId will be provided to you by your Magic Customer Service rep. This is the ID Magic uses to keep track of your contract in our platform.
  • contractAddress is the on-chain address of your underlying NFT Contract. We need this information to inspect metadata about the contract.
  • name is the name of the collection that you would like to display to the user in the NFT checkout UX -- it does not need to be the same as the collection or token name
  • imageUrl is a static hosted image used in the Checkout page to show a preview of the NFT to the user. We do not use on-chain images for these NFT previews. This is useful if you want to reveal images after the user pays and mints the token.
  • quantity is the number of tokens a user wants to mint. This will take into consideration the limitations of your smart contract.
  • tokenId is only for ERC1155. for ERC721 set this to 0
  • walletAddress is the user's wallet. If you want to provide the ability for users to use Metamask or other non-Magic wallets, you can set any address here. Otherwise, use the logged in user's Magic Wallet address.
  • isCryptoCheckoutEnabled [OPTIONAL] defaults to false. Determines if checking out with crypto is enabled. When false, only fiat payments are accepted.

Running the above code opens an NFT Checkout popup window and guides the user through the purchase flow. They can close the window at any time and return to your app should they wish to exit the flow.

We provide Webhooks for updates on the NFT minting process. You will receive a webhook event only at the end of a user's NFT checkout flow. If there is any failure in the minting or delivery process, the user will not be charged.

#Post-Purchase Action Items

#Confirmation Emails

We recommend that you send a customized receipt to your users after the purchase of their NFT. PayPal will send a generic receipt for all purchases, but the user experience is better if you can provide an email with links for support, etc. You can use Magic's webhooks for this purpose.

#Customer Service

As the merchant of record with PayPal, you are responsible for customer service, chargebacks, and refunds. This can be managed through your PayPal merchant dashboard. Here is a PayPal guide for issuing refunds. PayPal also provides chargeback protection services. Depending on how your NFT smart contract was written, NFTs can be retrieved after minting if a refund was requested.

If you have additional questions, please reach out to your Magic Customer Success rep.

#PayPal Dashboard

Your merchant dashboard will have all the data you need about purchases. You can view all your transaction details by logging into your PayPal dashboard.

#Support FAQs

#What buyer geographies are supported?

200+ buyer countries and regions are supported, for both PayPal checkout and credit or debit card checkout. See the full list here.

#What merchant geographies are supported?

PayPal checkout: 200+ countries and regions are supported. See the full list here.

Credit/debit card checkout: Australia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Greece, Hungary, Italy, Latvia, Liechtenstein, Luxembourg, Malta, Netherlands, Norway, Poland, Portugal, Romania, Slovakia, Slovenia, Sweden, United Kingdom, United States.

#Is my merchant use case supported?

See here for a list of prohibited merchant activities and activities requiring PayPal’s pre-approval. Your use case will be vetted by PayPal as part of their merchant onboarding process.

#What fiat currencies can I accept?

We support 25 currencies, listed below:

Australian Dollar (AUD), Brazilian Real (BRL), Canadian Dollar (CAD), Czech Koruna (CZK), Danish Krone (DKK), Euro (EUR), Hong Kong Dollar (HKD), Hungarian Forint (HUF), Israeli New Shekel (ILS), Japanese Yen (JPY), Malaysian Ringgit (MYR), Mexican Peso (MXN), New Taiwan Dollar (TWD), New Zealand Dollar (NZD), Norwegian Krone (NOK), Philippine Peso (PHP), Polish Zloty (PLN), Russian Ruble (RUB), Singapore Dollar (SGD), Swedish Krona (SEK), Swiss Franc (CHF), Thai Baht (THB), UK Pounds Sterling (GBP), US Dollar (USD)

#Do you support 3D Secure?

Yes. 3D Secure is enabled by default for all countries in the EU. If you would like to enable 3D Secure in other countries, please reach out to your Magic Customer Success Rep.

#Do you support other payment methods?

This solution can support other payment methods such as Apple Pay, Google Pay, and Venmo upon request. Please reach out to your Magic Customer Success Rep if interested.