Skip to main content

Solidgate API

PyPI version

Python SDK provides API options for integrating Solidgate’s payment orchestrator into your Python applications.

Check our

Structure

SDK for Python contains Table of contents
  • solidgate/ – main library source code for development
    • __init__.py – initializes the SDK package for importing
    • api_client.py – main file for API integration and HTTP request handling
    • encryption.py – library for encryption-related operations
    • model.py – defines data structures for payment attributes and responses
  • setup.py – script for managing dependencies and library imports
Requirements
Installation
Usage
Errors

Requirements

  • Python: 3.7 or later
  • Packages: requests library
  • Solidgate account: Public and secret key (request via sales@solidgate.com)

Installation

To start using the Python SDK:

  1. Ensure you have your public and secret key.
  2. Install the SDK in your project using pip:
    pip install solidgate-card-sdk
    
  3. Import the classes into your project:
    from solidgate import ApiClient
    client = ApiClient(public_key='YourMerchantId', secret_key='YourPrivateKey')
    
  4. Use test credentials for integration testing. After successful testing, switch to production credentials.

Usage

Charge a payment

Create a class instance of the ApiClient class.

from solidgate import ApiClient

client = ApiClient(public_key, secret_key)
  • public_key - unique merchant identification
  • secret_key - secret code for request signature, it is provided at the moment of merchant registration

Resign form

response = client.form_resign({'order_id': '12345'})

Errors

Handle errors.

try:
    response = client.charge({...})
except Exception as e:
    print(e)

Looking for help? Contact us
Want to contribute? Submit a pull request

Release files for solidgate-sdk 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solidgate-sdk 0.4.0
File Size Uploaded
solidgate_sdk-0.4.0.tar.gz 5.2 kB Details

Release files / solidgate_sdk-0.4.0.tar.gz

Download URL solidgate_sdk-0.4.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9d3b5294373008737bdac393a27c12400729b430efec09ba2709ae044ac0cced
BLAKE2b-256 checksum
How to use checksums
e4637fe1fe627096c5d87f8f9eb1c2dc180c377ee29ba7c2b6a31e2fb3c5e425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file

0.3.2

2 release files

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

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