Setting up RevenueCat for in-app purchases (IAP) can be tricky, especially when it comes to entitlements versus products in App Store Connect. Getting this wrong means live customers may end up paying but receiving nothing.

What Are Entitlements and Products in RevenueCat?

Entitlements are features you give users access to based on their subscriptions, while products are the specific offerings you sell in the app. Properly linking these in RevenueCat ensures that users who pay for a subscription can actually access the features you promote.

How Do I Create Entitlements in RevenueCat?

To create entitlements in RevenueCat, go to your RevenueCat dashboard. Under the Entitlements section, click Add Entitlement. Name each entitlement clearly according to the features of your app. For instance, if you have a premium feature, name it premium_access.

How Do I Set Up In-App Purchases in App Store Connect?

  1. Log in to App Store Connect.
  2. Go to My Apps and select your app.
  3. Click on In-App Purchases under the Features tab.
  4. Add a new in-app purchase, choose the appropriate type (Auto-Renewable Subscription, Non-Renewable Subscription, etc.), and fill in the details.
  5. Make sure to connect this IAP to the corresponding entitlement you created in RevenueCat.
  6. Don’t forget to set the status to Approved after giving all necessary details and verifying.

Why Are My Users Getting Charged but Not Receiving Entitlements?

If users are being charged without receiving access, this usually points to a misconfiguration in either your App Store Connect settings or your RevenueCat project. Check the following:

  • Ensure your IAP is linked to the proper entitlement in RevenueCat.
  • Verify that the entitlement’s product ID in RevenueCat matches the product ID in App Store Connect exactly.
  • Confirm that you've done proper testing in Sandbox before going live.

How Do I Test In-App Purchases with RevenueCat?

To test IAPs, you should set up a Sandbox tester in App Store Connect:

  1. Go to your App Store Connect account settings.
  2. Under the Sandbox section, add a new user.
  3. Use this user's Apple ID to test IAPs on your device.

Make sure to use the Sandbox environment in your app. Monitor the RevenueCat dashboard to see if the purchase was recorded and the entitlements granted.

What Common Mistakes Should I Avoid?

There are a few common pitfalls that may lead to issues:

  • Forget to Enable In-App Purchases: Make sure to enable IAPs in your app's capabilities in Xcode.
  • Mismatch in Product IDs: Double-check for typos in product IDs across RevenueCat and App Store Connect.
  • Not Testing Enough: Simulate various purchase scenarios, including failed transactions. This will help catch issues before your app goes live.
  • Entitlement Misconfiguration: Ensure your entitlements are correctly tied to the products in RevenueCat.

How Do I Fix Failed Purchases after Launch?

If your app has already launched and you start receiving reports of failed purchases:

  • Start by checking your app's logs to see if there are any errors from RevenueCat.
  • Look into the App Store Connect dashboard to see if the IAP products are all still in a valid state.
  • Check and fix any misconfigurations in the RevenueCat dashboard.

Conclusion

Setting up RevenueCat properly involves carefully linking entitlements to in-app products in App Store Connect, thorough testing, and avoiding common mistakes that can frustrate customers. Once you get it right, you should see smooth transactions and happier users. If you run into issues, double-check your configurations on both platforms to identify errors quickly.

Next, implement these steps in your setup and head over to your project to validate the purchase flow with actual user accounts.