I spent few days reading the doc and watching tutos on how to use Stripe in Firebase to introduce premium content on my website. Except for one thing I don't want to make create a subscription.
I want to make a one-time payment so customers can enjoy a lifetime service.
Using subscriptions with firestore-stripe-payments
extension it's pretty straightforward. When the customer buys something and gets redirected back to the app, the user
custom claims object contains the stripeRole
value equals to whatever you defined in the firebaseRole
metadata on a given product.
But that doesn't seem to be an option for one-time payment, I've tried different values and settings but there is nothing in the custom claims object which can help determine if a user purchased the service or not.
Either I am not doing things correctly or there are actually no way to connect both ends without me having to implement a custom function to forward an indicator to the front.
I thank you for any help.