Management URL when subscirbed with Stripe

  • 14 September 2022
  • 8 replies

Badge +3

I've been working on adding Stripe Checkout to my existing app (both Android and iOS) for web checkout. Now I need to add a 'Manage Subscription' button within the app for users to easily navigate to where they can manage their subscription.

I tested subscribing a user with Stripe but the managementUrl returns null. Is this the expected behavior?

If so, it would be nice to make that clear in the documentation.

I have a function which I call to create a Customer Portal Session for the purpose of redirecting users to manage their subscription. I'd be curious to know what is the type of link returned if there is one for the Stripe case because I thought we should be generating a Portal Session through our own backend.

8 replies

Userlevel 5
Badge +7

Hi Calvin,

Yes this is expected, because as you mentioned you need to generate a Portal session first, there is no static management link. I’ve added that callout to the docs.

Badge +6

@Jens Does RevenueCat recommend we use Stripe Customer Portal to allow customers who buy through Stripe to manage their subscription?

I didn’t find any reference to the Stripe customer portal in the RevenueCat documentation.

Userlevel 5
Badge +7

Yes, using the Stripe Customer Portal is a great idea. We will receive webhooks for any changes the customer makes and reflect them in the RevenueCat data.

Badge +6

Thanks @Jens I see Stripe have two options:

I’d assume it makes no difference to RevenueCat which one we use as the webhooks should receive the updates from Stripe either way?

Userlevel 5
Badge +7

Yes, both should work.

Badge +4

@Calvin Cheng what solution did you implement to capture the Stripe customer ID for the portal session creation? Did you capture / store it in your backend/db on account creation via Stripe, or go some other route? Thanks!

Badge +1

I’m also curious how to get the Stripe customer ID ! Should i store it in my back-end? 
It would be nice if this field is saved in RevenueCat during the receipt to access it !

Badge +4

@sebastien-moreaux-774107 I set the stripe customer ID as a custom attribute in Revenuecat.

Then for a user I can fetch this from RC and pass it to the stripe create portal session.