Skip to main content
Solved

Updating user subscription status with backend across testflight and appsore?

  • February 11, 2022
  • 4 replies
  • 174 views

Forum|alt.badge.img+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

Best answer by joshdholtz

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!

View original
Did this post help you find an answer to your question?

4 replies

Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • February 15, 2022

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


joshdholtz
RevenueCat Staff
Forum|alt.badge.img+5
  • RevenueCat Staff
  • 92 replies
  • February 23, 2022

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!


Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • February 23, 2022
joshdholtz wrote:

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


joshdholtz
RevenueCat Staff
Forum|alt.badge.img+5
  • RevenueCat Staff
  • 92 replies
  • Answer
  • February 23, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings