Are purchase receipts available through SDK?

  • 23 November 2021
  • 2 replies
  • 52 views

Badge +6

Hello,

Currently we are trying to obtain purchase receipts (or any required data to do receipt validation) in order to forward the event and keep track of IAPs on Game Analytics (it’s not an anlaytics tool you are seamlessly supporting atm).

Is there any way we can obtain this receipts so we can send the IAP events to GA? We are using RevenueCat Unity SDK.

Thanks!


2 replies

Userlevel 6
Badge +8

Hey @Manel Simon Martínez!

Our SDK doesn’t currently include a method to return receipt data, and we don’t provide exports of raw receipts, but you can fetch receipt data on iOS from StoreKit directly. I’m not sure about finding this data from Unity, but natively in Swift you can do something like:

let receiptUrl = Bundle.main.appStoreReceiptURL
let receiptData = try? Data(contentsOf: receiptUrl)

Then you can do what you need with that data. Does that help?

Badge +6

Thank you @cody for your answer.

At the moment we do not plan to assembly this feature natively, so I guess we won’t be able to get that data into GA for the time being.

Thank you

Reply