In App Purchase does not work

I read the documentation and it told I had to prepare the product on App Store connect and once it is at the state "Ready to submit" I could access it on a phone where I am connected with an Icloud account in the developper list of the apple development account.

This is what I've done but when I try to fetch in my flutter code the product with the id I set in App Store connect it says "No product found"

Here is where I fetch the product:

 Future purchaseProduct(String productId) async {
    try {
      Set<String> _pIds = {productId};
      final ProductDetailsResponse response =
          await _iap.queryProductDetails(_pIds);
      if (response.productDetails.isEmpty) {
        throw 'Product not found';
      }
      final ProductDetails productDetails = response.productDetails.first;
      final PurchaseParam purchaseParam =
          PurchaseParam(productDetails: productDetails);
      _iap.buyConsumable(purchaseParam: purchaseParam);
    } catch (e) {
      Services.debugLog('Error purchasing product: $e');
      throw e;
    }
  }

I checked the product ID and it does not seems to be the problem. Is there some other steps I need to do ?

I could access it on a phone where I am connected with an Icloud account in the developper list of the apple development account.

I'm not sure what you mean by "in the developer list". The account needs to be a sandbox account. Just using your real Apple account, which is the one that is associated with your developer account, is not sufficient. (If I understand correctly.)

First, you need to create a sandbox account in App Store Connect.

Then, on an actual device, go to Settings > Developer and scroll to the bottom. There's a "Sign In" button below the "SANDBOX APPLE ACCOUNT" heading. Sign in with the email and password of your new sandbox account.

You can then make purchases and refunds in your app on the device.

Try that, and if it doesn't work, come back and tell us exactly what steps you take, and tell us the exact text you see on the screen. As @endecotp said, we don't know what you mean, so being a little clearer would help.

In App Purchase does not work
 
 
Q