Most of the well known tokens are already supported but for some cases you might want your users to be able to swap to a custom token. This example will show you how to do that in two steps using our web SDK.Documentation Index
Fetch the complete documentation index at: https://sequence-0fb8d9e6-unreal-quickstart-with-marketplace.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Integration
To integrate the on-ramp and swap to a custom token, follow these steps:Connect with Web SDK
Make sure you completed the Getting Started guide.
On ramp to a supported token
Complete the On-ramp guide
Update state after on-ramp is successful
After the on-ramp is successful, we can use the
onOrderSuccessful callback to update the state of the app.Swap to a custom token with Smart Swaps
Once the on-ramp is successful, we can use the
useSwapModal hook to swap the purchased token to your own custom token.It will take a few minutes (1-3 minutes) for the on-ramped token to be available in the smart wallet so make sure to check the balance before opening the swap modal.
If you have enough balance of a supported payment token, the modal will display it as a payment option, you don’t need to specify a payment token.