Steamworks Documentation
This is called after the user pays for the items in the transaction.
Implementations should call ISteamMicroTxn/FinalizeTxn before attempting to give the user items.

Called by: Web Purchasing



keystringThis is the "Asset Server Key" that you provided in your app's Steam Economy Settings on the partner site.
appiduint3232bit App ID of the application associated with the asset.
steamiduint6464bit Steam ID of the user who is making the purchase.
languagestringISO639-1 language code plus ISO 3166-1 alpha 2 country code of the language to return strings in. Some examples include en_US, de_DE, zh_CN, and ko_KR. Default: en_US
txniduint64The transaction ID that was returned by StartWebAssetTransaction/v0001
sandboxuint32Non-zero if this transaction will use the microtransaction "sandbox" which will not deduct funds from the user's wallet. In this case you should call ISteamMicroTxnSandbox/FinalizeTxn, instead of ISteamMicroTxn/FinalizeTxn. See Microtransactions Implementation Guide for more details.


The output from this method should be encoded in the JSON format.

  • result
    • success - True if the method was successful. If the asset server is returning false, it should set error to a string that explains why.
    • error - A string describing why this call failed. This message will be recorded in the error log, which is available by clicking "Steamworks Settings" from the Steamworks App Landing Page, then Community->Economy.
    • displaytext - An optional localized error message to display to the user.
    • assets - An array of the assets that were generated for the purchase.
      • assetid - The 64-bit ID of the asset.
      • contextid - The 64-bit ID of the context the asset belongs to.

Example Output

{ "result": { "success": true, "displaytext": "Your purchase is complete! Purchased items are now in your inventory.", "assets": [ { "assetid": 103, "contextid": 2 } ] } }