Skip to main content

📘 TTK ePay Module

TTK ePay is a powerful and flexible electronic payment module developed as part of the Deploily web application. Designed to streamline the online payment experience, it empowers users to send payment links directly to their clients and provides a secure, user-friendly interface for completing transactions.

Built on an MVC architecture, TTK ePay enables users to manage and track client payments efficiently through its intuitive Admin Console. Users can create, update, and monitor invoices via a centralized dashboard, ensuring complete control over payment operations.

TTK ePay also includes a robust RESTful API, allowing developers to integrate the module into their own applications and customize the payment experience to fit their specific business needs.

Payments through TTK ePay are securely processed via Edahabia and bank cards, providing flexibility and trust for both users and clients.

🛠️ Prerequisites

Before using TTK ePay, make sure you have the following:

  • An active Deploily application instance
  • A Base URL and Secret Key from your purchase

🖥️ TTK ePay Admin Console

The TTK ePay Admin Console is a secure and intuitive web dashboard that allows users to manage their payment operations, invoices, and receipts efficiently. Once you have purchased the module, you can access this interface to fully configure and monitor your e-payment system.

🔐 Registration

After purchasing the module, you'll receive a Base URL and a Secret Key. Use these credentials to register your service in the admin console.

  • Access the registration form
  • Enter your application URL
  • Paste your secret key
  • Submit to activate your integration
Admin registration screenshot
📄 Invoice Management

From the dashboard, users can view all invoices in a searchable, paginated table. You can:

  • View all invoices
  • Create new invoices
  • Update existing invoices
Admin invoice screenshot
💳 Payments Overview

The payments section provides a comprehensive view of all received payments. You can:

  • Browse and filter all payment records
  • View payment details including amount, date, status, and invoice linkage
  • Download the full list of payments (CSV or Excel)
  • Download individual receipts as PDFs
Admin payment screenshot
📥 Downloadable Documents
  • Download receipts as PDFs
  • Export full payment history as CSV

🌐 TTK ePay API

TTK ePay offers official SDKs for Node.js and Pythonto help developers easily integrate e-payment capabilities into their applications. Below is an overview of the available packages and usage examples.

📦 Node.js Client

Official npm package: @deploily/ttk-epay-nodejs-client

Installation
npm install @deploily/ttk-epay-nodejs-client
Example Usage
const { ttk_epay } = require('@deploily/ttk-epay-nodejs-client');

            const client = new ttk_epay({
              baseUrl: 'https://your-app.com',
              secretKey: 'your-secret-key'
            });

            // List invoices
            const invoices = await client.get_invoices(1, 10);
            
Available Methods
  • getInvoices(page, size) – Paginated invoice listing
  • createInvoice(data) – Create a new invoice
  • getInvoiceById(invoiceId) – Fetch invoice via ID
  • updateInvoice(invoiceId, data) – Update an invoice
  • getPayments(options) – Filter and list payments
  • getPaymentById(paymentId) – Fetch payment via ID
  • postPayement(data) – Register a new payment
  • getPdfRecipt(orderId) – Get a PDF receipt
  • sendPdfReceiptMail(orderId, email) – Send receipt by email

🐍 Python Client

Official PyPi package: ttk-epay – GitHub source: ttk-epay-python-client

Installation
pip install ttk-epay
Example Usage
from ttk_epay.client import TtkEpay

client = TtkEpay(
    base_url="https://your-app.com",
    secret_key="your-secret-key"
)

# List invoices
invoices = client.get_invoices(page=1, size=10)
Available Methods
  • get_invoices(page, size)
  • create_invoice(data)
  • get_invoice_by_order_id(order_id)
  • update_invoice(invoice_id, data)
  • get_payments(params)
  • post_payement(data)
  • get_pdf_recipt(order_id)
  • send_pdf_recipt_mail(order_id, email)

🧩 TTK ePay MVC

The MVC integration enables your users to make payments for their invoices directly through your web application's interface. This approach offers flexibility and a streamlined payment experience.

💳 How It Works
  • The user accesses a payment page and provides their invoice number and client code.
  • The system fetches and verifies the invoice details from your backend (or through the TTK ePay SDK).
  • If the user chooses to proceed with payment via our module, a confirmation screen is displayed.
  • Upon confirmation, the user is redirected to the SATIM secure payment interface.
  • The user enters their bank card credentials and completes the transaction securely.
  • After payment, the user is redirected back to your application with the result.
🔐 Security Notes
  • Payment is handled securely through SATIM's official gateway.
  • No card credentials are ever stored or transmitted by your system.
  • You must validate the payment result through TTK ePay's backend confirmation route.
📦 Example Flow
  1. User navigates to /payement-url
  2. Enters invoice number and client code
  3. Clicks "Pay"
  4. Sees a confirmation modal
  5. Redirects to SATIM
  6. Completes payment
  7. Gets redirected back with status: success or failure