Skip to main content

Server-to-Server Purchase Validation

Overview

Server-to-server purchase validation confirms that the purchases your app receives from the Billing SDK are legitimate and prevents fraud. Your client app passes the transaction information to your backend, which then makes a server-to-server call to Aptoide Connect to verify it.

Client-side code

The app sends the Purchase response to your server, through this method:

  • Using the Android Billing SDK directly
    Follow the instructions to implement the client-side code within your Android application using the Android Billing SDK.

This is what the Purchase response will look like:

 {
"packageName": "your.package.name",
"sku": "yourSKU",
"token": "catappult.inapp.purchase.anIdWithNumbersAndLetters",
"developerPayload": "stringBasedDeveloperPayload",
"itemType": "inapp",
"isAutoRenewing": false,
"orderId": "anIdWithNumbersAndLetters",
"signature": "internalAptoideConnectSignature",
"originalJson": {
"orderId ": "anIdWithNumbersAndLetters",
"packageName": "your.package.name",
"productId ": "yourSKU",
"purchaseTime": 123456789,
"purchaseToken": "catappult.inapp.purchase.anIdWithNumbersAndLetters",
"purchaseState": 0,
"developerPayload": "stringBasedDeveloperPayload",
"autoRenewing": false,
"type": "inapp"
}
}

Documentation:

Remote Check

Your server needs to be able to receive the necessary information from your application and send it to our server for validation. It then processes the response from our server and relays the appropriate result back to your application.

Documentation: