Step 1. Set up the integration
Register the credentials that you prepared in the Steam console in the Hive Console, and set up the environment for implementing Steam payments with the dedicated plugin.
1. Issue a Publisher Web API Key in the Steam console
First, get a Publisher Web API Key issued in Steamworks. For details, see Prerequisites.
2. Enter the Publisher Web API Key in the Hive Console
Register the Publisher Web API Key issued in Steamworks in the Store Settings of the Hive Console. For details, see Steam credentials.
3. Install the Steam payment plugin
Required prerequisite: Steamworks initialization
The Hive Axyl SDK does not initialize Steamworks, so the app must initialize and maintain it directly. Call SteamAPI.Init() when the app starts, and run SteamAPI.RunCallbacks() every frame. The SteamAPI used for initialization is provided by the external package com.rlabrecque.steamworks.net, which the Steam payment plugin brings in together with the com.com2usplatform.hiveaxyl.steamworks package. If you use the plugin while Steamworks is not initialized, a FAILED_PRECONDITION (ExternalCode: STEAMWORKS_NOT_INITIALIZED) error occurs.
The Steam payment plugin, which you need to receive the Steam payment authorization callback, is provided as the com.com2usplatform.hiveaxyl.payments.addon.steam package. Add this package to your project dependencies with the method that you used in SDK installation.
The plugin works in Windows and macOS (macOS 15 or later) desktop builds, and the Steamworks integration package (com.com2usplatform.hiveaxyl.steamworks) is installed with it as a dependency.
4. Register the Steam payment plugin and verify the installation
Register the plugin
Register the Steam payment plugin with the builder when you initialize the Hive Axyl SDK. Add the AddSteamMicrotransactions() call to your initialization code.
using Hive.Axyl.Core;
using Hive.Axyl.Core.Unity;
using Hive.Axyl.Payments;
using Hive.Axyl.Payments.Addon.Steam;
// Register the Steam payment plugin during Axyl SDK initialization
HiveBootstrap.Initialize(config, builder =>
{
builder.AddPayments(sandbox: true); // Payment (IPaymentsService). Development and test environment. For production builds, use AddPayments()
builder.AddSteamMicrotransactions(); // Steam payment plugin (ISteamMicrotransactionsPlugin)
});
Retrieve the plugin
Retrieve the registered Steam payment plugin with HiveCore.TryResolve<ISteamMicrotransactionsPlugin>(). This plugin is used for tasks such as receiving the Steam payment authorization callback (StartCallbackListenerAsync).
Verify the installation
If the following using directive compiles without errors, the installation is complete.
5. Set price tiers for each product in the Hive Console
To set the price tiers required for Steam payments, see Price tier.
6. Register products in the Hive Console
To register products to sell, see Product registration.
Caution
The Product IDs of the products registered in Steam and the products registered in the Hive Console must match. We recommend using the information entered in the Steam console.