Generating the on-ramp URL
💡Reminder
The following variables are using placeholder values.
Don't forget to replace them with values that are relevant to your application.
Email
is currently set toYOUR_EMAIL_ADDRESS
in the example.WalletAddress
is currently set toYOUR_WALLET_ADDRESS
in the example.
Please refer to the On-Ramp SDK Reference for more details.
💡Tip
For a complete list of fields available in ExtraQueryParams
, see the Transak documentation.
C++
void GenerateAndLaunchOnRampLink()
{
FImmutableOnRampQueryParams QueryParams;
QueryParams.DefaultCryptoCurrency = TEXT("IMX");
QueryParams.DefaultFiatAmount = TEXT("100");
QueryParams.DefaultFiatCurrency = TEXT("AUD");
QueryParams.CryptoCurrencyList = TEXT("imx,eth,usdc");
TMap<FString, FString> ExtraQueryParams
{
{TEXT("themeColor"), TEXT("000000")},
{TEXT("defaultFiatCurrency"), TEXT("AUD")} // This will be ignored because DefaultFiatCurrency in FImmutableOnRampQueryParams takes precedence
};
const FString OnRampLink = UImmutableMarketplaceLinkFactory::GenerateOnRampLink
(
EImmutableEnvironment::Sandbox,
TEXT("YOUR_EMAIL_ADDRESS"),
TEXT("YOUR_WALLET_ADDRESS"),
QueryParams,
ExtraQueryParams
);
FPlatformProcess::LaunchURL(*OnRampLink, nullptr, nullptr);
}
Blueprint
- BlueprintUE
- Image
