Square Go SDK
Go client library for the Square API. Build powerful payment and commerce solutions with type-safe Go.
Get Started →Overview
The Square Go SDK provides convenient access to the Square API from Go applications. It offers a comprehensive set of client libraries for managing payments, orders, customers, inventory, and more.Installation
Install the SDK and get set up in minutes
Quickstart
Create your first payment in under 5 minutes
API Reference
Explore the complete API surface
Authentication
Learn how to authenticate requests
Key Features
Complete API Coverage
Access all Square APIs through 30+ resource clients including Payments, Orders, Customers, Catalog, and more.
Automatic Pagination
Built-in iterator support makes it easy to work with paginated results without manual cursor management.
Smart Retries
Automatic retry logic with exponential backoff handles transient failures gracefully.
Webhook Verification
Verify webhook signatures to ensure events originate from Square.
Multiple Environments
Seamlessly switch between sandbox and production environments for testing and deployment.
Type Safety
Fully typed request and response models provide compile-time safety and excellent IDE support.
Context-Based Timeouts
Use Go’s context package for fine-grained timeout and cancellation control.
Flexible Configuration
Customize HTTP clients, retry behavior, and request options to fit your needs.
Requirements
This SDK requires Go version 1.18 or higher.Quick Example
Here’s a simple example of creating a payment:What’s Next?
Install the SDK
Get started by installing the Square Go SDK
Follow the Quickstart
Build your first integration step by step
Learn Core Concepts
Understand pagination, retries, and error handling
Explore the API
Browse the full API reference documentation
Support
- GitHub Issues: square/square-go-sdk
- Square Developer Documentation: developer.squareup.com
- Package Documentation: pkg.go.dev/github.com/square/square-go-sdk
