Users able to sign up and access app without paying

Hi there,

My app has a subscription payment that is necessary to be paid before getting entry to the app. I am wondering how I prevent a user signing up then pressing the back button and having access to the whole app without paying.

I currently have a field on the User storing the ID of the payment transaction then on all pages I check to see if 1) the user is logged in and 2) has a payment ID. If not, they are logged out and sent to the index page.

However, this is also logging out users who have successfully paid as well due to the user having to be signed up first to purchase a subscription.

Any help here would be appreciated.

Hi Tom,

I would agree that there needs to be a check on the pages to ensure the field is not empty. But, the only place coming to mind that this error would occur is on the login or purchase page if you have one. I would modify the checks there if you have them on every page except the index page.

Does that help?

-Kevin
Free no-code bootcamp by Airdev

As @AirDev said, you should remove the second check (“has a payment ID”) of your subscription page.

@rpetribu @AirDev

Thanks that seems to solve the issue. Is there a way to assign an error message to these users to ensure they know that they haven’t paid and need to before getting access?

This topic was automatically closed after 70 days. New replies are no longer allowed.