Unaffiliated

Home Documentation & Help
Steamworks Documentation
QueryRefundAllowed/v0001
TITLE: QueryRefundAllowed/v0001

This is called by Steam when a user is visiting the support site and trying to get more information about an in-game purchase. The response includes the current state of the items involved in a purchase and whether or not each item is currently refundable.

Called by: Steam Refunds

HTTP Method: GET

Parameters:

NameTypeRequiredDescription
appiduint3232bit App ID of the application associated with the purchase. This will be your game's App ID.
steamiduint6464bit Steam ID of the user who made 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
orderiduint64Unique 64-bit ID for order. This is the same order ID that was given to us in the ISteamMicroTxn/InitTxn call.

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 on the Steamworks site.
    • assets - An array of the lineitems purchased.
      • itemtypeid - Game ID number of item. This is the itemid value that was given to us in the ISteamMicroTxn/InitTxn call.
      • allow_refund - This must be true unless the purchased item has been consumed, modified, or transferred.
      • in_inventory - True if the purchasing user still owns the item.
      • bundle - If the item the user purchased is actually a bundle containing more items, set this to true and then also include the items that came out of the bundle as the next entries in the assets array.
      • current_state - A human-readable string of the current state of the item. This string is shown to the user and should be localized if possible. The more specific the better, especially when allow_refund is false. Could be something like "Used to craft another item on March 25th, 2015" or "In your inventory."
      • item_name - The name of the item. This string is shown to the user and should be localized if possible.
      • amount - The quantity of this item that was purchased. All items must have the same id (not applicable if your game does not support our Steam Economy APIs). If multiple items were purchased, but have different id values, then include multiple entries in the assets array instead of using this amount field.

        NOTE: The following fields only apply if your game supports our Steam Economy APIs
      • id - The assetid or the currencyid of the item that was given to the user.
      • contextid - The contextid that the item was placed in.
      • currency - True if id refers to a currencyid.
      • class - An array of game-defined asset class identifiers. This should be the same class that GetAssetClass/v0001 would return.

Example Output

{ "result": { "assets": [ { "itemtypeid": 594, "contextid": 2, "currency": false, "amount": 1, "id": 3837860447, "class": [ { "name": "def_index", "value": "594" }, { "name": "flags", "value": "16" }, { "name": "origin", "value": "2", "instance": true }, { "name": "@tradable after date", "value": "1434493482", "instance": true } ] , "allow_refund": true, "in_inventory": true, "bundle": false, "current_state": "In your inventory", "item_name": "The Phlogistinator" }, { "itemtypeid": 214, "contextid": 2, "currency": false, "amount": 1, "id": 3837860448, "class": [ { "name": "def_index", "value": "214" }, { "name": "flags", "value": "16" }, { "name": "origin", "value": "2", "instance": true }, { "name": "@tradable after date", "value": "1434493482", "instance": true } ] , "allow_refund": true, "in_inventory": true, "bundle": false, "current_state": "In your inventory", "item_name": "The Powerjack" } ] , "success": true } }