react-native-iap
react-native-iap copied to clipboard
iOS: This in-app purchase has already been bought.
@hyochan @ospfranco @FallenDestiny @cjpete Can you please let us know so we can release our build it's breaking for our release. we saw other issues but that is old so we create a new one.
we are dealing with product identifiers com.package.tippingX and at a time only 1 transaction. Where X could be 1,2,3,4. Or some time create old receipt so can any one help on that too. RNIap.requestPurchase( tipProductId, false, user_id, user_id ).then(async (purchase) => { props.apicall(params,async()=>{ api call success const result = await RNIap.finishTransaction(purchase, true); // because product is consumable. isConsumable: true console.log("result :::::", result) },async(error)=>{ api call error const result = await RNIap.finishTransaction(purchase, true); // because product is consumable. isConsumable: true console.log("error :::::", error) }); }).catch(async(error)=>{ console.log("error :::::", error) await RNIap.clearTransactionIOS(); })
Version of react-native-iap
"react-native-iap": "^7.5.1"
Version of react-native
"react-native": "0.64.2",
Platforms you faced the error (IOS or Android or both?)
IOS
Expected behavior
Makes a purchase
Actual behavior
Currently, we get This in-app purchase has already been bought.
Tested environment (Emulator? Real Device?)
Real device

Let us know if you need more information.
have the same issue on the build from testflight, not reproduced locally, wondering could it be related to new 15.2 ios, not sure but looks like before I've never seen such issue
Having the same issue on testflight/sandbox, by the way is there any difference between finishtransaction and finishtransactionIOS ?
@ugrdursun we call two RNIAP functions Yes we get issues with TF build and sandbox account First, we call RNIap.clearTransactionIOS() and then request for purchase RNIap.requestPurchase() and after success RNIap.finishTransaction(purchase, true). At first already code has shared.
I have a similar issue in a TestFlight build and I don't call clearTransactionIOS
or finishTransaction
after calling requestPurchase
, nor do I persist any purchase data.
Expected
After getting the transactionId
from the InAppPurchase
object returned by requestPurchase
, the user should be able to purchase the same consumable item again.
Actual
The payment dialog is bypassed and the object containing an old transactionId
from the previous purchase is returned, even after starting a new session.

@hyochan @ospfranco @FallenDestiny @cjpete Hey guys, Any update on this. we have released and we are stuck here.
Any updates on this topic? will the problem be found in the release version?
We are using this library with millions of users and thousands of purchases daily and we are not facing any issue, your problem is likely somewhere else
I have the same problem, any solutions?
@ospfranco Just to be sure, When the clearTransactionIOS function should be called?
@codal-mpawar have you resolved this in some way?
@ugrdursun we call two RNIAP functions Yes we get issues with TF build and sandbox account First, we call RNIap.clearTransactionIOS() and then request for purchase RNIap.requestPurchase() and after success RNIap.finishTransaction(purchase, true). At first already code has shared.
hi @ugrdursun if you are using same build and getting issue only on testflight build then you can try purchasing the product with your apple id which you have added into testflight instead of using sandbox test credentials , i was having the same issue just try it once and let me know 🙂