Skip to main content

Official Python SDK for the SumUp API.

Project description

SumUp Python SDK

pypi Documentation CI Status pypi download License

IMPORTANT: This SDK is under development. We might still introduce minor breaking changes before reaching v1.

The Python SDK for the SumUp API.

Installation

Install the latest version of the SumUp SDK:

pip install sumup
# or
uv add sumup

Usage

Synchronous Client

import os

from sumup import Sumup

client = Sumup(api_key="sup_sk_MvxmLOl0...")

# Get merchant profile
merchant = client.merchants.get(merchant_code=os.environ["SUMUP_MERCHANT_CODE"])
print(f"Merchant: {merchant.merchant_code}")

Async Client

import asyncio
import os

from sumup import AsyncSumup

async def main():
    client = AsyncSumup(api_key="sup_sk_MvxmLOl0...")

    # Get merchant profile
    merchant = await client.merchants.get(merchant_code=os.environ["SUMUP_MERCHANT_CODE"])
    print(f"Merchant: {merchant.merchant_code}")

asyncio.run(main())

Creating a Checkout

import os
import uuid

from sumup import Sumup

client = Sumup(api_key="sup_sk_MvxmLOl0...")
merchant_code = os.environ["SUMUP_MERCHANT_CODE"]

# Create a checkout
checkout = client.checkouts.create(
    amount=10.00,
    currency="EUR",
    checkout_reference=str(uuid.uuid4()),
    merchant_code=merchant_code,
    description="Test payment",
    redirect_url="https://example.com/success",
    return_url="https://example.com/webhook",
)

print(f"Checkout ID: {checkout.id}")
print(f"Checkout Reference: {checkout.checkout_reference}")

Creating a Reader Checkout

from sumup import Sumup

client = Sumup(api_key="sup_sk_MvxmLOl0...")

# Create a reader checkout
reader_checkout = client.readers.create_checkout(
    reader_id="your-reader-id",
    merchant_code="your-merchant-code",
    total_amount={
        "value": 1000,  # 10.00 EUR (amount in cents)
        "currency": "EUR",
        "minor_unit": 2,
    },
    description="Coffee purchase",
    return_url="https://example.com/webhook",
)

print(f"Reader checkout created: {reader_checkout}")

Version Support Policy

sumup-py maintains compatibility with Python versions that have not passed end-of-life. As of June 8, 2026, that means Python 3.10 through 3.14. See Status of Python versions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sumup-0.3.0.tar.gz (56.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sumup-0.3.0-py3-none-any.whl (65.2 kB view details)

Uploaded Python 3

File details

Details for the file sumup-0.3.0.tar.gz.

File metadata

  • Download URL: sumup-0.3.0.tar.gz
  • Upload date:
  • Size: 56.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sumup-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9dc2d4b8620a875de79bd47d592e990918a4c52594b2ae93759fb9bad94386b6
MD5 991090fe3771aa51cb89d6e3df712d62
BLAKE2b-256 64cef20c8ce7ff1f6261bfe1a9a152582ed4b8da3e49afd7616cdaee004e86f4

See more details on using hashes here.

File details

Details for the file sumup-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sumup-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sumup-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b39da9090254f2ebc74529e19fbe3ebba27b4bd336b40bf4f2d53a125819cbe5
MD5 b0af0499ff23710f6faa77616c8bcb0f
BLAKE2b-256 8b5dfb30903e871eb17866941adc2f3d81bc7f545886135f8c636200889e6da5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page