SDKBOX.IAP Issue with Unfinished Transactions


I’m having an issue with unfinished transactions in and iOS app.

We have a setup where we have consumable items, and we’re doing a server side verification. While testing, one purchase was started, successful and was not finished because of an error in the server verification. Now, I am unable to purchase this item again, when I attempt to, it says that it is already purchased.

What is the proper method to handle unfinished transactions with SDKBOX?

    onSuccess: this.onSuccessHandler.bind(this),
    onFailure: this.onFailureHandler.bind(this),
    onCanceled: this.onCancelledHandler.bind(this),
    onInitialized: this.onInitializedHandler.bind(this),
    onProductRequestSuccess: this.onProductRequestSuccess.bind(this),
    onProductRequestFailure: this.onProductRequestFailure.bind(this),
    onPurchaseHistory: this.onPurchaseHistory.bind(this),
    onConsumed: this.onConsumed.bind(this),
    onRestored: this.onRestored.bind(this),

This is our code to set up the iap plugin. After that I’ve tried getPurchaseHistory() (which appears to do nothing on iOS, it does get the history on Android). I’ve tried requestUpdateTransaction() as well, but nothing happens.

Would appreciate any advice about my situation. And feel free to ask for any more addl information if you need it!


@yinjimmy I am tagging you as I’ve seen you’ve help with previous SDKBOX issues and hope you can help with this one!

Thanks again!


Let’s ask @htlxyz.

Thank you for responding.

I’ve made some progress since my post. I moved the initialization of the iap plugin to much earlier in our app, and that helped with the issue where I wasn’t getting the receipt at all.

I’m still having the issue where I can’t get the information to finish a transaction nor finish that transaction by any means that was interrupted/lost in a previous session.

I’ve tried just explicitly trying to finish the product id I know is purchased but not finished, and nothing happens.

Again, I’ve tried requestUpdateTransaction(), getPurchaseHistory(), and restore() w/o success. Again, this is a consumable item, I’m testing on an iPhone 5S running iOS 12.4.8, using CC 2.4.2 and the latest versions of SDKBOX and it’s plugins.

Thanks again for your help!

have you tried sdkbox.IAP.finishTransaction to finish transaction?
the param productId is correct?
when do you invoke sdkbox.IAP.finishTransaction?

Hi again,

Thank you for the responses.

I’ve been working on this all week, and I’ve made some progress. We had linked some other SDKs into our game, and something along the way seems to have been interfering with the IAP plugin. Starting with a clean build folder, I was able to get the IAP plugin working and getting the receipts at app start.

We’ll have to reimplement those other SDKs, I’ll report back if we discover what exactly is causing problems with the plugin.

Thanks again!