Skip to main content

A Python SDK for payment processing

Project description

Connections SDK

The Connections SDK simplifies payment processing by providing a unified interface to multiple payment providers. It uses Basis Theory for secure card tokenization and supports multiple payment processors.

Features

  • Unified payment processing interface
  • Support for multiple payment providers
  • Support for one-time payments and card-on-file transactions
  • 3DS authentication support
  • Comprehensive error handling and categorization
  • Providers documentation for each provider supported by the SDK.

Installation

pip install connections_sdk

Quick Start

from connections_sdk import Connections
from connections_sdk.models import RecurringType

# Initialize the SDK with your chosen provider
sdk = Connections({
    'is_test': True,  # Use test environment
    'bt_api_key': 'YOUR_BASIS_THEORY_API_KEY',
    'provider_config': {
        # Configure your chosen provider
        'adyen': {
            'apiKey': 'YOUR_PROVIDER_API_KEY',
            'merchantAccount': 'YOUR_MERCHANT_ACCOUNT',
        }
    }
})

# Create a transaction request
transaction_request = TransactionRequest(
    reference='unique-transaction-reference',
    type=RecurringType.ONE_TIME,
    amount=Amount(
        value=1000,  # Amount in cents
        currency='USD'
    ),
    source=Source(
        type=SourceType.BASIS_THEORY_TOKEN,
        id='YOUR_BASIS_THEORY_TOKEN_ID',
        store_with_provider=False
    ),
    customer=Customer(
        reference='customer-reference'
    )
)

# Process the transaction with your chosen provider
response = sdk.adyen.create_transaction(transaction_request)  # Use sdk.<provider>.transaction()

Documentation

Support

For support, please contact support@basistheory.com or open an issue on GitHub.

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

connections_sdk-2.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

connections_sdk-2.1.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file connections_sdk-2.1.0.tar.gz.

File metadata

  • Download URL: connections_sdk-2.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for connections_sdk-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3a4ba7c1cf1fcf3656c5d1f590163f9ee1c87dfbeda5e6d25fdd4b7e4d207c33
MD5 52598c597d3940b81990c9a6802e6660
BLAKE2b-256 5efb736dcca4fd2bd01c1816ddf8072b70596e738d8d94a69031f6a1d6b8f52b

See more details on using hashes here.

File details

Details for the file connections_sdk-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for connections_sdk-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34c4b38ce28355b0ccd5395c79df75fdff5066838e8e6a8e7eb425843e1097a4
MD5 b7e9d8ad607a0107a5e1a3adcdd7f485
BLAKE2b-256 9c9ea9e7aa00a60fa50d5669893176db36dbba434eb76a5d0108ba3d957eb679

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