Closed ViralGroovy closed 1 month ago
Which Url you are trying to verify receipts? Also your receipts are from sandbox environment or storekit receipts?
@ibraheem88 I am using RNIap.validateReceiptIos() for verification of storekit receipts.
Local storekit receipts cannot be verified by sandbox servers. You need to use sandbox receipt to be able to get a valid response from apple server. validateReceiptIos() uses sandbox servers to validate receipt if you pass second argument as true. Sandbox url is: 'https://sandbox.itunes.apple.com/verifyReceipt'
@ibraheem88 I used now sandbox receipts but still getting same response at a time of verification.
Are you passing true to validateReceiptIos like this:
validateReceiptIos( { receiptBody : receiptBody, isTest: true } )
otherwise it will try to use production servers to validate receipt. Which of course will not work with sandbox receipts.
@ibraheem88 check this now, Now i am getting internal data access error
receiptBody should be of this format:
const receiptBody = { "receipt-data": receipt, "password": "##applesecret", }
@ibraheem88 Already try this one but still getting 21002
Confirm that your receipt is from sandbox environment and also check apple secret. You can verify receipt here: Revenue Cat
@ibraheem88 check
You are not getting the receipt the right way I think which method you are using to get receipt. Send the whole snippet
@ibraheem88 Check the above snippet
All I can say is this status code normally shows when you are trying to validate local storekit receipts.
As far as I know you can only verify sandbox and production receipts.
@ibraheem88 Now I remove the store kit file from the root file and try to purchase using the sandbox account now the issue is when I try to get a subscription list of products time get an empty array of the subscription list.
This is my integration steps
This issue is different. You can follow this issue here: getProducts and getSubscriptions returns empty array There can be a number of things that can go wrong.
Hello Dev, Hope you are doing well
Description
When I try to verify the Receipt, I get a 21002 error code. Error about The data in the receipt-data property was malformed or the service experienced a temporary issue.
Expected Behavior
Below response get from request subscription and then I am trying to verify receipt Screenshots![image](https://github.com/user-attachments/assets/2cdf8d89-9c20-457c-b527-e63669268d3a)
Environment: