Adding receipt verification for in-app purchases

Leanplum allows you to enable server-side receipt verification with the App Store and Google Play for in-app purchase events.

📘

You must track an event titled "Purchase" (see Monetization metrics) in your app via the Leanplum SDK to take advantage of this feature.

To enable receipt verification, navigate to the App Settings page.

From the App Settings page:

  1. Find the app you wish to enable receipt verification for and click on the Keys & Settings button

📘

This requires your account to have Admin or Member privileges for that team

  1. Click on the In-App Purchases tab
  2. Set the Currency code for revenue tracking you wish to use; Leanplum converts all purchases to this currency
  3. Confirm that the checkbox next to Require receipt on "Purchase" events is checked
  4. Click Done

🚧

Note about using receipt verification and our API

Receipt verification allows you to track in-app purchases through our SDK right from the user's device. However, we do not support receipt verification while tracking Purchase events through our API.

So, if you plan to track Purchase events, or send revenue data from your own backend server using our API, we recommend that you use our API for everything and turn receipt verification off. If you do so, you'll need to create a distinct Purchase event for in-app purchases, and then call our API with this event as a parameter to appropriately set in-app revenue. Generally, as a best practice, it is best to send revenue information from a single source.