Nakama Validator

Introduction

The Nakama Validator is used when your game relies on Nakama as an authoritative backend for validating in-app purchases.


Setup

Based on the game status, the requirements differ:

  • If the game is hosted on Lion Studios’ Google Play / App Store accounts, contact your Product Manager so that the Product Manager can collaborate with the QA team to retrieve the credentials and complete the game setup.

  • If the game is hosted on your own Google Play / App Store account, You can follow the steps below for the respective platforms.

    Deliver these keys to your Product Manager so that they can complete the setup.

The Nakama Validator is only available if the Nakama Connector package is installed in your project.

If the Nakama Connector package is installed, then Nakama Validator will be enforced over other Validators.


What the Nakama Validator Does

When the Nakama Validator is enabled:

  • Every purchase is logged as an inapp_purchase event to Lion Analytics.

  • Receipt validation is delegated to your Nakama backend.

  • Nakama determines whether the receipt is valid, invalid, or rejected.

  • Only if the receipt is validated successfully:

    • A native iap_purchase event is fired to Adjust.

  • If the receipt is invalid, duplicated, or fails validation:

    • No revenue event is sent to Adjust.

    • The purchase is still recorded internally with a corresponding ValidationStatus.

  • The validation result is returned to the client and recorded with the purchase event.

This ensures that purchase trust and enforcement are controlled entirely by your backend logic.


Validation Outcomes

Depending on the validation result returned by Nakama, the following behaviour applies:

Valid receipt

  • inapp_purchase event is logged with ValidationStatus = Success

  • Adjust receives the iap_purchase revenue event

  • The purchase is treated as trusted by the system

Invalid or fraudulent receipt

  • inapp_purchase event is logged with ValidationStatus = Failure

  • The purchase is flagged as invalid or fraudulent

Validation error

  • inapp_purchase event is logged with ValidationStatus = Error

  • Indicates a failure communicating with Nakama or an unexpected server error

These outcomes allow internal analytics to retain full visibility while enforcing backend-driven validation rules.

Last updated

Was this helpful?