I use stripe payment links to accept payments and deliver a password to the user, then rely on that password to give access to certain parts of the app.
Here’s what it looks like:
See it deployed here: https://paywall-basic-example.streamlit.app/
Here’s how I used the stripe payment links: