Quota not retaining and stripe payment not upgrading users

Please, I need help.

My quota is not retained and automatically reset. Whatever quota is used, once logged out and in or switched to view other aspects of my app, the quota used vanishes and never returns.

Also, when users upgrade to pay after successful payment from Stripe to return to my custom domain, it will take users to the local port and show an error message.

please, how can i solve this