Straight to checkout?

Hello. I have set up a site with a members only area that users must pay to view. It has a single pricing plan. Currently when a member signs up, hasn’t paid yet and clicks on a members only page, they see the uneditable
“this page is only for subscribers only” page. Then they have to click on ‘pricing plans’, then get taken to the plans and pricing page where they click ‘select’, then they get to the checkout. I would like them to bypass the above 2 steps and go straight to the checkout. Also for them to go straight to checkout when they sign up. Is this possible with coding?

Hi @sambom1000 ! Yes, it is possible to achieve this behavior with Wix Code. You can use the “onBeforeRequest” event of the “Page” object to check if the user has a valid subscription before allowing them to access the members-only page. If they do not have a valid subscription, you can redirect them to the pricing plans page and pre-select the only available plan. Then, you can use the Wix Pay API to initiate the checkout process automatically. Good luck!

In Wix code, there isn’t a such thing ““onBeforeRequest” event of the “Page” object”.

Also, you can’t pre-select plan using Velo.

Wix Pay API requires Payment ID, which obtained from Wix Pricing Plans Backend > Create Online Order.

Your answer does not help.