I am building a custom web app for a client and I have never worked with square before. This web app will be run using a browser on an ipad.
The idea is to accept in-person payments via card (or others that are available by default in addition) and integrate this payment process into the app in the most efficient way.
From what I understand, one of the only options in my use case is to collect information within my web app, call a deep link that opens the square POS app and passes any relevant data.
At that time, the transaction is completed within the POS app using one of the square readers and I am returned to my web app once complete.
Is that summary correct?
If so -
- Which reader do I need to utilize this method? This will always be on iPad with the square POS also installed.
- Is this the best available method for my use case?
Additionally, I would like to make api calls to retrieve/refund past payments. Is this something I could do from within my own web app? Which api would I use to get this information and make these requests?
Thanks!
You have two options with a mobile web browser integration. You can use the Point of Sale API that’s an app switcher. The app will go back an forth to process payments from your app to the Square app. The second and preferred is to use Terminal API. You can build a mobile web POS that makes API calls to Square. The buyer will then be able to pay on the Terminal. Also if your building your solution for processing payments in the US you can get benefits that Point of Sale API doesn’t have available like:
Hi Bryan,
I think we are likely going to stick with the POS api app switcher setup. (client won’t want to pay the $300 for a dozen of the terminal readers since they already have a bunch of other readers)
With that in mind, is it safe to assume that any reader that works with the POS app on ipad will work in the POS api setup?
They have the ones that plug into the 3.5mm jack and the ones that plug into the charging port.
Thanks!
Sounds good! Yes, it will connect to the reader.
Ok great! Regarding the other question -
Can I then call an api from the web app to retrieve transaction data, provide refunds etc? If so, which api?
Thanks again!
Yeah, the Point of Sale API returns a transaction_id
which is also an order_id
. You’ll call the Orders API to get the payment_id
then call the Payments API to get the payment details.
For refunds you’ll use the Refunds API.