In Game Products
Consumables and game passes are created in similar ways but have slightly different use cases!
Last updated
Consumables and game passes are created in similar ways but have slightly different use cases!
Use game passes for persistent one-time purchases:
Unlocking admin passes
Permanent power ups/abilities
Buying houses
Use consumables for products you want people to be able to buy multiple times:
Health potions
Buffs that expire over time
One time in-game coin purchases


Uploading product images is currently restricted to admins only. Please reach out on Developer Support to upload thumbnails

The products list displays the names of all your products along with some helpful items:
The number of sparks spent (and the total number of sales hovering the ? icon)
An estimate of the amount of revenue each generated
The ID of the product (can click to copy to place in your game code for purchasing)
The number of "Grant Failures"
When a user buys a product in your game, we run the ao_purchase_handler function you've defined in your game code.
Your purchase handler will normally grant an item or feature to a player based on which product ID they bought. Return true only after the grant succeeds.
If your purchase handler fails—for example, if their inventory was full and you didn't handle that scenario—return false. It will count as a "grant failure" and be displayed in the Products page on the Creator Portal so you can fix the issue.
Grant failures will be automatically retried each time the player joins until they succeed. Handlers must be safe to run again and must not partly grant a reward before returning false.
If your purchase handler was successful, but for some reason the user lost the item due to a game bug or otherwise, you can re-run the purchase handler for that user by marking the purchase as ungranted in the Editing/Viewing Player Data "Purchases" section. Confirm that replaying the handler will not duplicate the reward first.
Last updated