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
- 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. - The generated On-Ramp URL is launched using our WebView solution. Alternatively, it can be launched using the OS's default browser.
- 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 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.
💡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
- BlueprintUE
- Image

Related content