Type Event
Revision Release 2024.3703
Keywords steam, steamworks, IAP, in-app purchases, microtransaction, microtransactionAuthorization
See also steamworks.addEventListener()


This event occurs when a microtransaction (in-app purchase) has been approved or denied by the currently logged in user.

You can receive these events by adding a listener to the plugin via the steamworks.addEventListener() function.


Steam only supports microtransactions via web APIs and it does not track purchased products. Steam only dispatches events providing the order ID of approved purchases made by the user. The order ID is defined by the app developer when issuing a request via Steam's web APIs and it's up to the app developer to track purchased products via these order IDs. Please see Steam's microtransaction documentation for more details.



local steamworks = require( "plugin.steamworks" )

-- Called when a microtransaction has been approved/denied by user
local function onMicrotransactionAuthorization( event )
    if ( event.authorized ) then
        -- User has made a purchase
        -- It's up to the app developer to finalize purchase with received order ID
        local orderId = event.orderId
        -- User has canceled the purchase

-- Set up a listener to be invoked when a microtransaction has been made
steamworks.addEventListener( "microtransactionAuthorization", onMicrotransactionAuthorization )