I want to essentially control whether or not each customer (that also must be logged in) can checkout and handle the logic from my shopify app server.
It seems the client can access the checkout page simply by going to mystore.myshopify.com/checkout, but I would like to pass the customer ID and cart items to my app for verification on demand before loading /checkout but I'm not too sure what's the best or recommended approach to do this with Shopify? Of course, I'd like to make sure this can't be bypassed.
I'm still familiarizing with making web apps and Shopify so I greatly appreciate it if anyone can provide some straight forward suggestions. Thanks!
Dallas here from Shopify's Social Care Team.
I have just the solution for you for what you're looking for. If you're wanting customers to only be able to get to the checkout if they have a customer account then you're going to want to create a lock on your website.
Although that isn't something that comes natively to the Shopify platform I did some digging in our app store and I found one that I think should do the trick for you. It's called EasyLockdown.
I also found a really great forum thread from a Shopify user looking for this same thing. One of our employees found an option for them that you might be able to use depending on your Shopify theme and if it has this setting built-in. If you go to your online store customizer under "Checkout" you might find a setting for Manual Login.
It does require a bit of coding so if you're not comfortable with that then I suggest you reach out ... who certainly would be able to add this in for you. In addition, if your theme doesn't have this feature automatically built-in then you might even be able to reach out to the Experts to get them to custom build this for you if the other options don't work or aren't interesting to you.
After you look at those options please let me know if you have any further questions. I am more than happy to see what else I can help you out with when it comes to this.
Thanks for your suggestions! So that app you suggested doesn't allow locking the actual checkout unfortunately, so I did a bit more digging around.
Any other suggestions are welcome of course!
You're right the checkout liquid is locked if the store isn't plus which means you as the merchant wouldn't have access and I also wouldn't have access as Shopify support.
Nothing specifically is coming to mind other than possibly creating a rule in the cart page or on the product page. That would fall a bit outside of my area of expertise as general support, but I think speaking with one of the Shopify Experts could be a great way to brainstorm an idea for this. I can't promise that they will have a solution, but I think that would be the most likely area to find the best next steps for this.
Please let me know if you have any further questions!