Questions tagged [receipt-validation]

For questions concerning the validation of iOS in-app purchase receipts against Apple servers, a recommended means of app billing fraud protection.

212 questions
9
votes
2 answers

Trouble getting the original app version that the user installed (receipt validation)?

I have an app that I recently updated to work with in app purchases. The previous version (paid but with no in app purchases) was 1.0 and the current version is 1.1. As the in app purchase essentially unlocks all features (which were included in the…
kash
  • 151
  • 2
  • 10
8
votes
4 answers

Why one should not call receipt validation endpoint directly

Apple provides an endpoint to validate receipts: https://buy.itunes.apple.com/verifyReceipt and warns against calling the endpoint from the app It is not possible to build a trusted connection between a user’s device and the App Store directly…
Nick
  • 3,205
  • 9
  • 57
  • 108
8
votes
1 answer

Is the receipt at [NSBundle appStoreReceiptURL] still present after an app update

In the production environment if a user makes an in app purchase and then updates to a newer version of an app is the receipt that reflects the in app purchase still present in the bundle? or does it get wiped out by the app update?
techsMex
  • 594
  • 4
  • 16
7
votes
0 answers

How to test for free trial in sandbox?

I have a one year auto-renewable subscription in my app with a three day free trial. According to Apple, while testing in the sandbox, a one year subscription is equivalent to one hour but it says nothing about how long the free trial is. Add to…
Ser Pounce
  • 14,196
  • 18
  • 84
  • 169
7
votes
1 answer

Is there any way to create a sandox-specific shared secret for Apple App Store receipt validation?

I'm getting set up to do validations of App Store in-app purchase receipts from my server, and everything seems to be working fine, except I don't see any way to create separate shared secrets for Apple's Sandbox and Production environments. I'd…
Brian Rak
  • 4,912
  • 6
  • 34
  • 44
7
votes
2 answers

Apple receipt - original_purchase_date has date before app creation

I'm a bit confused with this. So following this approach I got json which contains bunch of decrypted fields. Among them original_purchase_date. What I need is to track if application was purchased before this new version becomes free and I think I…
Alexander
  • 396
  • 1
  • 11
7
votes
1 answer

How to determine the original build or date that app (not in-app purchase) was purchased

My app is currently a paid app. I would like to convert the app to a free app with IAP and grandfather (give all users who paid for the app) the IAP features for free. I thought I could use receipt validation to either (1) determine original…
user3000868
  • 455
  • 4
  • 13
7
votes
1 answer

Returns many transactions on iOS In-App-Purchases receipt validation

My app contains consumable IAP products, returns more than one transactions when I call validation receipt with this code: [[NSBundle mainBundle] appStoreReceiptURL]; Is there any way to return only last transaction? Is it related about restoring…
Gokhan Gultekin
  • 291
  • 5
  • 15
7
votes
1 answer

how to add openssl to a swift project

I am learning how to add in-app purchase receipt validation to my iOS/OSX projects. There is a nice overview here and the WWDC14 has good videos on this topic. Plenty of sample code, but everyone skips one step. How to import the openSSL header. The…
user965972
  • 2,489
  • 2
  • 23
  • 39
6
votes
1 answer

Do I have to verify the receipt for every SKPaymentTransaction for subscriptions?

I am implementing auto-renewable subscriptions in my iOS app. My transaction handling looks something like this pseudocode: func paymentQueue(_queue: SKPaymentQueue, updatedTransactions transactions:[SKPaymentTransaction]) { for (t in…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
6
votes
0 answers

Handling refund notifications for consumable in-app-purchases

According to Apple documentation, to identify the transaction, productId and relevant dates, we should "Find the most-recent transaction for the product_id in the unified_receipt.latest_receipt_info". My question is how do I find out the product_id?…
Nikunj Banka
  • 11,117
  • 16
  • 74
  • 112
6
votes
4 answers

Prevent replay attacks appStoreReceiptURL app receipts

We have a server-side service that we only want to offer to valid users of our paid iOS app. (Note that this is a paid iOS app, not a free app with IAP.) When we use appStoreReceiptURL to check the sandbox app receipt and send it to our server side,…
Dan Fabulich
  • 37,506
  • 41
  • 139
  • 175
6
votes
6 answers

Implementing Receipt Validation in Swift 3

I am developing an iOS app in Swift 3 and trying to implement receipt validation following this tutorial: http://savvyapps.com/blog/how-setup-test-auto-renewable-subscription-ios-app. However, the tutorial seems to have been written using an earlier…
user3726962
  • 333
  • 1
  • 4
  • 17
6
votes
3 answers

iOS Receipt Validation status code 21009: What’s MZInAppCacheAccessException?

I’m validating receipts with the App Store. In very rare instances (~0,5‰), the JSON looks like this: { "exception": "com.apple.jingle.commercelogic.inappcache.MZInAppCacheAccessException", "status": 21009, "environment":…
dakab
  • 5,379
  • 9
  • 43
  • 67
6
votes
0 answers

How to get Notification for auto-renewal subscription with RMStore in iOS

In my iOS app I have used auto-renewal subscription. We need a solution for cross platform. I'm using RMStore in iOS for purchasing product. In current scenario: I am getting latest receipts from didFinishLaunchingWithOptions and validate to…
Vvk
  • 4,031
  • 29
  • 51
1
2
3
14 15