Skip to Content
defold-typescript libraries
widgrensitasobi-defold

widgrensit/asobi-defold/asobi.api.iap

asobi in-app purchase verification over REST. A project reaches it as client.iap.

  • GitHub: widgrensit/asobi-defold — pinned to v1.18.1
    1. Pick a release from widgrensit/asobi-defold 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. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as api_iap from "asobi.api.iap"

Functions

verify_apple(client: Client, signed_transaction: string, callback?: HttpCallback)

Verifies an App Store purchase with the server.

Parameters

  • client: Client — The client.
  • signed_transaction: string — The signed transaction the App Store returned.
  • callback?: HttpCallback — Receives the verification, or the error.

verify_google(client: Client, product_id: string, purchase_token: string, callback?: HttpCallback)

Verifies a Google Play purchase with the server.

Parameters

  • client: Client — The client.
  • product_id: string — The product's id.
  • purchase_token: string — The purchase token Google Play returned.
  • callback?: HttpCallback — Receives the verification, or the error.

On this page