Official Square payments Python SDK. Current version: 44.0.1 (Mar 2026). VERSIONING QUIRK: squareup uses date-based versions (44.0.1.20260122) — major version tracks Square API version. Releases every ~4-6 weeks. Install is 'squareup', import is 'square'. Square uses idempotency_key for all payment creation — required, not optional. Amount in smallest currency unit (cents for USD). Test environment uses sandbox credentials with 'sandbox-' prefix.
pip install squareupVerified import paths — ran on the pinned version, not inferred.
Square Python SDK — create payment with test nonce.
pip install squareup; then import square
'idempotency_key': str(uuid.uuid4())
amount_in_cents = int(amount_in_dollars * 100)
if result.is_success(): — not if result.is_success:
Check Square changelog before upgrading: developer.squareup.com/docs/changelog
Sandbox test nonce: 'cnon:card-nonce-ok'. Production: collect via Square Web Payments JS SDK.