Skip to main content
Question

Sandbox Testing Error and Subscription Management Issues

  • 17 July 2024
  • 4 replies
  • 55 views

 

Hello RevenueCat,

We are currently facing two critical issues with our implementation and would greatly appreciate your assistance.

1. Sandbox Testing Error - "Error 8: The Receipt is Not Valid"

During our sandbox testing phase, every single purchase attempt results in the following error: Error 8: The receipt is not valid.

We have tried multiple solutions to resolve this issue, but none have been successful. We are using your Paywall CMP render with React and TypeScript. Below is the relevant code snippet from our implementation:

Code:

return (
  <RevenueCatUI.Paywall
    onPurchaseStarted={onPurchaseStarted}
    onPurchaseCompleted={onPurchaseCompleted}
    onPurchaseCancelled={onPurchaseCancelled}
    onPurchaseError={onPurchaseError}
  />
);

 

The error consistently occurs in the onPurchaseCompleted callback with the following message and moves to onPurchaseError:

{
  "error": {
    "code": 8,
    "message": "The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit.",
    "readableErrorCode": "INVALID_RECEIPT",
    "readable_error_code": "INVALID_RECEIPT",
    "underlyingErrorMessage": "The purchased product was missing in the receipt. This is typically due to a bug in StoreKit."
  },
  "target": 3105
}
 

We have tested this on every iOS device available to us, including 4-5 different devices, and the issue persists across all of them.

2. Issue with Subscription Upgrades and Downgrades

In addition, we are encountering problems with our subscription management. Currently, we are not able to properly transition between different subscription packages. Instead of upgrading or downgrading, we are ending up with both Pro and Premium subscriptions active simultaneously.

Here is a detailed description of the problem:

When a user attempts to upgrade or downgrade their subscription, it should be reflected in both the app stores and RevenueCat. However, at the moment, the transition is only handled by our code and does not reflect correctly in the app stores or RevenueCat. This behavior is incorrect as it should also be reflected in the store's subscription status.

In our project, it is not possible to have two active subscription packages at the same time. The only scenario where this could occur is when a user downgrades from a Pro to a Premium subscription. In this case, the transition should happen only when the Pro subscription expires, and the start date for the Premium subscription should be the expiration date of the Pro subscription.

We would greatly appreciate your assistance in resolving these issues. Could you please provide guidance on how to fix the receipt validation error and properly handle subscription upgrades and downgrades so that they are accurately reflected in both the app stores and RevenueCat?

I’ll appreciate every support.

Best regards,

Noy Leibovich
FullStack Developer
Noyleibo70@gmail.com

This post has been closed for comments

4 replies

Same here,
Please help.

EDIT: because this post is related with other errors than the one we’re experiencing and I cannot delete my post, I’ve decide to simply remove my message.

Userlevel 2
Badge +4

Hi @noy-leibovich-586cf7! Just to confirm, are you using the sandbox or a StoreKit configuration file in your testing? If you’re using the StoreKit configuration file, can you try using a sandbox user? And if you’re currently testing in the sandbox, can you try creating a new sandbox user? With extensive testing, sometimes the receipt can get too large or corrupted and a fresh user will resolve these issues.

For the upgrade/downgrade issue, could you open a support ticket? It’s hard to debug this without looking into your account and how your offerings and entitlements are set up. You can create a support issue here. Thanks!

Badge

Hello @jeffrey_bunn,

Thank you for your reply. I am currently using Sandbox testing. Sometimes it works for 1-2 purchases, but then it stops working again for a few days. We have already created a new sandbox user, and it worked well for one hour, but after that, it stopped working again.