Square API for web apps

Hello,

I am new to the square APIs and I was wondering if there was a way I could use the square API via a web app (electron JS).

Is there a way to use something like raw API requests since the square API SDK is available for web apps?

Is there a way to still use that Node.JS SDK within election JS that I am unaware off? If not, are there any other options or am I just not able to use square at all with web apps?

Hope to hear something back soon!
Jerry

:wave: With Square if your looking to process online payments you can definitely use the Web Payments SDK with our with our Node.JS SDK to process payments. Unfortunately at this time we don’t have an example that uses Electron JS. :slightly_smiling_face:

I’m less looking to process web payments and more so looking to manage the square inventory and adding/removing items.

It would be great if this is possible to do, but if not I could probably find an alternative solution.

Okay, great! You can definitely manage items and inventory with the SDK using a web app with the Inventory API and Catalog API. :slightly_smiling_face:

Awesome, however I am not sure the best way to go about this.

I am new to JS, but have figured out that require is nut supported in a web js file (the file i have attached to a html page).

Would i have to do something special like putting all the code in another js file not connected to the html page and somehow call to those function from the html page?

If you would have any resources you could link to sort of explaining this prosses that would be great.

With Square you’ll want to have a server side for calling our APIs. We don’t have a Node.JS example that works with the Catalog however we do have a Java example that interacts with the Catalog using command line which might be helpful since you’ll be interacting with the Catalog API. :slightly_smiling_face:

I will have a look and get back to you!

Hey!

Update: I set up a API and I successfully have calls going through the backend now, thanks for the help!