Skip to main content
Solved

Why Restore is NOT rejected when before purchase?


Forum|alt.badge.img+1

This issue only occurs in the iOS production environment. (It does not occur in the sandbox)

I have confirmed it on iOS 14 and 15.

 

I’m using `Purchases.restoreTransactions()`. (cordova-plugin-purchases 2.3.1)

[Log]

```

15:14:27.024184+0900>>[Purchases] - DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.

15:14:28.693200+0900>>[Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/StoreKit/receipt

15:14:28.694566+0900>>[Purchases] - INFO: ℹ️ Parsing receipt

15:14:28.696696+0900>>[Purchases] - INFO: ℹ️ Receipt parsed successfully

15:14:28.697186+0900>>[Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

15:14:28.703572+0900>>[Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST /receipts

15:14:28.703855+0900>>[Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts

15:14:29.316797+0900>>[Purchases] - DEBUG: ℹ️ API request completed with status: POST /v1/receipts 200

15:14:29.325280+0900>>[Purchases] - DEBUG: ℹ️ Serial request done: POST /receipts, 0 requests left in the queue

15:14:29.325684+0900>>[Purchases] - DEBUG: ℹ️ Sending updated PurchaserInfo to delegate.

```

Why do I get `Receipt parsed successfully` if I haven't purchased anything yet?

 

Is it wrong to be able to press the restore button before purchase in the first place?
Is there any way to know the status right after installing the app?

 

I'm sorry for my bad English.

I look forward to hearing from you.

Best answer by sundeep

Hi @Natsuru Shirose! The receipt doesn’t mean that any purchases were made - a receipt is automatically generated on-device as a way to keep track of purchase history. A receipt can contain no transactions. Those messages are just letting you know the SDK captured the receipt successfully.

It’s not wrong to be able to click Restore Purchases before purchases are made - all this will do is download the latest receipt for that user from Apple to make sure the device has all of the history it needs. This helps users maintain their purchase history across devices and app installs. You can read more about why you need this button and where to put it in your app here: 

 

View original
Did this post help you find an answer to your question?

2 replies

sundeep
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 138 replies
  • Answer
  • December 11, 2021

Hi @Natsuru Shirose! The receipt doesn’t mean that any purchases were made - a receipt is automatically generated on-device as a way to keep track of purchase history. A receipt can contain no transactions. Those messages are just letting you know the SDK captured the receipt successfully.

It’s not wrong to be able to click Restore Purchases before purchases are made - all this will do is download the latest receipt for that user from Apple to make sure the device has all of the history it needs. This helps users maintain their purchase history across devices and app installs. You can read more about why you need this button and where to put it in your app here: 

 


Forum|alt.badge.img+1

Hi!

Thank you for reply, @sundeep !

 

Is my understanding of `There should be no problem with restoring before purchase.` correct?

 

Why Purchases.restoreTransactions() stops after output the log of  `DEBUG: ℹ️ Sending updated PurchaserInfo to delegate.` ?

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings