LogoLogo
My AppsLive demoNewsArticles
  • Introduction
  • 📌Product updates: 2025
    • 2024
    • 2023
  • Getting Started
    • Registration
    • Adding a space
    • Adding an app to the space
  • Basic Events & Custom Events
  • Integration
    • Expert Tips
      • What to track
      • Payments & Anti-cheat
      • Check your integration
    • Integration of SDK 2.0+
      • SDK Integration
        • Android
        • iOS
        • macOS
        • Windows
        • Web
          • Web SDK Integration
          • Web SDK Releases
        • Unity
        • Unreal Engine
        • Godot Engine
      • Automatic payment tracking
        • App Store
        • Google Play
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anticheat methods
        • Track sessions
      • Push notifications
        • Android
        • iOS
        • Windows (UWP)
        • Unity
          • Android
          • iOS
          • Windows (UWP/WSA)
        • Unreal Engine
      • A/B testing
        • Description of A/B testing on the SDK side
        • Working with A/B tests in the devtodev interface
        • A/B testing examples
    • Integration of SDK 1.0+ (deprecated)
      • SDK Integration
        • iOS
        • Android
        • Windows 8.1 and 10
        • Web
        • Unity
        • Mac OS
        • Adobe Air
        • UE4
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anti-cheat Methods
      • Push Notifications
        • IOS
        • Android
        • Windows 8.1 and Windows 10
        • Unity
        • Abode Air
        • UE4
    • Test Devices
    • Server API
      • Data API 2.0
      • Subscription API
      • Push API
        • IOS
        • Android
        • Windows UWP
        • Windows
      • Raw Export
      • Labels API
      • Data API
    • Import historical data via API
    • Data Export
      • Data Export to Cloud Storage (BigQuery / Amazon S3)
  • 3rd Party Sources
    • Attribution Trackers
      • AppsFlyer
      • Adjust
      • Branch.io
      • Kochava
      • Tenjin
      • Tune (MAT)
      • Singular
      • Custom postback API
      • Facebook Ads referral decryption
    • App Marketplace Data
      • App Store Connect Stats
      • App Store Subscriptions
      • Google Play Console Stats
      • Google Play Subscriptions
      • AppGallery Connect Stats
    • Ad revenue
      • AdColony
      • AdMob
      • Facebook
      • MoPub
      • Unity Ads
      • Vungle
      • Ad revenue API
    • Cohort export
  • Reports and Functionality
    • Space-related Reports and Functionality
      • Overview
      • Custom dashboards & Reports
      • SQL
        • SQL tips
        • SQL Query examples
      • Audience overlap
    • Project-related Reports and Functionality
      • Overview
        • Real-Time Dashboard
        • Acquisition reports
        • Engagement reports
        • Monetization reports
        • In-game analysis reports
        • Cohort analysis
      • Reports
      • Push Notifications
        • Android Notifications
        • IOS Notifications
        • Windows Notifications
        • Button Templates
      • Predictions
      • Users & Segments
      • Filters
      • A/B Testing
      • Tuning
      • Settings
  • Metrics and Glossary
    • Ad networks metrics
    • Market Metrics
    • Prediction Metrics
    • SDK Metrics
    • Subscription metrics
  • Space Management
  • User Profile Management
  • Limits
  • Scenarios and Best Practices
    • Analytics use cases
    • Match-3
    • MMORPG Games
    • Hyper-Casual games
    • Social Casino
    • RPG games
    • Farming games
    • Non-gaming app
    • Acquisition Example
  • FAQ
    • Identification
    • Raw Data
    • All about data discrepancies
  • Slack
Powered by GitBook
On this page
  • Validation of payments and time adjustments in devtodev SDK for iOS
  • Payments validation
  • Time cheats check
  • Validation of payments and time adjustments in devtodev SDK for Android
  • Payments validation
  • Time cheats check
  • Validation of payments and time adjustments in devtodev SDK for Unity
  • Payments validation
  • Time cheats check

Was this helpful?

Export as PDF
  1. Integration
  2. Integration of SDK 1.0+ (deprecated)
  3. Setting up Events

Anti-cheat Methods

PreviousUser profileNextPush Notifications

Last updated 17 days ago

Was this helpful?

This generation of SDK is deprecated and is no longer supported. Information about the .

Validation of payments and time adjustments in devtodev SDK for iOS

Payments validation

To be protected from fraudulent transactions, we recommend you to use devtodev Anticheat service.

Use this method, and devtodev will check the transaction's validity with the payment platform, and the response will be returned to the application.

[DevToDevCheat verifyPaymentWithCompletion:(void (^)(ReceiptStatus))completionBlock];

The result can take one of the following values:

typedef enum {
    ReceiptValid,
    ReceiptNotValid,
    ReceiptServerError,
    ReceiptInternalError,
    ReceiptSandbox
} ReceiptStatus;

In case of a successful check call the following main SDK method:

[DevToDev realPayment: (NSString *) transactionId withInAppPrice:(float) inAppPrice 
         andInAppName: (NSString *) inAppName andInAppCurrencyISOCode: (NSString *) inAppCurrencyISOCode];

If the transaction hasn’t passed verification, do not perform the Payment event.

We do not recommend to use the result of devtodev anti-cheat verification as a condition for giving or not giving in-game currency or item purchased by a user!

Time cheats check

To check for time cheats call checkTime method every time when the app is being launched

[DevToDevCheat checkTime: (void (^)(TimeStatus status)) completionBlock];

The result can take one of the following values:

typedef enum {
    Valid,
    Forward,
    Rewind
} TimeStatus;

Validation of payments and time adjustments in devtodev SDK for Android

Payments validation

To be protected from fraudulent transactions, we recommend you to use devtodev Anticheat service

Use this method, and devtodev will check the transaction validity with the payment platform, and the response will be returned to the application.

Call following method when GooglePlay returns the transaction to your onActivityResult:

DevToDevCheat.verifyPayment(String receipt, String signature, String publicKey, 
                            OnVerifyListener onVerifyListener);

You can get sharedSecret key here:

  1. Go to the Google Play Developer Console and sign in. Make sure that you sign in to the account from which the application you are licensing is published (or will be published).

  2. In the application details page, locate the Services & APIs link and click it.

  3. In the Services & APIs page, locate the Licensing & In-App Billing section.

Your public key for licensing is given in the Your License Key For This Application field.

The result can take one of the following values:

public enum VerifyStatus {	
                           Valid,
                           Invalid,
                           InternalError,
                           ServerError
                         };

In case of a successful check call following the main SDK method:

DevToDev.realPayment(String pPaymentId, float pInAppPrice, String pInAppName, String pInAppCurrencyISOCode);

If the transaction hasn’t passed verification, do not perform the Payment event.

We do not recommend to use the result of devtodev anti-cheat verification as a condition for giving or not giving in-game currency or item purchased by a user!

Time cheats check

To check for time cheats call checkTime method every time when the app is being launched

DevToDevCheat.verifyTime(OnTimeVerifyListener onTimeVerifyListener);

The result can take one of the following values:

public enum TimeStatus {
                         Valid,
                         Forward,
                         Rewind
                       };

Validation of payments and time adjustments in devtodev SDK for Unity

Payments validation

To be protected from fraudulent transactions, we recommend you to use devtodev Anticheat service.

Use this method, and devtodev will check the transaction validity with the payment platform, and the response will be returned to the application.

1. Call the method for payment verification:

DevToDev.AntiCheat.VerifyReceipt(string receipt, string signature, string publicKey,
                                 OnReceiptVerifyCallback callback);

or if you are using Unity IAP plugin:

DevToDev.AntiCheat.VerifyReceipt(string purchasedProduct, string publicKey, OnReceiptVerifyCallback callback)

where OnReceiptVerifyCallback is the function like this:

public void onReceiptVerifyCallback (DevToDev.ReceiptVerificationStatus status) {
  Debug.Log ("Verification status" + status);
  //TODO put your source here
}

Here's how to find your application's public key for licensing (for Google Play platform only, for other platforms the publicKey is not used):

  1. In the application details page, locate the Services & APIs link and click it.

  2. In the Services & APIs page, locate the Licensing & In-App Billing section. Your public key for licensing is given in the Your License Key For This Application field.

ReceiptVerificationStatus can take one of the following values:

public enum ReceiptVerificationStatus {
  ReceiptValid,
  ReceiptNotValid,
  ReceiptServerError,
  ReceiptSandbox,
  ReceiptInternalError    
};

Don't forget that it is enough to set only receipt field to check the payment on iOS (iTunes) or Windows/Windows Phone (Microsoft Store), and for Android (Google Play) the fields signature and publicKey should be set.

Сore SDK should be initialized prior to the call of VerifyPayment function.

2. In case of an unsuccessful check (ReceiptNotValid result) do not call SDK method RealPayment. In other cases:

DevToDev.Anatylics.RealPayment(string pPaymentId, float pInAppPrice, string pInAppName,
                               string pInAppCurrencyISOCode);

Time cheats check

To check for time cheats call VerifyTime method.

1. Call the method to time verification:

DevToDev.AntiCheat.VerifyTime(OnTimeVerifyCallback callback);

where OnTimeVerifyCallback is the function like this:

public void onTimeVerifyFinished (DevToDev.TimeVerificationStatus status) {
  Debug.Log ("Verification status" + status);
  //TODO put your source here
};

DevToDevTimeVerificationStatus can take one of the following values:

public enum TimeVerificationStatus {
   TimeValid,
   TimeForward,
   TimeRewind
};

Сore SDK should be initialized prior to the call of VerifyTime function.

Go to the and sign in. Make sure that you sign in to the account from which the application you are licensing is published (or will be published).

current version can be found here
Google Play Console