Unity
Onramp

Fiat Onramp

Give players the ability to convert fiat currency to cryptocurrency in-game by offering seamless onramp experience. After users signs in with Fractal, use the FractalOnrampButton prefab to offer one-click fiat to crypto onramp experience.

When the user clicks on the onramp button, a default system browser or browser popup will handle the fiat onramp process.

Onramp Prefab

Add Prefab to the Scene

Add the FractalOnrampButton prefab to your game scene from the Prefabs/FractalSDK folder. Fractal Account prefab

Just like the login button, FractalOnrampButton prefab should be nested inside UI > Canvas object. This automatically creates a fiat onramp button on your scene's UI layer. You can customize the button as needed. Prefab in scene

Configure the Onramp Button

When selecting the prefab from the scene hierarchy, notice that the object contains the Fractal Onramp Handler script inside the object Inspector.

Here you need to enter your project's API key (client id), obtained from Fstudio.

💡
You can use "dfrvfXn5agKbR6IP6GWXAom_MFIFd4MY" as the Client Id for quick testing using our sample game project.

Fractal prefab configuration