Unaffiliated

Home Documentation & Help
Steamworks Documentation
FinalizeWebAssetTransaction/v0001
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

HTTP Method: POST

Parameters:

NameTypeRequiredDescription
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

Returns

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

Response:
  • 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 under the Economy tab in the App Admin panel on the Steamworks website.
    • 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 } ] } }