Skip to main content

Sol Payment


The Sol Payment guard allows us to charge the payer an amount in SOL when minting. Both the amount of SOL and the destination address can be configured.


Guard Settings

The Sol Payment guard contains the following settings:

  • Amount: The amount in SOL (or lamports) to charge the payer.
  • Destination: The address of the wallet that should receive all payments related to this guard.


Here’s how we can create a Candy Machine using the Sol Payment guard via the JS SDK. Note that, in this example, we’re using the current identity as the destination wallet.

import { sol } from '@metaplex-foundation/js';

const { candyMachine } = await metaplex.candyMachines().create({
// ...
guards: {
solPayment: {
amount: sol(1.5),
destination: metaplex.identity().publicKey,

API References: Operation, Input, Output, Transaction Builder, Guard Settings.

Mint Settings

The Sol Payment guard does not need Mint Settings.

However, if you’re planning on constructing instructions without the help of our SDKs, you will need to add the configured destination address to the remaining accounts of the mint instruction. See the Candy Guard’s program documentation for more details.

Route Instruction

The Sol Payment guard does not support the route instruction.