Square API - Source Code
Square helps consumers to pay with card in a mobile environment. For a business that prefers to keep all sales information in a settled location, Square Stand is the choice. In contrast, if the enterprise is mobile, Square Reader is the alternative. With the aim to ease commerce, Square offers The Connect API. This application provides HTTP endpoints to retrieve reports for users' payments, refunds, and settlements. It also allows to manage merchant's items. Square Connect API is about point of sale transactions with cards using iPad, iPhone, and Android. Additional resources of transactions, OAuth, and eCommerce are available on Square site.

- Versions
- SDKs (5)
- Articles (4)
- How To(0)
- Source Code(16)
- Libraries(0)
- Developers (0)
- Followers (258)
- Changelog (26)
Sample Source Code (16)
The following is a list of sample source code snippets that matched your search term. Source code snippets are chunks of source code that were found out on the Web that you can cut and paste into your own source code. Whereas most of the sample source code we've curated for our directory is for consuming APIs, we occasionally find something interesting on the API provider side of things. If you know of some sample source code that would be of interest to the ProgrammableWeb community, we'd like to know about it. Be sure to check our guidelines for making contributions to ProgrammableWeb.
Title | Description | |
---|---|---|
![]() | Square Register In Person Payment Android Sample Code by Square | The Square Register In Person Payment Android Sample Code by Square demonstrates how API interaction can assist to process credit card payments. Registration for API Key available at https://docs.connect.squareup.com/articles/register-api-android/#registerapisetup |
![]() | Square Register In Person Payment iOS Swift Sample Code by Square | The Square Register In Person Payment iOS Swift Sample Code by Square demonstrates credit card processing via API. It allows developers to create mobile applications for merchants, by using money tests available on the site. |
![]() | Square Connect v1 Python Sample Code by Square | The Square Connect v1 Python Sample Code by Square presents API interaction, by providing item management, payments report, and webhooks handlers with their respective requests and responses. |
![]() | Square Connect v1 Java Sample Code by Square | The Square Connect v1 Java Sample Code by Square demonstrates how to interact with the API, providing sources for payments reporter, item manager, and webhook handler. Set up includes Maven compile. |
![]() | Square Connect v1 Ruby Sample Code by Square | The Square Connect v1 Ruby Sample Code by Square presents how API interaction can be useful to integrate payment methods and item management into POS terminals. It provides JSON formats to send requests and receive responses in return. |
![]() | Square Connect v1 PHP Sample Code by Square | The Square Connect v1 PHP Sample Code by Square demonstrates API interaction, accessing time management and payments report. Resources include unirest HTTP library and composer. |
![]() | Square Connect OAuth Python Sample Code by Square | The Square Connect OAuth Python Sample Code by Square demonstrates how to access an authentication flow, useful for Square APIs. It enables to link merchants to OAuth, allowing to handle user results. |
![]() | Square Connect OAuth Java Sample Code by Square | The Square Connect OAuth Java Sample Code by Square presents how to access an authentication flow, useful for Square APIs merchant links. Before running the example, developers can set up URL, specify credentials, and compile Maven. |
![]() | Square Connect OAuth Ruby Sample Code by Square | The Square Connect OAuth Ruby Sample Code by Square presents how to access an authentication flow, useful for Square APIs, sending form permissions and result handling to the URL. It requires Sinatra framework and HTTP unirest library. |
![]() | Square Connect OAuth PHP Sample Code by Square | The Square Connect OAuth PHP Sample Code by Square demonstrates how to access an authentication flow, useful for Square APIs. It includes download composer and HTTP unirest library as resources. |
![]() | Square Connect V2 E-Commerce Node.js Sample Code by Square | The Square Connect V2 E-Commerce Node.js Sample Code by Square demonstrates how to integrate eCommerce features into POS devices. It provides standard Javascript front-end implementation. |
![]() | Square Connect V2 E-Commerce Python Sample Code by Square | The Square Connect V2 E-Commerce Python Sample Code by Square presents how to integrate eCommerce features into mobile POS terminals. It provides a running example with credit card number, card CVV, card expiration, and card postal code. |
![]() | Square Connect V2 E-Commerce C# Sample Code by Square | The Square Connect V2 E-Commerce C# Sample Code by Square demonstrates how to integrate eCommerce features into POS devices. Developers can run an available example with credit card number, CVV, card expiration, and card postal code. |
![]() | Square Connect V2 E-Commerce Ruby Rails Sample Code by Square | The Square Connect V2 E-Commerce Ruby Rails Sample Code by Square presents how to integrate eCommerce features into mobile POS systems. Resources include configuration, testing, and running. |
![]() | Square Connect V2 E-Commerce PHP Sample Code by Square | The Square Connect V2 E-Commerce PHP Sample Code by Square demonstrates how to integrate eCommerce features into mobile POS terminals. It includes a payment processing example with a running sample. |
![]() | Square Java Sample Code by Square | The Square Java Sample Code by Square demonstrates how to interact with the API to implement mobile payment features into applications. Code on GitHub shows how to connect with OAuth, set URL, specify credentials, compile with Maven, and run example. |