Skip to content

Instantly share code, notes, and snippets.

@alfonso-paella
Last active February 3, 2023 07:34
Show Gist options
  • Select an option

  • Save alfonso-paella/af5d7ac3ebfc8863b828d88602c9543a to your computer and use it in GitHub Desktop.

Select an option

Save alfonso-paella/af5d7ac3ebfc8863b828d88602c9543a to your computer and use it in GitHub Desktop.
Gist to add Crossmint Pay with card for an ERC721 Ethereum contract
// 1. Add this import line at the top of your file
import { CrossmintPayButton } from "@crossmint/client-sdk-react-ui";
// 2. Add this component wherever you want the Buy with card button to show
// Ensure the button shows even for your users who don't have connected their wallet!
<CrossmintPayButton
clientId="_YOUR_CLIENT_ID_"
environment="staging"
mintConfig={{
type: "erc-721",
quantity: "_NUMBER_OF_NFTS_",
totalPrice: "_PRICE_IN_ETH_"
// Append here any custom arguments, if any, for your smart contract minting function
}}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment