Overview
Square offers a comprehensive platform for managing business operations, with a particular focus on payment processing. Established in 2009, Square has developed a suite of hardware and software solutions primarily catering to small and medium-sized businesses. Its core offerings include Point of Sale (POS) systems, specialized hardware for accepting various payment types, and a range of developer APIs that enable custom integrations for payments, inventory, and customer data management.
The Square API platform is designed to allow developers to embed Square's payment capabilities directly into their own applications, websites, and services. This includes processing credit and debit card payments, managing refunds, and handling subscriptions. Beyond payments, the APIs extend to inventory management, allowing businesses to track stock levels and product details, and customer management, which provides tools for maintaining customer profiles and loyalty programs. The platform is especially suited for businesses requiring integrated solutions for both physical retail locations and online e-commerce operations, providing a unified view of sales and customer interactions. For developers, Square provides a sandbox environment for testing integrations without processing live transactions, along with RESTful APIs that utilize JSON payloads for efficient data exchange.
The platform's versatility means it supports various use cases, from mobile food trucks using Square Readers to larger retail stores leveraging the full POS system and online stores built with Square's e-commerce solutions. Developers can use the available SDKs for languages like Node.js, Python, and Java to streamline the integration process. Square also offers solutions such as Invoices for billing, Virtual Terminal for processing payments from a computer, and Payment Links for simple online transactions without a full e-commerce site. The adherence to PCI DSS Level 1 compliance ensures secure handling of cardholder data, a critical aspect for any payment processor.
Key features
- Payment Processing APIs: Enables developers to accept in-person, online, and in-app payments, including credit cards, debit cards, and digital wallets. Supports one-time payments, recurring subscriptions, and refunds.
- Point of Sale (POS) Solutions: Provides APIs to integrate with Square's POS hardware and software, facilitating transaction management, order processing, and receipt generation for physical retail environments.
- E-commerce Platform: Tools and APIs to build and manage online stores, including product catalogs, shopping carts, and checkout flows.
- Inventory Management: APIs for tracking product stock levels, managing product variations, and updating inventory counts across multiple sales channels.
- Customer Management: Features for creating and managing customer profiles, tracking purchase history, and implementing loyalty programs.
- Disputes and Chargebacks API: Allows programmatic access to dispute information and enables businesses to submit evidence for chargeback resolution.
- Developer SDKs: Available for multiple languages including Node.js, Python, Ruby, PHP, Java, and .NET, simplifying API integration and interaction.
- Sandbox Environment: A dedicated testing environment for developers to build and test applications without affecting live accounts or processing real payments.
- PCI DSS Level 1 Compliance: Square maintains the highest level of Payment Card Industry Data Security Standard compliance, ensuring secure transaction processing and data handling.
Pricing
Square offers a transaction-based pricing model, where businesses pay a fee per transaction without monthly fees for basic services. Specific rates vary depending on the transaction type and method. The rates below are current as of 2026-05-28.
| Transaction Type | Fee Structure | Details |
|---|---|---|
| In-person Payments | 2.6% + $0.10 | Applies to payments processed via Square Reader, Square Stand, or Square Terminal. |
| Online Payments | 2.9% + $0.30 | Applies to transactions made through Square Online Store, eCommerce API, or online invoices. |
| Keyed-in / Card on File | 3.5% + $0.15 | Applies to transactions manually entered via Virtual Terminal or manually keyed into the POS app. |
| Custom Pricing | Negotiable | Available for businesses with annual processing volumes over $250,000. |
For more detailed information on specific product pricing and any potential additional fees, refer to the Square pricing page.
Common integrations
- E-commerce Platforms: Integrate with custom online stores or existing platforms using Square's E-commerce API to manage products, orders, and payments.
- Accounting Software: Connect payment and sales data with popular accounting applications for automated reconciliation and financial reporting.
- CRM Systems: Sync customer profiles and purchase history from Square with Customer Relationship Management (CRM) platforms to enhance customer service and marketing efforts.
- Employee Management: Integrate with payroll and team management solutions to streamline scheduling, time tracking, and compensation based on sales data.
- Booking and Scheduling Systems: For service-based businesses, integrate Square payments directly into booking platforms to process deposits and full payments at the time of reservation.
- Custom Business Applications: Developers can build bespoke solutions leveraging Square's APIs for unique operational needs, such as custom inventory flows or specialized reporting dashboards, as demonstrated in Square's application development guide.
Alternatives
- Stripe: A developer-focused payment processing platform known for its flexible APIs and global reach, offering extensive customization options for online and in-app payments.
- PayPal: Offers a wide array of payment solutions, including online checkout, invoicing, and peer-to-peer transfers, with a strong focus on consumer convenience and international transactions. For developers, PayPal provides extensive API documentation for integrating payment services.
- Adyen: A unified commerce platform providing end-to-end payment processing across online, mobile, and in-store channels, targeting larger enterprises and international merchants with advanced fraud prevention. Adyen also publishes detailed online payment integration guides.
Getting started
To begin integrating with Square's APIs, you'll typically start by setting up a developer account and obtaining your API credentials. The following Node.js example demonstrates how to process a payment using the Square SDK, assuming a payment token has already been generated client-side.
const { Client, Environment } = require('square');
// Initialize the Square client
const client = new Client({
environment: Environment.Sandbox, // Use Environment.Production for live transactions
accessToken: process.env.SQUARE_ACCESS_TOKEN, // Your Square access token
});
const { paymentsApi } = client;
async function processSquarePayment(paymentToken, amount, idempotencyKey) {
try {
const requestBody = {
sourceId: paymentToken,
amountMoney: {
amount: BigInt(amount), // Amount in cents (e.g., 100 for $1.00)
currency: 'USD',
},
idempotencyKey: idempotencyKey, // Unique key to prevent duplicate charges
// Additional optional fields can be added here, e.g., locationId, buyerEmailAddress
};
const { result, ...httpResponse } = await paymentsApi.createPayment(requestBody);
console.log('Payment successful:', result.payment.id);
return result.payment;
} catch (error) {
console.error('Error processing payment:', error.result);
throw error;
}
}
// Example usage (replace with actual values from your client-side implementation)
// const myPaymentToken = 'cnon:card-nonce-from-square-sdk';
// const myAmount = 1000; // $10.00
// const myIdempotencyKey = 'unique-request-id-123'; // Generate a unique ID for each request
// processSquarePayment(myPaymentToken, myAmount, myIdempotencyKey)
// .then(payment => console.log('Payment object:', payment))
// .catch(err => console.error('Failed to process payment:', err));
This Node.js example illustrates the basic structure for initiating a payment through Square's API. A payment sourceId, which is typically a nonce generated by a Square client-side SDK (e.g., Web Payments SDK), is passed along with the transaction amount and a unique idempotencyKey. The idempotencyKey is crucial for ensuring that a payment request is processed only once, even if network issues cause the request to be retried. The client library handles the underlying HTTP requests and response parsing, abstracting away much of the complexity. For a complete guide on setting up and processing payments, refer to the Square Payments API overview documentation.