Subscription business model implementation on Shiny App


My goal is to create a shiny app that use Auth0 for authentication and Stripe for billing and payment in order to have a subscription based business model.


Hello RStudio Community :wave: I am fairly new to Shiny and R technologies (well, web development in general). With that said, I am developing a Shiny App application which will offer paid subscription models. I plan to use's implementation of this system as an example.

Example of's billing implementation.

I have read about Stripe and how it can help me with this implementation. Furthermore, I am using Auth0 for my user authentication. All of this is running of a EC2 server using Shiny Server.

I went ahead and did the setup process for each service and technology, no issues here. The problem comes when I try to integrate said technologies with one another.

Main Issues

The first issue here has to do with Auth0, I have to know which registered user bought a subscription of mine. To do this, I have read that I can use an ID or Access Token; but I cannot find a way to access said token in a shiny app.

The second issue has to do with Stripe, I need a way to identify the user on Stripe. I was planning to use metadata (which both Auth0 and Stripe support) but in order to do that I need to solve the Auth0 issue first.

Tech Stack

I will really appreciate any help, feedback and references. If you know a stack or use of tech which can help me out solve my issues; or any of you need further context or clarification please let me know.

1 Like

A simple solution is to use:
Wordpress and Stripe and then use iframe to create a hidden link to your shinyapp.

You can also use paid versions

Look at R Shiny package Polished from Tychobra; It is very promising. response and assistance from Andy Merlino is excellent.

Good Luck!

concerning the main issue, it might be easier to use users emails as an identifier (you will need to make it as a required field if you are using social login too).

Otherwise, you can use the unique user identifier returned by the auth0 API, called sub. And pass it to Stripe metadata when creating the customer (the challenge here is that Stripe API doesn't support search by metadata fields).

If all users are suppposed to pay, then it might be possible to do the inverse too, create the Stripe customer, and use the ID to create the auth0 account.

The general process is the following:

  • the user login using auth0 API.
  • when login is OK, you search this customer on Stripe and get his Stripe ID.
  • you check if this customer has a valid subscription using Stripe API.
1 Like

Thanks for the tips :+1:

Thanks for the feedback !

Its interesting seeing other perspectives on this matter. I had something planned; similar to your suggestion. Thanks a lot ! :+1:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.