Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello!
I am a developer building out a wholesale payment portal landing page on our Shopify storefront, for B2B customers. Basically, the portal will serve two primary functions:
1) Host a search bar on a portal landing page for customers to manually submit invoice number, customer name, or other accepted query parameters to retrieve invoice data, status, due date, etc., from our external ERP API (also installed as a Private App in Shopify)
2) Link customers via a simple Button to a payment gateway via Square where they can pay a custom amount while referencing PO# or Invoice number (*COMPLETE)
As indicated, Step 2 here is complete. What I am unclear on is how Step 1 needs to be constructed on the backend. In order to perform the invoice lookup, I need to perform an API GET request to a external URL / a Private App installed on Shopify (our central ERP system) to retrieve the invoice data dynamically based on user input. Currently, the private app accepts orders and syncs inventory data back and forth for B2C sales, but nothing more.
From what I understand, I may need to run an App Proxy to allow AJAX to call securely to the external URL. That middleman app would capture data, render it, and relay it to the frontend.
If this is the case, can somebody provide insight as to how this is done or where I can find additional information? The API GET request scripts are written, it's just a matter of adapting them into a UI where the customers can pull data on a search. Apologies if this has been asked elsewhere already. Thanks in advance!