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. Note that you must track an event titled "Purchase" (see Tracking Monetization) in your app via the Leanplum SDK to take advantage of this feature.

To enable this, navigate to the App Settings page by clicking on the App Selection menu at the top of the screen, and select Manage Apps (Note: This menu will be accessible from any page of the Leanplum platform).

Once in the App Settings page:

  1. Find the app you wish to enable receipt verification for and click on the Keys & Settings link (Note: This requires your account to have Admin or Member privileges for that team)
  2. Click on the In-App Purchases tab
  3. Set the currency code you wish to use; Leanplum will convert all purchases to this currency
  4. Confirm that the checkbox next to Require receipt on Purchase events is checked
  5. Click Done

in app purchase receipt validation on ios


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 both receipt verification and 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.

Was this article helpful?
Have more questions? Submit a request