Steam Store Purchasing

Creating In app Purchase for Steam

Setting up your catalog item for sale in Steam is super simple! All you need to do is go to your catalogs and find the catalog item that you wish to sell head to Actions and Configure IAP, but don't forget to press List For Sale as otherwise, this item will not be purchasable.

You can set up multiple prices with different real life currencies, USD is the default.

Redeeming purchases using the Steam Store is split into three stages.

  1. BeginSteamPurchaseRedemption

    This method requires a lot of initial information, such as SteamID of the user attempting to purchase, the currency, the language, and the Catalog Listing Item ID. This in return gives you an Entitlement_id which will be used throughout the flow.

  2. QuerySteamPurchaseRedemption

    This method requires the Entitlement_id which we got from BeginSteamPurchaseRedemption. This function will return a status on the purchase, has the user accepted and paid? Did they cancel? All this information is available here, you should iterate it until a final decision has been made by the user.

  3. FinalizeSteamPurchaseRedemption

    This method also requires the Entitlement_id, this function redeems the purchase on LootLocker, giving the user the asset to their LootLocker Inventory. Calling this method is only possible once QuerySteamPurchaseRedemption returns an "Approved" status.

Redeeming In app Purchase for Player

To be able to make Steam purchases, the game must have working Steam integration, Steam must be launched on the device and the player must own the game.

Follow the links to learn more about languages and currency.

It is recommended to use our Steam Authentication for a better experience for your users.

In this example we used Steamworks.net plugin to get the steamID of the user, as well as the language they're playing in.


CSteamID user = SteamUser.GetUserInfo();
string localLanguage = SteamApps.GetCurrentGameLanguage();
LootLockerSDKManager.BeginSteamPurchaseRedemption(user.ToString(), "USD", localLanguage, "01HRCA5QQBV9P0A57RFK9J073T", (response) =>
{

    if (!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        return;
    }
    entitlementID = response.entitlement_id;

});
LootLockerSDKManager.QuerySteamPurchaseRedemption(entitlementID, (response) =>
{

    if (!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        return;
    }

    if (response.status == LootLocker.LootLockerEnums.SteamPurchaseRedemptionStatus.Approved)
    {
        // Steam purchase is approved by the user and is ready to be redeemed by calling FinalizeSteamPurchaseRedemption
    }

});
LootLockerSDKManager.FinalizeSteamPurchaseRedemption(entitlementID, (response) =>
{
    if (!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        return;
    }

});

Redeeming In app Purchase for Class

To be able to make Steam purchases, the game must have working Steam integration, Steam must be launched on the device and the player must own the game

It is recommended to use our Steam Authentication for a better experience for your users.

In this example we used Steamworks.net plugin to get the steamID of the user.


CSteamID user = SteamUser.GetUserInfo();

LootLockerSDKManager.BeginSteamPurchaseRedemptionForClass(user.ToString(), "USD", "en", "01HRCA5QQBV9P0A57RFK9J073T", (response) =>
{

    if (!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        return;
    }
    entitlementID = response.entitlement_id;

});
LootLockerSDKManager.QuerySteamPurchaseRedemption(entitlementID, (response) =>
{

    if (!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        return;
    }

    if (response.status == LootLocker.LootLockerEnums.SteamPurchaseRedemptionStatus.Approved)
    {
        // Steam purchase is approved by the user and is ready to be redeemed by calling FinalizeSteamPurchaseRedemption
    }

});
LootLockerSDKManager.FinalizeSteamPurchaseRedemption(entitlementID, (response) =>
{
    if (!response.success)
    {
        Debug.Log("error: " + response.errorData.message);
        return;
    }

});

Last updated