Solved

Stripe Test Mode best practices?

  • 13 January 2022
  • 3 replies
  • 472 views

Badge +4

It’s unclear what the best practice is for managing test mode (especially on Stripe) wrt Rev Cat. In Stripe you have to create a different set of Products (with different IDs) for live vs test mode. Does this mean that I should maintain a separate “test” or “dev” project in Revenue Cat?

I’m wondering if there’s another approach I’ve not yet thought of that may be simpler.

icon

Best answer by sundeep 21 January 2022, 23:03

View original

3 replies

Userlevel 3
Badge +8

Hi @Stephen B,

There are a few different options you can try that I'll share below:

  1. One recommendation is to make two separate Offerings - one that maps to your live products, and one that maps to your test products. You could then override the current (live) Offering with an API call to the test Offering when you want to work in sandbox: https://docs.revenuecat.com/reference#get-offerings 
     
  2. Another general recommendation is to simply have two different RevenueCat apps for sandbox and production. This can be good because it creates greater separation and you can always map your test products with your sandbox RevenueCat app and your live products with your live RevenueCat app.
     
  3. Alternatively, we’ve seen some developers simply attach all of their Stripe product IDs to the correct Entitlement, and ignore the Offerings system. That could simplify things and let you put all of your Stripe products (test and prod) in a single place: https://docs.revenuecat.com/docs/entitlements#3-configure-entitlements
Badge +5

Any better way now available?

 

This works for Stripe but makes Android and Apple testing impossible as they all report to a webhook that is used by both the production and test revenuecat environments. 

Badge

I tried to implement the second approach (2 distinct RC projects), what is not clear for me is how do you connect stripe using stripe connect? The stripe connect button is per user, not per project?

Reply