Building NFTs for Artists & Their Fans

NFTs can be a great way for artists to sell their work and connect with collectors. By using Underdog and Sphere, you can create a seamless and secure way for artists to mint their NFTs and sell them to buyers.

Here are the steps involved in creating a gallery for artists to sell their art using Underdog and Sphere:

  1. Create an Underdog account and mint an NFT for each piece of art.
  2. Create a product in Sphere for each NFT.
  3. Set up webhooks between Underdog and Sphere so that whenever an NFT is minted, a new product is created in Sphere.
  4. Enable users to pay with USDC or Solana for NFTs and mint it into a users wallet.

Once you have completed these steps, you will have created a gallery where artists can sell their art to buyers.

Need something more like GitHub? Here’s the template that you can follow:

Quick Start
  1. Install dependencies


  1. Run the development server

yarn dev

  1. Open http://localhost:3000

Webhook Setup

You can run the setup script to automatically generate webhooks on both Underdog and Sphere.

yarn run setup

Note: you'll need to have your Underdog API key and Sphere API key, set your network, and set the app URL in your environment variables.

Otherwise, you can use the interface to manually create webhooks.


  1. Go to
  2. Click Add Webhook
  3. Set URL to ${APP_URL}/api/underdog/webhooks and select project.create


  1. Go to
  2. Click Create Webhook
  3. Set URL to ${APP_URL}/api/sphere/webhooks and select Payment Successful

Environment Variables

VariableDescriptionExampleAPP_URL: The URL of the app used to redirect after a successful payment on the Sphere checkout page
NEXT_PUBLIC_APP_NAME: The name of the app used in the headerUnderdog GalleryNEXT_PUBLIC_NETWORKEither MAINNET for Solana mainnet-beta or DEVNET for Solana devnet
DEVNETUNDERDOG_API_KEYKey: to authenticate your Underdog requests generated from
SPHERE_API_KEYKey:  to authenticate your Sphere requests generated from
SPHERE_WEBHOOK_SECRET: Secret to validate webhook requests sent from Spheresecret_123dsafdsafadsf