Square API
Square API is a comprehensive payment and commerce platform API from Square, Inc. (now Block, Inc.) that enables developers to build custom point-of-sale applications, online payment flows, inventory management systems, subscription billing, and retail commerce solutions. Square provides a deeply integrated suite of commerce APIs covering payments, orders, inventory, customer management, loyalty programs, and employee management that work together to provide a complete retail and services business management platform.
IMPORTANT NOTE FOR NIGERIAN DEVELOPERS: Square does not currently operate in Nigeria and does not support Nigerian merchants registering for Square accounts, processing NGN transactions, or receiving settlements to Nigerian bank accounts. Square operates in the United States, Canada, United Kingdom, Australia, Japan, France, Spain, and Ireland only. Nigerian businesses looking for equivalent payment processing capabilities should use Nigerian-licensed alternatives such as Paystack, Flutterwave, Monnify, or Kora.
Despite not supporting Nigeria directly, Square API is documented here for several relevant reasons. First, Nigerian tech professionals working for international companies, remote contractors, and developers building products for non-Nigerian markets frequently work with Square. Second, Nigerian developers building applications for clients in Square-supported markets need API documentation to understand the integration requirements. Third, the architectural patterns used by Square — particularly their Payments API, Web Payments SDK, and order management system — are studied by Nigerian developers learning payment system design.
The Square Payments API processes card-not-present payments through the Web Payments SDK (a JavaScript library that renders a PCI-compliant card entry form in web browsers) and the In-App Payments SDK (for iOS and Android native apps). These SDKs handle card data capture and tokenization in the browser or app, then pass a payment token to the backend which makes a charge call to the Square Payments API without sensitive card data ever touching the developer's servers. This architecture demonstrates PCI compliance best practices relevant to payment developers globally.
Square Orders API provides comprehensive order lifecycle management: creating orders with line items, modifiers, and taxes, updating order status, applying discounts, processing partial fulfillments, and attaching payments to orders. This orders-centric model — where payments fulfill orders rather than existing independently — is architecturally different from many payment APIs and represents a more complete retail commerce model that connects inventory, pricing, and payment into a unified order record.
Square Inventory API tracks product stock levels across multiple locations, providing real-time inventory counts, adjustment tracking, and low-stock alerting. For developers building multi-location retail management systems in Square-supported markets, the inventory API enables the stock synchronization between physical and online sales channels that prevents overselling and allows accurate availability display.
Square Subscriptions API handles recurring billing, creating subscription plans with billing cadences, trial periods, and pricing tiers, and automatically charging customers on schedule. Subscription webhooks notify the integrating application of billing events, failed payments, and subscription status changes. This recurring billing infrastructure is used by subscription box services, membership businesses, and SaaS products operating in Square markets.
Square Loyalty API builds customer loyalty programs directly into the payment flow, automatically awarding points on eligible purchases, tracking redemption history, and applying loyalty discounts at checkout. For businesses in Square-supported markets wanting to reward repeat customers without separate loyalty program infrastructure, the integrated loyalty system captures purchase data automatically through the normal payment flow.
Nigerian developers can access Square's sandbox environment freely for learning and testing purposes, using test credentials to exercise all API endpoints without processing real payments.