Cardinity Python SDK Documentation

PyPI version Python versions License

Welcome to the official Python SDK for the Cardinity Payment Gateway. This library provides a simple and intuitive way to integrate Cardinity’s payment processing capabilities into your Python applications.

Key Features

  • Complete API Coverage: Full support for all Cardinity API operations

  • 3D Secure v2: Built-in support for strong customer authentication

  • Type Safety: Full type hints for better development experience

  • Async Support: Built on modern Python async/await patterns

  • Comprehensive Testing: Extensive test suite with 92% coverage

  • Production Ready: Built for scalability and reliability

Quick Start

Installation

Install the Cardinity Python SDK using pip:

pip install cardinity-python

Basic Usage

from cardinity import Cardinity

# Initialize the client
cardinity = Cardinity(
    consumer_key="your_consumer_key",
    consumer_secret="your_consumer_secret"
)

# Create a payment
payment = cardinity.create_payment(
    amount="10.00",
    currency="EUR",
    description="Test payment",
    country="LT",
    payment_instrument={
        "pan": "4111111111111111",
        "exp_month": 12,
        "exp_year": 2025,
        "cvc": "123",
        "holder": "John Doe"
    }
)

print(f"Payment created: {payment['id']}")

Table of Contents

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Indices and tables