This guide shows you how to migrate from Adjust’s Purchase verification SDK to SDK v5’s built-in purchase verification features. The SDK v5 purchase verification workflow is a streamlined approach to purchase verification.
With the Purchase Verification SDK, verification is split into three steps:
Depending on the outcome of the verification, configure an AdjustEvent object and send it to Adjust.
1
AdjustEventadjustEvent=newAdjustEvent("abc123");
2
adjustEvent.setRevenue(6.0, "EUR");
3
adjustEvent.setProductId("product-id");
4
adjustEvent.setTransactionId("transaction-id");
5
adjustEvent.setPurchaseToken("purchase-token"); // Android only
6
adjustEvent.setReceipt("receipt"); // iOS only
7
Adjust.trackEvent(adjustEvent);
In SDK v5, this workflow is simplified. The Adjust.verifyAndTrackAppStorePurchase() and Adjust.verifyAndTrackPlayStorePurchase() methods allow you to send an event to Adjust’s servers and receive the verification status as a callback. Adjust records the event and the verification status automatically.
Guide
Follow the steps in this guide to migrate from the Purchase Verification SDK to SDK v5 built-in purchase verification.
1. Uninstall the Purchase Verification SDK
To get started, uninstall the Adjust Purchase Verification SDK.
2. Remove Purchase Verification SDK code
Once you’ve uninstalled the Adjust Purchase Verification SDK, you must remove all Purchase Verification code from your project.
3. Migrate to SDK v5 purchase verification
Once you’ve removed the existing purchase verification code, you can replace it with SDK v5’s built-in purchase verification methods. There are two ways to verify purchases with the Adjust SDK:
Create an AdjustEvent object that represents your purchase and configure purchase properties for the target store.
Create an AdjustAppStorePurchase (Apple App Store) or AdjustPlayStorePurchase (Google Play Store) object representing the purchase.