Overview
Square offers a modular platform that enables businesses to accept payments across multiple channels and manage various operational aspects from a unified system. Established in 2009, Square initially gained traction with its mobile card readers, democratizing card acceptance for small businesses and independent merchants. Over time, the platform expanded its offerings to include a full suite of point-of-sale (POS) software, online store capabilities, invoicing tools, and developer APIs. This expansion positions Square as a comprehensive business solution, particularly for sectors like retail, food service, and professional services seeking streamlined payment processing and business management.
The Square Payments API allows developers to integrate payment acceptance directly into custom applications, websites, and point-of-sale systems. This includes support for various payment methods such as credit and debit cards, digital wallets, and gift cards. Beyond payment processing, Square's ecosystem provides APIs for managing customer data, inventory, orders, and even employee payroll, enabling businesses to automate workflows and maintain a consistent customer experience across different touchpoints. For instance, developers can use the Orders API to create and manage orders, linking them to inventory levels and customer profiles. The platform also offers a robust sandbox environment for testing integrations, ensuring that custom solutions function correctly before deployment.
Square is designed for businesses that require quick setup for payment acceptance and desire an integrated system to manage their day-to-day operations. Its hardware, ranging from mobile readers to full registers, works seamlessly with its software and APIs, providing a cohesive experience for both merchants and customers. The developer documentation is structured with clear API references and SDKs available in multiple programming languages, aiming to reduce the complexity of integrating payment and business management functionalities. The descriptive API error messages further assist developers in debugging and troubleshooting their integrations, contributing to an efficient development workflow for both new and experienced integrators.
Key features
- Payments API: Enables acceptance of credit/debit cards, digital wallets, and gift cards through custom applications, websites, or in-person. Supports various transaction types including authorizations, captures, refunds, and recurring payments.
- Point of Sale (POS) System: Software and hardware solutions for in-person transactions, inventory tracking, and customer management, adaptable for various business types.
- Online Store: Tools to build and manage e-commerce websites, providing integrated payment processing, inventory synchronization, and order fulfillment capabilities directly through Square's platform.
- Hardware Solutions: A range of devices including mobile card readers, countertop terminals, and full POS registers designed for secure and efficient payment acceptance in physical locations. For example, the Square Reader for contactless and chip payments allows businesses to accept tap, dip, or swipe payments via a mobile device connection Square Reader for Contactless and Chip.
- Invoicing: Create, send, and track professional invoices, allowing customers to pay online or through stored payment methods.
- Inventory Management: Track stock levels, manage product variations, and receive low-stock alerts across online and in-person sales channels.
- Customer Directory: Store customer information, purchase history, and contact details to facilitate targeted marketing and personalized service.
- Team Management and Payroll: Tools to manage employee schedules, track time, and process payroll, integrating with sales data for comprehensive business oversight.
- Developer SDKs: Software Development Kits available for Java, PHP, Python, Ruby, C#, and Node.js to simplify API integration Square SDK documentation.
Pricing
Square's pricing model is primarily transaction-based, with no monthly fees for basic processing. Advanced features or specific software subscriptions may incur additional monthly costs. All rates are as of May 2026.
| Transaction Type | Fee Structure | Details |
|---|---|---|
| In-person (tap, dip, swipe) | 2.6% + 10¢ | Applies to transactions processed using Square hardware like readers or registers. |
| Online payments | 2.9% + 30¢ | Applies to transactions processed through Square Online Store, Square APIs, or digital invoices. |
| Card-on-file or manually entered | 3.5% + 15¢ | Applies to transactions where card details are entered manually or a stored card is used without physical presence. |
| Virtual Terminal | 3.5% + 15¢ | Applies when using Square's Virtual Terminal feature to process payments from a computer Square USA Pricing Page. |
Common integrations
- E-commerce Platforms: Integrations with platforms like WooCommerce and Magento using Square's APIs to synchronize product catalogs, inventory, and orders Square e-commerce integrations guide.
- Accounting Software: Connections to QuickBooks Online and Xero for automated syncing of sales, refunds, and expense data Square accounting integrations.
- Restaurant Management Systems: Integrations with specialized POS systems for restaurants, supporting table management, kitchen display systems, and online ordering.
- CRM Systems: Linking with customer relationship management platforms to leverage customer data captured through Square for marketing and customer service initiatives.
- Third-party Applications: Square's extensive API allows for custom integrations with various business applications, enabling tailored solutions for specific operational needs Square API reference documentation.
Alternatives
- Stripe: Offers a developer-focused platform for online and in-person payments, known for its extensive API and global reach. Stripe's platform is often chosen by businesses requiring highly customizable payment flows and advanced subscription management capabilities, though it also caters to in-person payments via Stripe Terminal Stripe Terminal details.
- PayPal: Provides a widely recognized payment gateway and digital wallet solutions, suitable for online transactions and peer-to-peer payments, with various APIs for integration into e-commerce sites PayPal API overview.
- Toast: A specialized point-of-sale and restaurant management system tailored specifically for the food service industry, offering features like online ordering, delivery, and loyalty programs.
- Adyen: A global payment platform that supports a wide range of payment methods and channels, often favored by larger enterprises for its international capabilities and unified commerce approach. Adyen offers a single platform for processing payments across online, mobile, and in-store channels, which can simplify reconciliation for businesses operating globally Adyen Online Payments documentation.
Getting started
To get started with the Square Payments API, you typically create an application in the Square Developer Dashboard, obtain your access token, and then use one of the SDKs to make API calls. The following example demonstrates creating a customer and a payment using the Python SDK.
from square.client import Client
# Replace with your actual Square access token and environment
client = Client(
access_token='YOUR_ACCESS_TOKEN',
environment='sandbox' # or 'production'
)
# Create a customer
def create_customer(email_address, given_name, family_name):
body = {
"idempotency_key": "customer-" + str(uuid.uuid4()),
"given_name": given_name,
"family_name": family_name,
"email_address": email_address
}
try:
result = client.customers.create_customer(body)
if result.is_success():
return result.body['customer']['id']
else:
print(f"Error creating customer: {result.errors}")
return None
except Exception as e:
print(f"An error occurred: {e}")
return None
# Create a payment using a customer ID and a predefined amount
def create_payment(customer_id, amount_money):
body = {
"source_id": "cnon:card-nonce-ok", # Use a test nonce for sandbox environment
"idempotency_key": "payment-" + str(uuid.uuid4()),
"amount_money": {
"amount": amount_money, # in the smallest currency unit (e.g., cents)
"currency": "USD"
},
"customer_id": customer_id
}
try:
result = client.payments.create_payment(body)
if result.is_success():
print("Payment successful!")
print(result.body)
else:
print(f"Error creating payment: {result.errors}")
except Exception as e:
print(f"An error occurred: {e}")
import uuid
# Example usage:
customer_email = "[email protected]"
customer_first_name = "John"
customer_last_name = "Doe"
payment_amount_cents = 1000 # $10.00
new_customer_id = create_customer(customer_email, customer_first_name, customer_last_name)
if new_customer_id:
print(f"Customer created with ID: {new_customer_id}")
create_payment(new_customer_id, payment_amount_cents)
This Python example showcases how to programmatically create a customer record and then process a payment associated with that customer. The idempotency_key is crucial for preventing duplicate transactions in case of network issues or retries, a common practice in reliable API design Square Idempotency Best Practices. Developers should replace YOUR_ACCESS_TOKEN with a valid access token obtained from their Square Developer Dashboard and ensure they are operating in the correct environment (sandbox for testing, production for live transactions). The source_id for payments in the sandbox environment typically uses specific test nonces, such as cnon:card-nonce-ok, to simulate successful card transactions without actual financial impact.