Apple App Store Professional Vocabulary: App Store Receipts

Apple App Store Professional Vocabulary: App Store Receipts

Your server can access the verifyReceipt endpoint to validate app and in-app transaction receipts. Submit a receipt to the App Store to receive a JSON response containing the app information and in-app purchase details in a number of fields that make up the receipt. Each field or combination of fields provides insight that you can use to deliver service and content to the user as you define.

We’re all happy to assume that in order to grow a successful mobile game (or app) you need:

Receipts for auto-renewable subscriptions can grow over time since the renewal transactions stay in the receipt forever. To optimize performance, the App Store may truncate sandbox receipts to remove old transactions. When validating receipts for transactions made in the sandbox environment, consider creating new test accounts instead of reusing old accounts to test subscription purchases.

Receipt Verification Request

verifyReceipt-Send a receipt to the App Store for verification.(https://buy.itunes.apple.com/verifyReceipt)

HTTP Body

requestBody    The JSON contents submitted with the request.

Content-Type: application/json

Response Codes:

200:   OK
responseBody:   Content-Type: application/json

Discussion

Validating with the App Store requires a secure connection between your app and your server, and code on your server to validate the receipt with the App Store. Submit an HTTP POST request with the contents detailed in requestBody using the verifyReceipt endpoint to verify receipts with the App Store. Use the receipt fields in the responseBody to validate app and in-app purchases.

This image has an empty alt attribute; its file name is 02-2.png

Alternate URL for Sandbox Testing

The sandbox URL for verifying receipts is:

https://sandbox.itunes.apple.com/verifyReceipt

As a best practice, always call the production URL for verifyReceipt first, and proceed to verify with the sandbox URL if you receive a 21007 status code.

Resourcing from: App Store Weekly News: Summary of Apple Store and Android Store Hotspots