Skip to Content
defold-typescript libraries
defold (official)

defold/extension-webmonetization

An HTML5 native extension that integrates the Web Monetization JavaScript API, so a game can detect whether a player has an active payment stream. It registers a webmonetization Lua module with is_monetized, set_listener and EVENT_* constants for the stream state.

Lua API not typed — upstream ships no .script_api, so resolve skips it.

  • GitHub: defold/extension-webmonetization — pinned to 4.0.0 (released while Defold 1.7.0 was current)
    1. Pick a release from defold/extension-webmonetization releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Set payment_pointer in a [webmonetization] section of game.project.
    3. Call webmonetization.is_monetized() or register a listener with webmonetization.set_listener to react to payment events.