question

JJNCreator avatar image
JJNCreator asked

iOS Restore Purchase Receipt using Unity IAP

Hi PlayFab Community,

I'm making a game for iOS that uses Unity's IAP solution. The game makes a transaction through Unity IAP, and then I send the receipt to Playfab for validation, and that works fine. However, I'm having issues with restoring purchases. Whenever I try to restore purchases, it comes back with a Receipt Already Used error. I've tried sending different kinds of receipts, including transaction receipts and app receipts, and reinstalling the app, but I continue to get this error. What I'm trying to accomplish is to send the actual restore receipt to Playfab. Is there any way I can successfully send a restore receipt through Unity IAP? Any help would be greatly appreciated.

apisunity3dIn-Game EconomyPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andy avatar image
Andy answered

So, our official guidance on iOS purchase restoration is here: https://community.playfab.com/questions/6045/restoring-purchases-multiple-playfab-accounts.html

I've been hearing reports, however, that the current Unity IAP does not properly obtain new iOS purchase receipts in the case of a restore operation. Instead it's just refreshing receipts. This just obtains copies of the original. There's a thread on Unity's forums on this here: https://forum.unity.com/threads/ios-restore-transactions-appears-to-refresh-receipts-rather-than-restore.618988/#post-4145839. You might consider weighing-in there if you're having trouble getting a proper restore receipt via their API.

5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

countinglampposts avatar image countinglampposts commented ·

Unity IAPs do not provide valid restore receipts. It seems like a serious bug that the Unity team isn't doing anything to fix.

0 Likes 0 ·
brandon@uprootstudios.com avatar image brandon@uprootstudios.com countinglampposts commented ·
0 Likes 0 ·
countinglampposts avatar image countinglampposts brandon@uprootstudios.com commented ·

Unity IAPs definitely provide valid receipts for freshly purchased items. But if you look here you will see that there is a bug in Unity IAPs where performing RestoreTransactions() will return the original receipts of the transaction and not the proper restore receipts. This results in an "Receipt already used" error. Ive tested this myself and can verify the bug still exists.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.