Checking Supported Tokens
Learn how to check if a memecoin or token is supported by Crossmint Checkout
Introduction
Before integrating a memecoin or token using Crossmint’s checkout, it’s important to verify that it’s supported by Crossmint. This guide will show you how to use the Crossmint API to check if a specific token is supported and what features are available for it.
Prerequisites
Create a server-side API key
Get your API keys from the Crossmint Console
Once you log in to the console, the next step is to create an .
Click the "Integrate" tab and click on the "API Keys" option on top.
Enable the orders.create scope
Make sure the orders.create
scope is enabled for your API key.
Getting Started
The Supported Tokens API allows you to query the status of any token to determine if it’s supported by Crossmint and what features are available.
- Endpoint:
https://www.crossmint.com/api/v1-alpha2/tokens/:tokenLocator
- Method: GET
- Authentication: Requires either a server or client API key
Token Locator Format
Currently, memecoin checkout only supports the Solana network.
The token locator follows this format:
Example:
- TRUMP:
solana:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
Checking Token Support
Using JavaScript
Here’s how to check if a token is supported using JavaScript:
Sample Response
A successful response will look similar to this:
Integrating with Your Checkout Flow
Once you’ve confirmed that a token is supported, you can use the information from the API response to customize your checkout experience.
Example: Pre-checkout Validation
Here’s an example of how to incorporate token support checking before initiating a checkout:
Best Practices
-
Cache Results (with caution): Token support status can change, but for frequently accessed tokens, consider caching results for a short period (e.g., 1 hour) to reduce API calls.
-
Handle Errors Gracefully: Implement proper error handling to provide clear feedback to users when a token is not supported.
-
Check Before Displaying Options: Only display payment methods that are actually available for the token.
Next Steps
Credit Card Memecoin Checkout
Now that you can check token support, learn how to implement a credit card checkout for memecoins
Order Lifecycle
Understand the lifecycle of orders in Crossmint’s checkout flow
FAQ
Was this page helpful?