skillfed

squareup

squareup v45.0.1.20260715 474.6K downloads/30d#6,453 on PyPI114
Permissive license MIT Active released

What it is and what it does

The squareup library is an official SDK that wraps the Square API, allowing developers to integrate payment processing, customer management, invoicing, and reporting into Python applications. It provides both synchronous and asynchronous clients built on httpx and pydantic, with automatic retries, pagination helpers, and utility functions for webhook verification and reporting queries.

The library handles authentication via API tokens, supports versioned API endpoints, and includes helpers for complex workflows like the Reporting API's polling-based query pattern. It's actively maintained and supports Python 3.8 through 3.15, making it suitable for modern production applications that need to interact with Square's merchant services.

Use it for:

  • Build a payment processing integration for an e-commerce platform using the synchronous client with idempotency keys.
  • Implement webhook handlers to listen for Square events and verify their authenticity using provided utilities.
  • Query aggregated business metrics via the Reporting API using helpers to poll for asynchronous query results.
  • Manage customer records, invoices, and file uploads through the SDK's multipart file support.
  • Scale payment operations with the async client to handle concurrent requests without blocking.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python client library for accessing the Square API, enabling payment processing, customer management, and business operations through synchronous and asynchronous interfaces.

Yes. The library is actively maintained, has no known vulnerabilities, installs with low friction, and is MIT-licensed. It supports Python 3.8 through 3.15 and provides both sync and async interfaces. Install it if you need to integrate Square payments or business operations into a Python application.

Install

squareup on PyPI

pip

pip install squareup

uv

uv add squareup

poetry

poetry add squareup

Installing squareup

Before you install

Low install friction with a pure-wheel distribution. Actively maintained with a recent release (31 days old) and an active repository. Depends on well-established libraries (httpx, pydantic, typing_extensions).

License in practice

MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns.

Quickstart

pip install squareup

from square import Square
import os

client = Square(token=os.environ.get("SQUARE_TOKEN"))
client.payments.create(
    source_id="ccof:GaJGNaZa8x4OgDJn4GB",
    idempotency_key="7b0f3ec5-086a-4871-8f13-3c81b3875218",
    amount_money={"amount": 1000, "currency": "USD"},
    customer_id="W92WH6P11H4Z77CTET0RNTGFW8"
)

Requires Python 3.8 or later and a valid Square API token (typically passed via environment variable).

Verify before relying

  • Whether the SDK's automatic retry behavior (default 2 attempts on 408/429/5XX) is appropriate for your use case.
  • Performance characteristics and rate-limit handling under high-volume payment processing.
  • Webhook signature verification implementation details and security guarantees.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 4 — httpx, pydantic, pydantic-core, typing_extensions
Maintenance actively maintained — 31 days since the last release
Last repo commit
First released
Downloads 474,648/month — #6,453 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: squareup-45.0.1.20260715-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

square api client pythonpayment processing sdksquare payments librarypoint of sale integrationmerchant api clientasync square clientsquare business api
payment-processingasync-supportapi-client

More Python Modules packages