Skip to main content

ttk-epay-python-client

Welcome to Python Package Repository

for TTK ePay Payment Gateway

This package is developed by Charen Bahaeddine Hemmem (1hemmem) and is open to contributions from developers like you.

Requirements

TTK ePay requires Python 3.8 and above.

Installation

pip install ttk-epay

Usage

from ttk_epay import ttk_epay
from ttk_epay.models import Invoice, InvoiceDto

# Initialize the client
client = ttk_epay(base_url="https://pay.deploily.cloud/api/v1")

# ==============
# Invoice Management
# ==============

# Create an invoice
invoice_data = Invoice(
    ID=123,
    INVOICE_NUMBER=456,
    NET_AMOUNT=100.0,
    CLIENT_NAME="Client name",
    CLIENT_MAIL="client@example.com"
)
created_invoice = client.create_invoice(invoice_data)

# Get paginated invoices
invoices = client.get_invoices(page_number=1, page_size=10)

# Get invoice by order ID
invoice = client.get_invoice_by_order_id("41")


# ==============
# Payment Processing
# ==============

# Create a payment
payment_data = InvoiceDto(
    INVOICE_NUMBER=456,
    NET_AMOUNT=100.0,
    CLIENT_NAME="John Doe"
)
payment = client.post_payement(payment_data)

# Check payment status
status = client.get_payment_status("8LmjDNjisi0A5EAAGBYM")

# ==============
# Receipt Management
# ==============

# Get PDF receipt
pdf_response = client.get_pdf_recipt("8LmjDNjisi0A5EAAGBYM")
with open("receipt.pdf", "wb") as f:
    f.write(pdf_response.content)

# Send receipt via email
result = client.send_pdf_recipt_mail("8LmjDNjisi0A5EAAGBYM", "client@example.com")

Metadata

Release files for ttk-epay 0.1.6

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

Source distribution (sdist)

Source distribution for ttk-epay 0.1.6
File Size Uploaded
ttk_epay-0.1.6.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ttk-epay 0.1.6
File Interpreter ABI Platform
ttk_epay-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / ttk_epay-0.1.6.tar.gz

Download URL ttk_epay-0.1.6.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
515e8351043b63e559d93698e74f50e846ce35f6a95e5ecedb1bb8f9cff32e00
BLAKE2b-256 checksum
How to use checksums
4b22b2a62af90d380693c45dfa09752275807ced182de532f7803599e65b75d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / ttk_epay-0.1.6-py3-none-any.whl

Download URL ttk_epay-0.1.6-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4f8322fb1514711883f653f1b658461f42734c81e5ad9cca6988ca15c597706
BLAKE2b-256 checksum
How to use checksums
18da49fc354c6b0658fcdd7301e137a757aa6ed92e9690d9080420f3a00e4fcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release 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