![]() |
LootLocker Unity SDK 8.0.0
Game backend SDK for Unity
|
Initiate and validate purchases — both real-money (IAP) and virtual-currency.
Real-money purchases integrate with first-party payment systems (Apple App Store, Google Play, Steam) to process and server-side validate IAP receipts. Virtual purchases debit a player's Wallet and grant the catalog item. Both flows produce an entitlement inspectable via Entitlements.
See the LootLocker documentation — Real-Money Purchases and Virtual Purchases.
|
inlinestatic |
Activate a rental asset.
This will grant the asset to the player and start the rental timer on the server.
| assetInstanceID | The asset instance ID of the asset to activate |
| onComplete | onComplete Action for handling the response of type LootLockerActivateARentalAssetResponse |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Begin a Steam purchase with the given settings that when finalized will redeem the specified catalog item.
Steam in-app purchases need to be configured for this to work Steam in-app purchases works slightly different from other platforms, you begin a purchase with this call which initiates it in Steams backend While your app is waiting for the user to finalize that purchase you can use QuerySteamPurchaseRedemptionStatus to get the status, when that tells you that the purchase is Approved you can finalize the purchase using FinalizeSteamPurchaseRedemption
| steamId | Id of the Steam User that is making the purchase |
| currency | The currency to use for the purchase |
| language | The language to use for the purchase |
| catalogItemId | The LootLocker Catalog Item Id for the item you wish to purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Begin a Steam purchase with the given settings that when finalized will redeem the specified catalog item for the specified class.
Steam in-app purchases need to be configured for this to work Steam in-app purchases works slightly different from other platforms, you begin a purchase with this call which initiates it in Steams backend While your app is waiting for the user to finalize that purchase you can use QuerySteamPurchaseRedemptionStatus to get the status, when that tells you that the purchase is Approved you can finalize the purchase using FinalizeSteamPurchaseRedemption
| classId | Id of the class to make the purchase for |
| steamId | Id of the Steam User that is making the purchase |
| currency | The currency to use for the purchase |
| language | The language to use for the purchase |
| catalogItemId | The LootLocker Catalog Item Id for the item you wish to purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Cancel an ongoing async purchase polling process.
| processGuid | The Guid returned by InitiateAndPollAsyncPurchaseCatalogItems or InitiateAndPollAsyncPurchaseSingleCatalogItem |
|
inlinestatic |
Create a Stripe Checkout session for a catalog item.
This initiates a Stripe-hosted checkout flow. The response contains a checkout_link — open it in a browser or webview so the player can complete the payment on Stripe's hosted checkout page. The response also contains an entitlement_id which can be used to track the purchase progress via the entitlements endpoint.
Stripe in-app purchases must be configured in the LootLocker dashboard for this to work.
| catalogItemId | The ULID of the catalog item to purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Finalize a started Steam Purchase and subsequently redeem the catalog items that the entitlement refers to.
The steam purchase needs to be in status Approved for this call to work
| entitlementId | The id of the entitlement to finalize the purchase for |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Get the status of an async purchase.
| entitlementId | The entitlement id returned when initiating the async purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Initiate an async purchase of one or more catalog items and automatically poll until it reaches a terminal state.
While pending, onStatusUpdate (if provided) is called each poll. When active, failed, timed out, or cancelled, onComplete is called.
| walletId | The id of the wallet to use for the purchase |
| items | The catalog items with quantities to purchase |
| onStatusUpdate | Optional: Called on each poll while the purchase is pending |
| onComplete | Called when the purchase reaches a terminal state |
| pollingIntervalSeconds | Optional: How often to poll in seconds (minimum 1) |
| timeoutAfterMinutes | Optional: How many minutes before the process times out |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Initiate an async purchase of a single catalog item and automatically poll until it reaches a terminal state.
While pending, onStatusUpdate (if provided) is called each poll. When active, failed, timed out, or cancelled, onComplete is called.
| walletId | The id of the wallet to use for the purchase |
| itemId | The catalog listing id of the item to purchase |
| quantity | The quantity of the item to purchase |
| onStatusUpdate | Optional: Called on each poll while the purchase is pending |
| onComplete | Called when the purchase reaches a terminal state |
| pollingIntervalSeconds | Optional: How often to poll in seconds (minimum 1) |
| timeoutAfterMinutes | Optional: How many minutes before the process times out |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Initiate an async purchase of one or more catalog items using a specified wallet.
The async purchase flow uses a dedicated endpoint and returns an entitlement_id to poll for status. Use InitiateAndPollAsyncPurchaseCatalogItems for an automatic polling experience.
| walletId | The id of the wallet to use for the purchase |
| items | The catalog items with quantities to purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Initiate an async purchase of a single catalog item using a specified wallet.
The async purchase flow uses a dedicated endpoint and returns an entitlement_id to poll for status. Use InitiateAndPollAsyncPurchaseSingleCatalogItem for an automatic polling experience.
| walletId | The id of the wallet to use for the purchase |
| itemId | The catalog listing id of the item to purchase |
| quantity | The quantity of the item to purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Purchase one or more catalog items using a specified wallet.
| walletId | The id of the wallet to use for the purchase |
| itemsToPurchase | A list of items to purchase along with the quantity of each item to purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Purchase one catalog item using a specified wallet.
| walletID | The id of the wallet to use for the purchase |
| itemID | The id of the item that you want to purchase |
| quantity | The amount that you want to purchase the item |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
This will give you the current status of a purchase.
These statuses can be returned; open - The order is being processed closed - The order have been processed successfully refunded - The order has been refunded canceled - The order has been canceled failed - The order failed
| assetId | The ID of the asset to check the status for |
| onComplete | onComplete Action for handling the response of type LootLockerPurchaseOrderStatus |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Check the Steam Purchase status for a given entitlement.
Use this to check the status of an ongoing purchase to know when it's ready to finalize or has been aborted or use this to get information for a completed purchase
| entitlementId | The id of the entitlement to check the status for |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Redeem a purchase that was made successfully towards the Apple App Store for a class that the current player owns.
| transactionId | The id of the transaction successfully made towards the Apple App Store |
| classId | The id of the class to redeem this transaction for |
| onComplete | onComplete Action for handling the response |
| sandboxed | Optional: Should this redemption be made towards sandbox App Store |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Redeem a purchase that was made successfully towards the Apple App Store for the current player.
| transactionId | The id of the transaction successfully made towards the Apple App Store |
| onComplete | onComplete Action for handling the response |
| sandboxed | Optional: Should this redemption be made towards sandbox App Store |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Redeem a purchase that was made successfully towards the Epic Store for a class that the current player owns.
| accountId | The Epic account id of the account that this purchase was made for |
| bearerToken | This is the token from epic used to allow the LootLocker backend to verify ownership of the specified entitlements. This is sometimes referred to as the Server Auth Ticket or Auth Token depending on your Epic integration. |
| entitlementIds | The ids of the purchased entitlements that you wish to redeem |
| sandboxId | The Sandbox Id configured for the game making the purchase (this is the sandbox id from your epic online service configuration) |
| classId | The id of the class to redeem this purchase for |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional: Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Redeem a purchase that was made successfully towards the Epic Store for the current player.
| accountId | The Epic account id of the account that this purchase was made for |
| bearerToken | This is the token from epic used to allow the LootLocker backend to verify ownership of the specified entitlements. This is sometimes referred to as the Server Auth Ticket or Auth Token depending on your Epic integration. |
| entitlementIds | The ids of the purchased entitlements that you wish to redeem |
| sandboxId | The Sandbox Id configured for the game making the purchase (this is the sandbox id from your epic online service configuration) |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional: Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Redeem a purchase that was made successfully towards the Google Play Store for a class that the current player owns.
| productId | The id of the product that this redemption refers to |
| purchaseToken | The token from the purchase successfully made towards the Google Play Store |
| classId | The id of the class to redeem this purchase for |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Redeem a purchase that was made successfully towards the Google Play Store for the current player.
| productId | The id of the product that this redemption refers to |
| purchaseToken | The token from the purchase successfully made towards the Google Play Store |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Refund one or more entitlements by their IDs.
Submits a refund request for the specified entitlement IDs. Assets associated with the entitlements will be removed from the player's inventory where possible, the original purchase currency will be credited back, and any currency rewards tied to the entitlement will be clawed back. The response includes details on what was reversed and any warnings for items that could not be fully reversed.
| entitlementIds | The IDs of the entitlements to refund |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
|
inlinestatic |
Retry a failed async purchase.
| entitlementId | The entitlement id of the failed purchase |
| walletId | The id of the wallet to use for the retry |
| items | The catalog items with quantities from the original purchase |
| onComplete | onComplete Action for handling the response |
| forPlayerWithUlid | Optional : Execute the request for the specified player. If not supplied, the default player will be used. |
Functions | |
| static void | LootLocker.Requests.LootLockerSDKManager.PollOrderStatus (int assetId, Action< LootLockerPurchaseOrderStatus > onComplete, string forPlayerWithUlid=null) |
| This will give you the current status of a purchase. | |
| static void | LootLocker.Requests.LootLockerSDKManager.ActivateRentalAsset (int assetInstanceID, Action< LootLockerActivateRentalAssetResponse > onComplete, string forPlayerWithUlid=null) |
| Activate a rental asset. | |
| static void | LootLocker.Requests.LootLockerSDKManager.LootLockerPurchaseSingleCatalogItem (string walletID, string itemID, int quantity, Action< LootLockerPurchaseCatalogItemResponse > onComplete, string forPlayerWithUlid=null) |
| Purchase one catalog item using a specified wallet. | |
| static void | LootLocker.Requests.LootLockerSDKManager.LootLockerPurchaseCatalogItems (string walletId, LootLockerCatalogItemAndQuantityPair[] itemsToPurchase, Action< LootLockerPurchaseCatalogItemResponse > onComplete, string forPlayerWithUlid=null) |
| Purchase one or more catalog items using a specified wallet. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RedeemAppleAppStorePurchaseForPlayer (string transactionId, Action< LootLockerResponse > onComplete, bool sandboxed=false, string forPlayerWithUlid=null) |
| Redeem a purchase that was made successfully towards the Apple App Store for the current player. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RedeemAppleAppStorePurchaseForClass (string transactionId, int classId, Action< LootLockerResponse > onComplete, bool sandboxed=false, string forPlayerWithUlid=null) |
| Redeem a purchase that was made successfully towards the Apple App Store for a class that the current player owns. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RedeemGooglePlayStorePurchaseForPlayer (string productId, string purchaseToken, Action< LootLockerResponse > onComplete, string forPlayerWithUlid=null) |
| Redeem a purchase that was made successfully towards the Google Play Store for the current player. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RedeemGooglePlayStorePurchaseForClass (string productId, string purchaseToken, int classId, Action< LootLockerResponse > onComplete, string forPlayerWithUlid=null) |
| Redeem a purchase that was made successfully towards the Google Play Store for a class that the current player owns. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RedeemEpicStorePurchaseForPlayer (string accountId, string bearerToken, List< string > entitlementIds, string sandboxId, Action< LootLockerResponse > onComplete, string forPlayerWithUlid=null) |
| Redeem a purchase that was made successfully towards the Epic Store for the current player. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RedeemEpicStorePurchaseForClass (string accountId, string bearerToken, List< string > entitlementIds, string sandboxId, int classId, Action< LootLockerResponse > onComplete, string forPlayerWithUlid=null) |
| Redeem a purchase that was made successfully towards the Epic Store for a class that the current player owns. | |
| static void | LootLocker.Requests.LootLockerSDKManager.BeginSteamPurchaseRedemption (string steamId, string currency, string language, string catalogItemId, Action< LootLockerBeginSteamPurchaseRedemptionResponse > onComplete, string forPlayerWithUlid=null) |
| Begin a Steam purchase with the given settings that when finalized will redeem the specified catalog item. | |
| static void | LootLocker.Requests.LootLockerSDKManager.BeginSteamPurchaseRedemptionForClass (int classId, string steamId, string currency, string language, string catalogItemId, Action< LootLockerBeginSteamPurchaseRedemptionResponse > onComplete, string forPlayerWithUlid=null) |
| Begin a Steam purchase with the given settings that when finalized will redeem the specified catalog item for the specified class. | |
| static void | LootLocker.Requests.LootLockerSDKManager.QuerySteamPurchaseRedemption (string entitlementId, Action< LootLockerQuerySteamPurchaseRedemptionStatusResponse > onComplete, string forPlayerWithUlid=null) |
| Check the Steam Purchase status for a given entitlement. | |
| static void | LootLocker.Requests.LootLockerSDKManager.FinalizeSteamPurchaseRedemption (string entitlementId, Action< LootLockerResponse > onComplete, string forPlayerWithUlid=null) |
| Finalize a started Steam Purchase and subsequently redeem the catalog items that the entitlement refers to. | |
| static void | LootLocker.Requests.LootLockerSDKManager.InitiateAsyncPurchaseSingleCatalogItem (string walletId, string itemId, int quantity, Action< LootLockerAsyncPurchaseInitiatedResponse > onComplete, string forPlayerWithUlid=null) |
| Initiate an async purchase of a single catalog item using a specified wallet. | |
| static void | LootLocker.Requests.LootLockerSDKManager.InitiateAsyncPurchaseCatalogItems (string walletId, LootLockerCatalogItemAndQuantityPair[] items, Action< LootLockerAsyncPurchaseInitiatedResponse > onComplete, string forPlayerWithUlid=null) |
| Initiate an async purchase of one or more catalog items using a specified wallet. | |
| static void | LootLocker.Requests.LootLockerSDKManager.GetAsyncPurchaseStatus (string entitlementId, Action< LootLockerAsyncPurchaseStatusResponse > onComplete, string forPlayerWithUlid=null) |
| Get the status of an async purchase. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RetryAsyncPurchase (string entitlementId, string walletId, LootLockerCatalogItemAndQuantityPair[] items, Action< LootLockerAsyncPurchaseInitiatedResponse > onComplete, string forPlayerWithUlid=null) |
| Retry a failed async purchase. | |
| static Guid | LootLocker.Requests.LootLockerSDKManager.InitiateAndPollAsyncPurchaseSingleCatalogItem (string walletId, string itemId, int quantity, Action< LootLockerAsyncPurchaseStatusResponse > onStatusUpdate, Action< LootLockerAsyncPurchaseStatusResponse > onComplete, float pollingIntervalSeconds=1.0f, float timeoutAfterMinutes=5.0f, string forPlayerWithUlid=null) |
| Initiate an async purchase of a single catalog item and automatically poll until it reaches a terminal state. | |
| static Guid | LootLocker.Requests.LootLockerSDKManager.InitiateAndPollAsyncPurchaseCatalogItems (string walletId, LootLockerCatalogItemAndQuantityPair[] items, Action< LootLockerAsyncPurchaseStatusResponse > onStatusUpdate, Action< LootLockerAsyncPurchaseStatusResponse > onComplete, float pollingIntervalSeconds=1.0f, float timeoutAfterMinutes=5.0f, string forPlayerWithUlid=null) |
| Initiate an async purchase of one or more catalog items and automatically poll until it reaches a terminal state. | |
| static void | LootLocker.Requests.LootLockerSDKManager.CancelAsyncPurchasePolling (Guid processGuid) |
| Cancel an ongoing async purchase polling process. | |
| static void | LootLocker.Requests.LootLockerSDKManager.RefundByEntitlementIds (string[] entitlementIds, Action< LootLockerRefundByEntitlementIdsResponse > onComplete, string forPlayerWithUlid=null) |
| Refund one or more entitlements by their IDs. | |
| static void | LootLocker.Requests.LootLockerSDKManager.CreateStripeCheckoutSession (string catalogItemId, Action< LootLockerCreateStripeCheckoutSessionResponse > onComplete, string forPlayerWithUlid=null) |
| Create a Stripe Checkout session for a catalog item. | |