Tapping into Webstore Order, Catalog, and Payment with iOS

I have just began researching everything with interacting between an iOS application and Square’s API/SDK’s. I’m trying to create an app that incorporates a very similar order system as my web store (made through Square), that will eventually lead to additional features separate from Square’s processing. I’m new to the whole back end side of programming but with a couple examples or being pointed in the right direction I can figure most things out.

In my research it seems that PoS is more for in store applications, while the in app payments are more for customer based mobile applications. I think the in app payments is the correct way of going.

I’m assume you follow the API’s for order and catalog similarly to how the printCurlCommand in the in app payment is structured correct?

Also is there any documentation on how to take a catalog and designate it into an array through swift?

Thank you in advance!

Hi @TFD_DJ welcome to the forums!

You’re correct - POS API/Reader SDK are both meant for in-person payments, while In-App Payments SDK is meant for customer applications (like ordering ahead).

If you’re interested in Orders API and Catalog API, I would suggest taking a look at our documentation or technical reference which will break it down completely on what you can and can’t do.

We do not have any documentation on directly working with Catalog API and Swift, mainly because we do not recommend calling APIs directly from a mobile application, as that would require you to have your private access token on the application itself which would be subject to leaking. We typically recommend that you have a back-end server/service running that would call the APIs, and you would call this server from your Swift application, and return whatever you need from it.

Let me know if you have additional questions, though.

1 Like

Thanks for the reply! I have never used back ends in any of my apps before. Do you have any suggestions where to start on building or using a back end?

I know it’s mentioned in the In-App payment video but do you have any examples on using heroku?

Well, the backend languages we “formally” support (with SDKs), are Java, .NET, Node.js, PHP, Python, and Ruby. With that said, pretty much any language that has the capability of making HTTP requests can be used, though.

I don’t have any strong recommendations on which one to use, but as for learning one, that’s a bit out of my scope unfortunately as that’s a pretty large topic. Heroku is just a tool to quickly (and cheaply) run your backend code on an actual server. You can push/pull code to and from Heroku in a similar way as GitHub, but again that topic is a bit out of scope here.

The quickstart example for In-App Payments is a fully working backend server (built in Node.js), that may point you in the right direction.

Thank you again! I’ll start looking into those

No problem :slight_smile: definitely let me know if you have additional questions. I can try to answer more specific questions if you run into particular problems along the way. Best of luck to you, though!