question

Greg Quinn avatar image
Greg Quinn asked

App Store Receipt Validation - Working in Sandbox, but Apple review rejecting saying it isn't working.

EDIT : It turns out this issue wasn't occurring on iOS 15.x, but the reviewers were testing on iOS 16, which I managed to reproduce after upgrading to iOS 16. Updating to the latest Playfab SDK seemed to resolve the issue.

I am busy submitting my game to the App Store, and got the following decline reason from Apple in my latest build...


Guideline 2.1 - Performance - App Completeness We found that your in-app purchase products exhibited one or more bugs which create a poor user experience. Specifically, after we purchased the available IAPs they didn’t reflect into the app (no coins added, no gold, etc). Please review the details and resources below and complete the next steps.

Review device details: - Device type: iPad - OS version: iOS 16.3 - List item

Next Steps

When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.


The receipt validation works fine in the sandbox environment, and I tested all my IAPs and they all work as intended.

I have also tested the Distribution build on Test Flight without any issues.

I looked in Data Explorer and I only see successful receipt validations for Sandbox.

Is there a way to see failed receipt validations somehow? I am using Unity, and calling PlayFabClientAPI.ValidateIOSReceipt

apple
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

·
Neils Shi avatar image
Neils Shi answered

It turns out this issue wasn't occurring on iOS 15.x, but the reviewers were testing on iOS 16, which I managed to reproduce after upgrading to iOS 16. Updating to the latest Playfab SDK seemed to resolve the issue.

Has the problem been solved or still exists?

Is there a way to see failed receipt validations somehow?

You can check the failed receipt validations on Data Explorer. Using Kusto language to craft your own query. For more detail, you can refer to Getting started with Data Explorer advanced mode.

 ['events.all'] | limit 100
 | where Timestamp > ago(1d)
 | where FullName_Name == 'player_receipt_validation'

You can see error messages in EventData. 5436-download-2.png

You can also use PlayStream Monitor (located at [Game Manager] -> [Title Overview] -> [PlayStream Monitor]). It is the place that responses fastest to monitor the PlayStream events and you need to keep the webpage open when calling APIs. Events cache will be cleaned after web page is refreshed. 5437-download-3.png


download-2.png (34.3 KiB)
download-3.png (102.0 KiB)
10 |1200

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

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.