Skip to main content

SantimPay Python API Package.

License Unofficial Python SDK for SantimPay

Introduction

This document provides a comprehensive guide to integrating and using the SantimPay Payment Gateway SDK in your application. Santimpay is a powerful payment gateway that supports various payment methods, facilitating seamless transactions for businesses. This SDK simplifies interaction with SantimPay’s API, enabling operations such as initiating payments, verifying transactions, and managing subaccounts.

Installation

To use the SantimPay SDK in your project, you need to install it using pip, as it is a dependency for making HTTP requests it will also install httpx as a dependency.

pip install santimPay

Usage

To begin using the SDK, import the SantimPay class from the module and instantiate it with your secret key.

from santimPay import SantimPay
# Replace Your_merchant_id with your mechant_id from santimpay api

# Replace your private key with your own private key by generating it

# Replace test wit boolian value - default = False
santim_pay = SantimPay('Your_merchant_id', 'Your_private_key', test=False)

Making Payments

Checkout pay

from santimPay.types import SantimPayCheckoutRequest, SantimPayOptions

request = SantimPayCheckoutRequest(
    id,
    amount,
    paymentReason,
    successRedirectUrl,
    failureRedirectUrl,
    notifyUrl,
    cancelRedirectUrl,
    direct = False
)

# options = SantimPayOptions()
response = santim_pay.checkout.create(
    request
)

print(response.jsonSerialize())

Direct pay

from santimPay.types import SantimPayCheckoutRequest, SantimPayOptions

request = SantimPayCheckoutRequest(
    id,
    amount,
    paymentReason,
    successRedirectUrl,
    failureRedirectUrl,
    notifyUrl,
    cancelRedirectUrl,
    direct = False
)

# options = SantimPayOptions()

# replace phonne_number with actual phone number
response = santim_pay.directpay.telebirr.create(
    request,
    phone_number
)
# or
response = santim_pay.directpay.cbe.create(
    request,
    phone_number
)

print(response.jsonSerialize())

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. After that free to contribute to this project. Please read the CONTRIBUTING.md file for more information.

Run Locally

Clone the project

git clone https://github.com/nahom-d54/SantimPay.git

Go to the project directory

cd santimPay

Install dependencies

pip install -r requirements.txt

License

The MIT License (MIT). Please see License File for more information.

Metadata

Release files for santimPay 1.0.1

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

Source distribution (sdist)

Source distribution for santimPay 1.0.1
File Size Uploaded Provenance Actions
santimPay-1.0.1.tar.gz 8.5 kB Without provenance Details for santimPay-1.0.1.tar.gz

Release files / santimPay-1.0.1.tar.gz

Download URL santimPay-1.0.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
381e365b160d777f7f63a9d5180d9a8f686d65cfd94574eb94635a03e6c36e9e
BLAKE2b-256 checksum
How to use checksums
77a78bb94cdc6c6adf9079625fcc2bb5dc8b109d21d7901fe92ec5375bfe2739
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Security for santimPay 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

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