I am building a custom checkout application that will use the Square Terminal. I have registered the application on my Square Developer account and followed the tutorial steps to connect the terminal to this application. I want to be able to send an amount of money to charge to my square terminal so that it can complete the transaction on behalf of my app.
I am looking at this documentation developer.squareup.com/reference/square/terminal-api/create-terminal-action
If you go to the above link it gives code example of how to send a transaction in cURL. This code is the following:
-H ‘Square-Version: 2022-06-16’
-H ‘Authorization: Bearer ACCESS_TOKEN’
-H ‘Content-Type: application/json’
It also gives the code to make this request in Ruby, Python, C#, Java, PHP and Node.js. My question is what would the equivalent code look like for Swift?
For context, the app I’m developing is for a supervised self-checkout kiosk. It will run on an Ipad that has access to the internet. My app will determine the final amount to charge and that amount will be sent to the terminal to complete the payment.