Skip to content
On this page


CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections. Simulate minting transactions for multiple use-cases like NFT collection launch, gasless mint and many more on Solana Blockchain!


npm install @candypay/sdk @project-serum/anchor


The entry point to the SDK is a CandyPay instance that will give you access to its API.

import { CandyPay } from "@candypay/sdk";
const candypay = new CandyPay();

Using along Next.js

Using our SDK with Next.js can sometimes run in build time error cause of Anchor library using the Node.js native fs module. We highly recommend adding this export in next.config.js file before deployment:

module.exports = {
  webpack: (config, { isServer }) => {
    if (!isServer) {
      config.resolve.fallback.fs = false;
    return config;