Solved

Updating user subscription status with backend across testflight and appsore?

  • 11 February 2022
  • 4 replies
  • 124 views

Badge +1

We have a production version of the app on testflight, and i assume users can make free IAP’s with sandbox there and gain premium user status.

When we promote this build to appstore, as its backed by the same environment, users can use their same account on production.

I wanted to know, will revenue cat update our backend to make their account ‘non premium’ again after they open the appstore build of the app? despite using their same user account and backend server that they had sandbox premium on in testflight?

I didnt want a situation where users are non premium in revenue cat, but still marked as premium on our server causing issues.

Thanks

icon

Best answer by joshdholtz 23 February 2022, 16:54

View original

4 replies

Badge +1

can anyone please help with this query? its blocking our integration as we cant predict the behaviour until we ship to app store

Userlevel 3
Badge +5

Hey @JackW!

My apologies on just getting to this! Is your backend using web hooks to get the subscription status of your users when they purchase a subscription? Or is your backend getting that information some other way?

Thanks!

Badge +1

Hey @JackW!

My apologies on just getting to this! Is your backend using web hooks to get the subscription status of your users when they purchase a subscription? Or is your backend getting that information some other way?

Thanks!

yep it is! in the end weve decided to not allow testers to access the production backed build on testflight as we didnt get a response in time. But it would still be good to know

Userlevel 3
Badge +5

Hey @JackW!

Thanks for the quick response! RevenueCat will not update through a webhook because the sandbox and production are two separate products. It seems like one solution here would be:

  1. Store whether the subscription is sandbox or production on your backend (which can be retried through the webhook - https://docs.revenuecat.com/docs/webhooks)
  2. Through the API, determine if running in sandbox and of production and give proper access depending on backend data received through webhook

This is probably not 100% correct but those are the two things that you could match up 😊 Entitlements through the SDK also have a `isSandbox` property so you could use that as well to match things up

On that note, we will be adding some new methods into the SDK to easily determine if running in sandbox and to also filter active entitlements for sandbox or production only. 

Hopefully some of this helps! But if not, please reach out again 🙌

Thanks!

Reply