Introduction
This guide will show you how to accept credit card payments using Crossmint’s Embedded Checkout for memecoin sales. You’ll learn how to:- Set up credit card payments for Solana memecoin purchases in JavaScript
- Implement an embedded checkout UI using Crossmint’s React components
- Track order status and delivery
Important Notes
Compliance Checks
Supported Tokens
Delivery to External Wallets Only
Merchant of Record
Prerequisites
Solana Wallet
Get API Keys
- Client-side
- Server-side (Headless Checkout Only)
Fungible Token Specification
To define which fungible token you'd like to purchase, you'll need to specify the tokenLocator in the format:-
For Solana:
solana:${tokenMintHash}- Example:
solana:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN tokenMintHash: The token mint hash (commonly known as contract address, CA, or mint hash)
- Example:
-
For EVM chains (Ethereum, Polygon, Arbitrum, Base, etc.):
<chain>:<contractAddress>- Example:
ethereum:0x1234567890123456789012345678901234567890 chain: The chain name (ethereum, polygon, arbitrum, base, etc.)contractAddress: The contract address corresponding to the ERC20 token contract (40 hexadecimal characters, beginning with0x)
- Example:
Embedded Memecoin Checkout
The fastest way to start selling memecoins is to use our embedded checkout solution adapted for fungible tokens.Important Parameters
Before implementing the checkout, note these key parameters:receiptEmail: Optional. If the buyer pays with Apple Pay or Google Pay, Crossmint obtains the email automatically. Providing it improves fraud signal quality.executionParameters.mode: Set to “exact-in” for memecoin purchases (specifies exact USD amount to spend). “exact-out” is for NFTs, while “exact-in” is for fungible tokens.maxSlippageBps: Optional slippage tolerance (default is typically 500 BPS or 5% if not specified)
solana:7EivYFyNfgGj8xbUymR7J4LuxUHLKRzpLaERHLvi7Dgu. Production tokens will not work in the staging environment.Integration Steps
This guide will start from scratch with an empty Next.js application. You'll install the required@crossmint/client-sdk-react-ui dependency and add the embedded checkout component. To get started:
Set up the Project
Create a new Next.js application
y and press Enter to proceed:Name your app `crossmint-embedded-checkout-demo` and accept the default options
Change into the directory created in previous steps
Install @crossmint/client-sdk-react-ui
Open the project in your preferred code editor
Memecoin Embedded Integration
Next, we will set up a project file with Crossmint’s embedded checkout to accept memecoin purchases.Add environment variables
.env.local in your project root:Create the checkout page
/src/app/page.tsx with:Run your app
http://localhost:3000) to see your checkout!Test your app
4242424242424242 (Visa). More information on testing can be found here.For production launch with live memecoin tokens, contact the Crossmint sales team — production Checkout requires a signed Order Form and successful KYB. See the production launch guide for the full sequence.
Understanding the Code
Quote Expiration
Slippage
executionParameters.maxSlippageBps. If not provided,
Crossmint will use the default slippage configuration (typically 500 BPS or 5%) from Crossmint's providerNext Steps
Customize UI
Handle Webhooks
Order Lifecycle
The order goes through several phases: Learn more about order phases in the headless checkout guide or embedded checkout guide A summary of the phases is below:-
Quote Phase (1-minute validity)
- Initial price quote generated
- Requires recipient information to proceed
-
Payment Phase
- Collect payment information
- Handle payment completion and errors
-
Delivery Phase
- Purchase memecoin with USDC
- Apply specified slippage tolerance
- Send transfer transaction to recipient wallet
-
Completion
- Order marked as completed
- Receipt email sent to recipient
- Memecoins have been delivered to the recipient wallet
FAQ
Is there a UI Crossmint provides?
Is there a UI Crossmint provides?
Do I need to complete KYC to purchase memecoins?
Do I need to complete KYC to purchase memecoins?
What happens if my transaction fails?
What happens if my transaction fails?
What are the transaction limits?
What are the transaction limits?
Is there a limit on how much of a single token I can sell in a day?
Is there a limit on how much of a single token I can sell in a day?
What do the order creation parameters mean?
What do the order creation parameters mean?
method: Set tocardfor credit card paymentscurrency: Set tousdfor US Dollar paymentsreceiptEmail: Optional. If the buyer pays with Apple Pay or Google Pay, Crossmint obtains the email automatically. Providing it improves fraud signal quality.
tokenLocator: Specifies the memecoin token address in the formatsolana:tokenAddressexecutionParameters:mode: Set to "exact-in" for memecoin purchases (specifies exact USD amount to spend)amount: Amount to purchase in USDmaxSlippageBps: Set to "500" for 5% slippage tolerance. If not provided, the default slippage will be applied from the available liquidity provider.
clientSecret and an order object with an orderId. Pass these to the Crossmint Embedded Checkout component to collect payment from the user.
