Skip to main content

Inttegro Python SDK

OpenSSF Scorecard

The official Python client for building server-side Inttegro integrations.

Fastest, most modern path: connect an agent to Inttegro MCP at https://mcp.inttegro.com, then ask it to run design_integration. It will produce an implementation and test plan for your application. Use this SDK when you are ready to connect that plan to your Python service.

All official Inttegro SDKs expose the same API capabilities. This package adds Python-specific data access, transports, and test seams.

Install

Requires Python 3.10 or newer.

pip install inttegro

Store your secret key in the server environment:

export INTTEGRO_API_KEY="your_secret_key"

Never put the key in browser code, a mobile app, or source control. The client uses https://api.inttegro.com by default.

Create a hosted checkout

Create and finalize an order, then send the customer to its hosted invoice URL:

import os

from inttegro import APIError, InttegroClient, ProductType

inttegro = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

try:
    order = inttegro.orders.create({
        "request_meta": {"idempotency_key": "checkout-cart-123"},
        "customer_data": {
            "name": "Akua Mensah",
            "email_address": "akua@example.com",
            "phone_number": "+233544998605",
        },
        "finalize": True,
        "checkout_settings": {
            "redirect_url": "https://example.com/orders/complete",
            "cancel_url": "https://example.com/cart",
        },
        "line_items": [{
            "type": "product",
            "product": {
                "type": ProductType.DIGITAL,
                "name": "Monthly subscription",
                "quantity": 1,
                "price": {"currency": "ghs", "value": 5000},
            },
        }],
    })

    checkout_url = order.invoice.format.web.url
    print(order.id, checkout_url)
except APIError as error:
    print(error.code, error.detail or str(error))
    raise

Amounts use integer minor units: 5000 GHS is GHS 50.00. Reuse the same idempotency key when retrying the same logical write. If you omit one, the SDK generates a UUIDv7 key for mutating calls.

Work with the API

The SDK covers orders and checkout, customers, products and prices, purchase intents, payment methods, balances, payouts and refunds, notifications, files, application settings, keys, and country specifications. Resources use snake-case attributes such as purchase_intents and payment_methods.

Python-specific features:

  • Standard-library-only runtime with no third-party dependencies.
  • OpenAPI-generated, immutable domain dataclasses with fully typed nested fields.
  • OpenAPI-generated TypedDict requests with required, optional, union, and enum fields.
  • Backwards-compatible mapping access and to_dict() conversion on every response model.
  • JSON-compatible string enums for public API values.
  • Configurable timeout, base URL, and injectable transport for tests or custom networking.
  • Structured authentication, rate-limit, network, timeout, and API exceptions.

Response fields are available to editors, Pyright, and mypy without plugins:

from inttegro import CreateRefundRequest, RefundResponse

request: CreateRefundRequest = {
    "order_id": "or_0123456789abcdefghijklmnopqrstuvwxyzABCD",
    "reason": "requested_by_customer",
    "line_items": [{
        "order_line_item_id": "oli_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN",
        "refund_amount": {"currency": "ghs", "value": 2500},
    }],
}

response: RefundResponse = inttegro.refunds.create(request)
print(response.refund.id, response.refund.total.value)

See the API reference for request fields and lifecycle rules, errors for recovery guidance, and idempotency for safe retries.

Verify a release

The GitHub release for each version is the canonical record. It contains the exact wheel and source distribution uploaded to PyPI, SHA-256 checksums, and a Sigstore attestation tied to the source commit and release workflow.

sha256sum --check SHA256SUMS
gh attestation verify inttegro-2.0.0-py3-none-any.whl \
  --repo zebodotdev/inttegro-sdk-python

Develop

poetry install
poetry run python -m unittest discover -s tests -p "test_*.py"

Download files

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

Source Distribution

inttegro-2.0.0.tar.gz (62.1 kB view details)

Uploaded Source

Built Distribution

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

inttegro-2.0.0-py3-none-any.whl (83.6 kB view details)

Uploaded Python 3

File details

Details for the file inttegro-2.0.0.tar.gz.

File metadata

  • Download URL: inttegro-2.0.0.tar.gz
  • Upload date:
  • Size: 62.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for inttegro-2.0.0.tar.gz
Algorithm Hash digest
SHA256 71d12c2a2d6d44de69956927cf0d24a375cebbe374204a7c09219ff7b95bc12c
MD5 792208f1577d8e749216729bab682bcb
BLAKE2b-256 6829f42f7c72e6b06d68ed62e57698b07f1f4d4599531997e12e56f62ab39a31

See more details on using hashes here.

Provenance

The following attestation bundles were made for inttegro-2.0.0.tar.gz:

Publisher: release.yml on zebodotdev/inttegro-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inttegro-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: inttegro-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 83.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for inttegro-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eda16f526a1b848fcd936f969cfa77fd354a074781ef87a6fc41253940bf0600
MD5 2b7f6d1315ceb2bd2f39a8ce83d5c84c
BLAKE2b-256 cb9eda565db0ccf4206de3987c80cfe05660d935e63f5556a0f14ab1f21507d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for inttegro-2.0.0-py3-none-any.whl:

Publisher: release.yml on zebodotdev/inttegro-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

6.2.0

2 files

6.1.2

2 files

6.1.1

2 files

6.0.0

2 files

5.0.0

2 files

4.0.0

2 files

3.0.1

2 files

3.0.0

2 files

2.1.0

2 files

This release

2.0.0 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page