Skip to main content
Version: v2

Overview

The On-Ramp Widget is a WebView of the Commerce Widget with the On-Ramp flow that can be used in-game.

How the On-Ramp Widget works

  1. The On-Ramp URL is generated using UImmutableMarketplaceLinkFactory::GenerateOnRampLink. For more details, refer to the On-Ramp SDK Reference or the On-Ramp Examples subsections.
  2. The generated On-Ramp URL is launched using our WebView solution. Alternatively, it can be launched using the OS's default browser.
  3. The webview is displayed.

For further details, please refer to the SDK Reference.

How to use On-Ramp Widget

💡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 to YOUR_EMAIL_ADDRESS in the example.
  • WalletAddress is currently set to YOUR_WALLET_ADDRESS in the example.

Please refer to the On-Ramp SDK Reference for more details.

💡Reminder

In the Designer View of your User Widget Blueprint, ensure there is a widget entry named OnRampWidget of class UImmutableMarketplaceOnRampWidget, as required by BindWidget

C++

UCLASS(Blueprintable)
class UOnRampUserWidget : public UUserWidget
{
GENERATED_BODY()

public:
virtual void NativeConstruct() override
{
Super::NativeConstruct();

if (OnRampWidget)
{
OnRampWidget->Load(TEXT("YOUR_WALLET_ADDRESS"), TEXT("YOUR_EMAIL_ADDRESS"));
}
}

protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Meta = (BindWidget))
UImmutableMarketplaceOnRampWidget* OnRampWidget;
};

Blueprint


Related content