question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Receipt Validation

See original GitHub issue

Version of react-native-iap

Version of react-native

7.5.1

Platforms you faced the error (IOS or Android or both?)

iOS

Expected behavior

Received receipt should be valid

Actual behavior

Received receipt is not valid

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

Purchase any product, take the receipt and call Apple’s verifyReceipt API.

If I’m not mistaken, old Apple receipt used to be ewo and now they are MII. The receipt I’m getting from react-native-iap is MIAG which is an invalid receipt ( error 21002 ). Any suggestion on how to fix this ?

( tried to validate via validateReceiptIos and via Postman )

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
pvroosendaalcommented, Dec 16, 2021

Oh right, of course. Thanks again.

2reactions
RocKhalilcommented, Dec 16, 2021

@pvroosendaal I found out what the issue was and forgot to comment here. You’ll get a valid receipt ONLY thought testflight. You have to build the app and push it to TF in order to get it. Even running the app on a real device as release won’t work.

Hope this helps,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validating receipts with the App Store - Apple Developer
An App Store receipt is a binary encrypted file signed with an Apple certificate. In order to read the contents of the encrypted...
Read more >
iOS Receipt Validation – Apple App Store In-App Purchases
To validate purchases, you need to verify receipts on your server or the device. If you work with auto-renewable subscriptions, the App Store...
Read more >
App Store Receipt Validation and verifyReceipt Tool
Simply paste your receipt to validate your receipt with the App Store to decode and debug in-app purchases quickly.
Read more >
Receipt Validation - objc.io
On iOS, the receipt validation can be performed at any time. If the receipt is missing, you can trigger a receipt refresh request...
Read more >
How To Implement Apple Receipt Validation - Apphud
How To Implement Apple Receipt Validation · 1. The customer makes an in-app purchase. · 2. The app store notifies the app about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found