Skip to main content
Question

How to retrieve stripe customer Id using RC web billing sdk ?

  • October 19, 2025
  • 3 replies
  • 38 views

Forum|alt.badge.img

Hi,

For each transaction of the same customer I get multiple duplicate customers in Stripe that all have the correct rc_customer_id and associated email.

I thought a way to solve was to retrieve the stripe customer ID and pass it during the purchase process but i cant retrieve it from RC web billing sdk.
 

Is there any other way ?

Thanks for you help !

3 replies

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 149 replies
  • October 22, 2025

Hey ​@Mighty_Atom,

When you check the rc_customer_id metadata on those duplicate Stripe customers, are you seeing user IDs that start with $RCAnonymousID:... ?

If so, that could mean that the SDK is creating a new anonymous user for each purchase session. You can also verify this by calling Purchases.getAppUserId() and Purchases.isAnonymous() in your browser console right before making a purchase - if the user ID is different across page refreshes, that's the root cause.

But to try and understand if this is the issue further, could you share:

  1. How you're initializing the SDK (specifically what you're passing as the appUserId in Purchases.configure() ) and whether you're storing/retrieving this value from localStorage or another persistence mechanism
  2. A sample of the rc_customer_id values from 2-3 of those duplicate Stripe customers (if they are anonymous RevenueCat ones or identified by your own side, like a UUID or similar)
  3. A quick snippet of your purchase flow code, particularly the initialization part
  4. Browser console logs showing SDK initialization. You can enable verbose logging with Purchases.setLogLevel(LogLevel.Verbose) before calling configure(), then share the logs from a session where you make a purchase.

You might also find it helpful to compare your implementation against our sample app, particularly how the SDK is initialized with persistent user IDs and the login flow.


Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • October 22, 2025

Hello Guilherme, 

The rc_customer_id I see on the duplicate customers is the app Id that my customer has in RevenueCat. 

So each one of those duplicate customers (in test mode both in stripe and sandbox in RevenueCat) has the same correct rc_customer_id=App_Id.

I will check on your other questions later as I'm not on my computer right now. 

Cheers, 

Léo 

 

 


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 675 replies
  • November 3, 2025

Hi ​@Mighty_Atom just following up if you have had a chance to take a look at the other requested information?