react-native-iap
react-native-iap copied to clipboard
Getting 21002 from Apple when verifying transactionReceipt
Please use the Discussion board if you want to get some help. Please use issues to report bugs.
Description
Getting { 'status': 21002 }
responses when calling /verifyReceipt
with transactionReceipt
.
Expected Behavior
/verifyReceipt
should work.
Environment:
- react-native-iap: 12.10.5
- react-native: 0.71.7
- Platforms (iOS, Android, emulator, simulator, device): iOS
To Reproduce Steps to reproduce the behavior:
The sequence flow I use is as follows:
-
requestSubscription
on button click -
purchaseUpdatedListener
gets triggered with apurchase
object - I call
validateReceipt
which is a method that sends the following to my web server:
{
receipt: purchase.transactionReceipt,
platform: Platform.OS,
subscriptionId: purchase.productId,
token: purchase.purchaseToken
}
- My web server makes a call to
/verifyReceipt
with the following request body:
{
"receipt-data": transactionReceipt,
"password": SECRET
"exclude-old-transactions": true,
}
- Apple responds with { "status": 21002 }.
This worked until recently when I upgraded expo, react native and react-native-iap.