Payment Validation

All payment events should be of the type hard_purchase (will later be configurable)

Apple App Store

App shared secret (see the apple docs) is optional and is used only with validating auto-renewable subscription receipts. If you are using an app shared secret please paste it in Overview -> Settings -> Payment Tracking

Apple App Store

When you are generating hard_purchase add these attributes:

  • payment_system : iTunes Store (will later be configurable)
  • receipt : the base64 encoded receipt data, as provided by Apple

Google Play Store:

In order to send requests to Google’s API we need to setup JSON Web Tokensetup. Please follow these steps to create a dedicated service account with read permissions to your app’s project:

  1. start off by going into the Google Play Developer Console as the main Administrator of the account (only this role is allowed to perform the following steps).
  2. go to “Settings -> API Access” to link a Google Developer project to this account
  3. if you are new here choose “create new project”.
  4. you will now have more options. Choose “Create Service Account”.
  5. follow the link to the Google Developer Console and your project.
  6. click “Create new client ID”, check Service account to create a new client ID.
  7. this will download a JSON file to your machine, containing the new account’s email and private key, for example “Google Play Android Developer-1423cf43cf3.json
  8. now go back to the play store publisher account and click “done”.
  9. click “grant access” and grant the newly generated user rights to “View Financial Reports” – role Finance

image01

As a last step you need to paste your Google Play Android Developer-1423cf43cf3.json to Overview -> Settings -> Payment Tracking and add package name.

Google Play Store

When you are generating hard_purchase add these attributes:

  • payment_system : Google Play Store (will later be configurable)
  • product_id : text identifier of the purchased product
  • purchase_token : token received by the user’s device after the purchase

Amazon Store

More information about Amazon in-app purchases

In order to use Amazon in-app purchasing you need to generate developer shared secret and paste it in
Overview -> Settings -> Payment Tracking

Amazon Store

When you are generating hard_purchase add these attributes:

  • payment_system : Amazon Store (will later be configurable)
  • user_id : unique identifier of the purchaser, purchaseResponse->userData->userId
  • receipt : unique identifier of the purchase, purchaseResponse->receipt->receiptId or purchaseUpdatesResponse->receipts->receipt->receiptId