Skip to content

Repository files navigation

SumUp Python SDK

pypiDocumentationCI Statuspypi downloadLicense

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

importosfromsumupimportSumupclient=Sumup(api_key="sup_sk_MvxmLOl0...")
# Get merchant profilemerchant=client.merchants.get(merchant_code=os.environ["SUMUP_MERCHANT_CODE"])
print(f"Merchant: {merchant.merchant_code}")

Async Client

importasyncioimportosfromsumupimportAsyncSumupasyncdefmain():
client=AsyncSumup(api_key="sup_sk_MvxmLOl0...")
# Get merchant profilemerchant=awaitclient.merchants.get(merchant_code=os.environ["SUMUP_MERCHANT_CODE"])
print(f"Merchant: {merchant.merchant_code}")
asyncio.run(main())

Creating a Checkout

importosimportuuidfromsumupimportSumupclient=Sumup(api_key="sup_sk_MvxmLOl0...")
merchant_code=os.environ["SUMUP_MERCHANT_CODE"]
# Create a checkoutcheckout=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

fromsumupimportSumupclient=Sumup(api_key="sup_sk_MvxmLOl0...")
# Create a reader checkoutreader_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.

About

Python SDK for the SumUp API.

Topics

Resources

Code of conduct

Security policy

Stars

15 stars

Watchers

8 watching

Forks

Releases

Used by

Contributors

Languages