sumup


Namesumup JSON
Version 0.0.11 PyPI version JSON
download
home_pageNone
SummaryOfficial Python SDK for the SumUp API.
upload_time2025-10-23 14:53:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords sdk sumup payments
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# sumup-py

[![pypi](https://img.shields.io/pypi/v/sumup.svg)](https://pypi.python.org/pypi/sumup)
[![Documentation][docs-badge]](https://developer.sumup.com)
[![CI Status](https://github.com/sumup/sumup-py/workflows/CI/badge.svg)](https://github.com/sumup/sumup-py/actions/workflows/ci.yml)
[![pypi download](https://img.shields.io/pypi/dm/sumup)](https://pypi.python.org/pypi/sumup)
[![License](https://img.shields.io/github/license/sumup/sumup-py)](./LICENSE)

</div>

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

The Python SDK for the SumUp [API](https://developer.sumup.com).

## Installation

Install the latest version of the SumUp SDK:

```sh
pip install sumup
# or
uv add sumup
```

## Usage

### Synchronous Client

```python
from sumup import Sumup

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

# Get merchant profile
merchant = client.merchant.get()
print(f"Merchant: {merchant.merchant_profile.merchant_code}")
```

### Async Client

```python
import asyncio
from sumup import AsyncSumup

async def main():
    client = AsyncSumup(api_key="sup_sk_MvxmLOl0...")
    
    # Get merchant profile
    merchant = await client.merchant.get()
    print(f"Merchant: {merchant.merchant_profile.merchant_code}")

asyncio.run(main())
```

### Creating a Checkout

```python
from sumup import Sumup
from sumup.checkouts import CreateCheckoutBody
import uuid

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

# Get merchant code
merchant = client.merchant.get()
merchant_code = merchant.merchant_profile.merchant_code

# Create a checkout
checkout = client.checkouts.create(
    body=CreateCheckoutBody(
        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

```python
from sumup import Sumup
from sumup.readers import CreateReaderCheckoutBody, CreateReaderCheckoutAmount

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

# Create a reader checkout
reader_checkout = client.readers.create_checkout(
    reader_id="your-reader-id",
    body=CreateReaderCheckoutBody(
        total_amount=CreateReaderCheckoutAmount(
            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 are no pass their End of life support, see [Status of Python versions](https://devguide.python.org/versions/).

[docs-badge]: https://img.shields.io/badge/SumUp-documentation-white.svg?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgY29sb3I9IndoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0iTTIyLjI5IDBIMS43Qy43NyAwIDAgLjc3IDAgMS43MVYyMi4zYzAgLjkzLjc3IDEuNyAxLjcxIDEuN0gyMi4zYy45NCAwIDEuNzEtLjc3IDEuNzEtMS43MVYxLjdDMjQgLjc3IDIzLjIzIDAgMjIuMjkgMFptLTcuMjIgMTguMDdhNS42MiA1LjYyIDAgMCAxLTcuNjguMjQuMzYuMzYgMCAwIDEtLjAxLS40OWw3LjQ0LTcuNDRhLjM1LjM1IDAgMCAxIC40OSAwIDUuNiA1LjYgMCAwIDEtLjI0IDcuNjlabTEuNTUtMTEuOS03LjQ0IDcuNDVhLjM1LjM1IDAgMCAxLS41IDAgNS42MSA1LjYxIDAgMCAxIDcuOS03Ljk2bC4wMy4wM2MuMTMuMTMuMTQuMzUuMDEuNDlaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sumup",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "sdk, sumup, payments",
    "author": null,
    "author_email": "SumUp <support@sumup.com>",
    "download_url": "https://files.pythonhosted.org/packages/c5/14/e3a9629b24a5fae68f8664fd6da478d5bba8915523a39d249aea8971a71a/sumup-0.0.11.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# sumup-py\n\n[![pypi](https://img.shields.io/pypi/v/sumup.svg)](https://pypi.python.org/pypi/sumup)\n[![Documentation][docs-badge]](https://developer.sumup.com)\n[![CI Status](https://github.com/sumup/sumup-py/workflows/CI/badge.svg)](https://github.com/sumup/sumup-py/actions/workflows/ci.yml)\n[![pypi download](https://img.shields.io/pypi/dm/sumup)](https://pypi.python.org/pypi/sumup)\n[![License](https://img.shields.io/github/license/sumup/sumup-py)](./LICENSE)\n\n</div>\n\n_**IMPORTANT:** This SDK is under development. We might still introduce minor breaking changes before reaching v1._\n\nThe Python SDK for the SumUp [API](https://developer.sumup.com).\n\n## Installation\n\nInstall the latest version of the SumUp SDK:\n\n```sh\npip install sumup\n# or\nuv add sumup\n```\n\n## Usage\n\n### Synchronous Client\n\n```python\nfrom sumup import Sumup\n\nclient = Sumup(api_key=\"sup_sk_MvxmLOl0...\")\n\n# Get merchant profile\nmerchant = client.merchant.get()\nprint(f\"Merchant: {merchant.merchant_profile.merchant_code}\")\n```\n\n### Async Client\n\n```python\nimport asyncio\nfrom sumup import AsyncSumup\n\nasync def main():\n    client = AsyncSumup(api_key=\"sup_sk_MvxmLOl0...\")\n    \n    # Get merchant profile\n    merchant = await client.merchant.get()\n    print(f\"Merchant: {merchant.merchant_profile.merchant_code}\")\n\nasyncio.run(main())\n```\n\n### Creating a Checkout\n\n```python\nfrom sumup import Sumup\nfrom sumup.checkouts import CreateCheckoutBody\nimport uuid\n\nclient = Sumup(api_key=\"sup_sk_MvxmLOl0...\")\n\n# Get merchant code\nmerchant = client.merchant.get()\nmerchant_code = merchant.merchant_profile.merchant_code\n\n# Create a checkout\ncheckout = client.checkouts.create(\n    body=CreateCheckoutBody(\n        amount=10.00,\n        currency=\"EUR\",\n        checkout_reference=str(uuid.uuid4()),\n        merchant_code=merchant_code,\n        description=\"Test payment\",\n        redirect_url=\"https://example.com/success\",\n        return_url=\"https://example.com/webhook\"\n    )\n)\n\nprint(f\"Checkout ID: {checkout.id}\")\nprint(f\"Checkout Reference: {checkout.checkout_reference}\")\n```\n\n### Creating a Reader Checkout\n\n```python\nfrom sumup import Sumup\nfrom sumup.readers import CreateReaderCheckoutBody, CreateReaderCheckoutAmount\n\nclient = Sumup(api_key=\"sup_sk_MvxmLOl0...\")\n\n# Create a reader checkout\nreader_checkout = client.readers.create_checkout(\n    reader_id=\"your-reader-id\",\n    body=CreateReaderCheckoutBody(\n        total_amount=CreateReaderCheckoutAmount(\n            value=1000,  # 10.00 EUR (amount in cents)\n            currency=\"EUR\",\n            minor_unit=2\n        ),\n        description=\"Coffee purchase\",\n        return_url=\"https://example.com/webhook\"\n    )\n)\n\nprint(f\"Reader checkout created: {reader_checkout}\")\n```\n\n## Version support policy\n\n`sumup-py` maintains compatibility with Python versions that are no pass their End of life support, see [Status of Python versions](https://devguide.python.org/versions/).\n\n[docs-badge]: https://img.shields.io/badge/SumUp-documentation-white.svg?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgY29sb3I9IndoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0iTTIyLjI5IDBIMS43Qy43NyAwIDAgLjc3IDAgMS43MVYyMi4zYzAgLjkzLjc3IDEuNyAxLjcxIDEuN0gyMi4zYy45NCAwIDEuNzEtLjc3IDEuNzEtMS43MVYxLjdDMjQgLjc3IDIzLjIzIDAgMjIuMjkgMFptLTcuMjIgMTguMDdhNS42MiA1LjYyIDAgMCAxLTcuNjguMjQuMzYuMzYgMCAwIDEtLjAxLS40OWw3LjQ0LTcuNDRhLjM1LjM1IDAgMCAxIC40OSAwIDUuNiA1LjYgMCAwIDEtLjI0IDcuNjlabTEuNTUtMTEuOS03LjQ0IDcuNDVhLjM1LjM1IDAgMCAxLS41IDAgNS42MSA1LjYxIDAgMCAxIDcuOS03Ljk2bC4wMy4wM2MuMTMuMTMuMTQuMzUuMDEuNDlaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Official Python SDK for the SumUp API.",
    "version": "0.0.11",
    "project_urls": {
        "Homepage": "https://github.com/sumup/sumup-py",
        "Issues": "https://github.com/sumup/sumup-py/issues",
        "Source Code": "https://github.com/sumup/sumup-py"
    },
    "split_keywords": [
        "sdk",
        " sumup",
        " payments"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d4d6710a5beb0b1237503aa5bc2d67977987e9525ef4fd68f9d7b3af848e94e9",
                "md5": "bae84b87a8a8af69617bb6867a2e68dd",
                "sha256": "0ceb612c7d7ff46c5e71ab802289de52ee9702a1b71e187c8d3befab65b188ad"
            },
            "downloads": -1,
            "filename": "sumup-0.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bae84b87a8a8af69617bb6867a2e68dd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 60239,
            "upload_time": "2025-10-23T14:53:08",
            "upload_time_iso_8601": "2025-10-23T14:53:08.923529Z",
            "url": "https://files.pythonhosted.org/packages/d4/d6/710a5beb0b1237503aa5bc2d67977987e9525ef4fd68f9d7b3af848e94e9/sumup-0.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c514e3a9629b24a5fae68f8664fd6da478d5bba8915523a39d249aea8971a71a",
                "md5": "ac48a204768da36d9a921fb42523aa1c",
                "sha256": "cf7660c971d17575c0d318fcc43da8e60b97c08636715f8b41d7a026f5c6b115"
            },
            "downloads": -1,
            "filename": "sumup-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "ac48a204768da36d9a921fb42523aa1c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 43462,
            "upload_time": "2025-10-23T14:53:10",
            "upload_time_iso_8601": "2025-10-23T14:53:10.295277Z",
            "url": "https://files.pythonhosted.org/packages/c5/14/e3a9629b24a5fae68f8664fd6da478d5bba8915523a39d249aea8971a71a/sumup-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-23 14:53:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sumup",
    "github_project": "sumup-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sumup"
}
        
Elapsed time: 2.21775s