Question: I've configured IAP for my project and It seems to work, so my app is live on app store but I've discovered that approximately 30% requests to iTunes returning invalidProductIdentifier for some reason, below is the complete code:

```
class IAP: NSObject, SKProductsRequestDelegate {

    static let sharedInstance = IAP()

    func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) {
        response.invalidProductIdentifiers.forEach() { id in
            //here is the part that could fail sometimes
            print(id)
        }
    }

    //here how I setup IAP
    func canMakePayments() {
        if(SKPaymentQueue.canMakePayments()) {
            var productID = NSSet()
            productID = NSSet(object: "unlock")
            let request: SKProductsRequest = SKProductsRequest(productIdentifiers: productID as! Set<String>)
            request.delegate = self
            request.start()
        }
    }
}

```

And here how I use it from `AppDelegate`:

```
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        IAP.sharedInstance.canMakePayments()
        return true
    }

```

Answer: 
If you receive invalidProductIdentifiers on your test device there may be tons of reasons why this happens. The most frequent cases are:

* app was not reinstalled from scratch before checking: you need to
delete app from device and install it again;
* old product IDs: if you have product IDs that are invalid, they will appear in invalidProductIdentifiers;
* jailbroken device: remove AppSync from Cydia to debug on jailbroken device;
* using provisioning profile that is not associated with explicit App ID.

You can find more reasons [here](https://stackoverflow.com/questions/1041656/iphone-storekit-invalid-product-ids).
Nevertheless invalid product IDs issue on test device doesn't necessary mean that your users experience that problem too.
If you have appstore version of that application in your test device and you are trying to debug that IAP on same device, this may cause this. Please un-install apstore version of app before trying anything.
Second possible problem is, you should check IAP with USB cable plugged in. You cant test it with Ad-hoc deployment.

Also I found a great link to check all possible failures:

<http://troybrant.net/blog/2010/01/invalid-product-ids/>