PhoneGap iOS In-App-Purchase 3.4.0

Latest stable release of the Phone iOS In-App-Purchase plugin is available for download here.

As usual, the plugin’s version number is aligned with PhoneGap’s version number. All this means for you is that it is safe to use with PhoneGap or Cordova 3.4

What’s new?

Error codes

All errors reported by the plugin are now guaranteed to be one of those:

storekit.ERR_SETUP - Cannot setup the plugin.
storekit.ERR_LOAD - Cannot load IAPs from Apple servers.
storekit.ERR_PURCHASE - Failed to purchase the item
storekit.ERR_LOAD_RECEIPTS - Cannot load receipts.
storekit.ERR_CLIENT_INVALID - Client doesn't support IAP.
storekit.ERR_PAYMENT_CANCELLED - User cancelled the payment.
storekit.ERR_PAYMENT_INVALID - Problem with payment.
storekit.ERR_PAYMENT_NOT_ALLOWED - Payment not allowed.
storekit.ERR_UNKNOWN - Unknown error.


The plugin now verifies that the user is allowed to perform payment, using SKPaymentQueue’s canMakePayments static method. An “ERR_SETUP” error is generated during initialization if this returns false. This should be treated as if In-App-Purchases were not available.

Bugs fixed

The new option “noAutoFinish” that was added in the previous release added a few bugs, mainly with the handling of failed transactions. Hopefully, all of those have been fixed with this release.

error handling

Some errors weren’t reported to javascript.


Thanks to Maxwell Moore that proof read the whole Objective C code and spotted some nasty issues, also to Boston Dell-Vandenberg and Masonicboom for submitting bug fixes.

I’m a consultant and developer for Mobile, Web, Games and Apps projects. I co-founded Fovea 8 years ago.

Posted in Blog
11 comments on “PhoneGap iOS In-App-Purchase 3.4.0
  1. Leo says:

    Hi Jean,

    I received an error, cannot connect to iTunes Store errorCode 4983503, while implementing this IAP plugin with phonegap build.

    please let me know where I can find 4983503 stands for

    thank you

    • Did you try from the Simulator? iTunes Store is available only from actual devices.

      • Tobi says:

        Hi Jean,

        I’m having the same problem no an actual device.



      • Jacse says:

        I have the same problem, from a real device.
        Everything works fine, unless i cancel a purchase – then it throws this error (from Xcode console):
        Error ERR_PAYMENT_CANCELLED Cannot connect to iTunes Store
        Error 4983503 Cannot connect to iTunes Store
        State: PaymentTransactionStateFailed

        Afterwards, I am not able to make a purchase.

  2. Kumar says:

    Hi, What are possible cases if i get error “setupFailed” error. Can i get the details on it. And what should i do to avoid this error.