Skip to main content
Solved

Sandbox and Production Interaction


Forum|alt.badge.img+3

Working through setting up RC for the first time am using https://docs.revenuecat.com/reference/subscribers to grab a particular user’s entitlements and subscriptions information. Per the docs, I see that the subscriptions payload returns a mapping of product_id to the subscription itself. When testing with a Sandbox account, I see the is_sandbox populates as true which is to be expected.

 

If a user has a sandbox subscription and I then subscribe the same user with a production subscription, what exactly happens? Is this allowed and, if so, how does this affect the final subscriptions payload?

Best answer by Jens

ah yeah, that’s a good point. in that case you will get whatever has the latest expiration date (which will most likely be the production subscription because sandbox subscriptions have accelerated expirations).

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

4 replies

Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 178 replies
  • August 29, 2022

yes, this is allowed, and you would find both subscriptions in the subscriptions payload (one with `is_sandbox` true, and one false)


Forum|alt.badge.img+3
  • Author
  • New Member
  • 2 replies
  • August 29, 2022
Jens wrote:

yes, this is allowed, and you would find both subscriptions in the subscriptions payload (one with `is_sandbox` true, and one false)

But the subscriptions object is a mapping of a product_id to a single subscription object. Example (pardon the formatting):

subscriptions: {
<product_id_1>: {
billing_issues_detected_at: None, 
expires_date: 2022-08-24T19:14:10Z, 
grace_period_expires_date: None, 
is_sandbox: True, 
original_purchase_date: 2022-08-19T17:59:46Z, 
ownership_type: PURCHASED, 
period_type: normal, 
purchase_date: 2022-08-24T19:09:10Z, 
store: app_store, 
unsubscribe_detected_at: None
}, 
<product_id_2>: {
billing_issues_detected_at: None, 
expires_date: 2022-08-29T14:11:13Z, 
grace_period_expires_date: None, 
is_sandbox: True, 
original_purchase_date: 2022-08-19T17:59:46Z, 
ownership_type: PURCHASED, 
period_type: trial, 
purchase_date: 2022-08-29T14:06:13Z, 
store: app_store, 
unsubscribe_detected_at: None
}
}

For this to show up, wouldn’t we need a unique product id?


Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 178 replies
  • Answer
  • August 29, 2022

ah yeah, that’s a good point. in that case you will get whatever has the latest expiration date (which will most likely be the production subscription because sandbox subscriptions have accelerated expirations).


Forum|alt.badge.img+3
  • Author
  • New Member
  • 2 replies
  • August 29, 2022

That’s good to know. Thank you!


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