This is a python helper package for Telebirr H5 Web payment integration helper.

Related tags

Build Tools telebirr
Overview

Telebirr

This is a python helper package for Telebirr H5 Web payment integration helper. The use case for this interface is payment via web. Third party system will invoke the interface upon payment issue by the customer and a redirect page will be return to the third party system from telebirr platform.

Logical specification

![alt text](img/logical design.png "Logical spacification")

Platform Authentication Rule

  1. Telebirr platform allocate appId and appKey to the corresponding third party client. Each third party will have a unique appId and appKey.
  2. Third party source IP addresses should be added on the trust list. Those IP addresses of clients that are not in the trust list will not access telebirr system.
  3. The time of the timestamp is consistent with that of the server (within one minute). If they are inconsistent, the access is considered illegal.
  4. Check whether the signature entered by the client is consistent with the signature generated by the system. If they are inconsistent, the access is considered illegal.

Interface Description

Parameter Data Type Mandatory or Optional Description Example
appId String M Indicates the appID provided from telebirr platform. It uniquely identify the third party. ce83aaa3dedd42 ab88bd017ce1ca
appKey String M Indicates the appKey provided by telebirr platform a8955b02b5df475882038616d5448d43
nonce String M Indicates a unique random string generated by third party system. The value of nonce for each request should be unique. ER33419df678o8bb
notifyUrl String O Indicates the end point URL from third party which will be used by telebirr platform to respond the Payment result. Telebirr platform uses this third party end point to proactively notify third party server for payment request result. If this parameter is empty, payment result notification will not be sent. https://mmpay.trade.pay/notifyUrl/
outTradeNo String M Indicates the third party payment transaction order number that will be generated by third party system and it shall be unique. Supported contents for outTradeNo parameter value is digits, letters, and underscores. T0533111222S001114129
returnUrl String M Indicates third party redirect page URL after the payment completed. https://mmpay.trade.pay/T0533111222S001114129
shortCode String M Indicates third party Short Code provided from telebirr. 8000001
subject String M Indicates the item or any other name for the payment that is being issued by the customer.
Note: Special characters such as /, =, & are not allowed. Book
timeoutExpress String M Indicates the payment Order request timeout from third party, which indicates the time for payment process to be ended. After this time the payment will not be processed and third party system can reinitiate again. Note: the parameter value unit is Minutes 30
timestamp String M Indicates the time stamp on the request message. The timestamp should be in milliseconds. Python code:str(int(datetime.datetime.now().timestamp() * 1000)) Note: Use unix timestamp 1624546517701
totalAmount String M Indicates the order amount in ETB. The value ranges from 0.01 to 100000000.00 and is accurate to two decimal places. Note: The value will be authenticated by telebirr platform depending on the limit rule assigned to the customer. For instance, if the allowed daily limit transaction for a customer is 10,000 ETB then those transactions against this rule will be failed. 9.00
receiveName String O Indicates the transaction receiver name. Ethiopian airlines

Interface Description

Response message element is described below

Parameter Data Type Mandatory or Optional Description Example
code String M Indicates the Status Code for payment request 0
msg String M Indicates the Status Code Description for payment request success
data Object M Indicates the Data Object that consists the toPayURL
toPayUrl String M Indicates telebirr payment landing page URL to redirect the customer to H5 Web Payment. https://h5pay.trade.pay/payId=RE9879T0972S

Getting started

pip install telebirr

from telebirr import Telebirr
private_key = "YOUR PUBLIC KEY FORM TELEBIRR ADMIN"
telebirr = Telebirr(
    app_id="YOUR APP ID FROM TELEBIRR ADMIN",
    app_key="YOUR APP KEY FROM TELEBIRR ADMIN",
    public_key=private_key,
    notify_url="https://example.com/telebirr/121232",
    receive_name="Your company name",
    return_url="https://example.com/",
    short_code="SHORT CODE FROM TELEBIRR ADMIN",
    subject="Test",
    timeout_express="30",
    total_amount="10",
    nonce="UNIQUE",
    out_trade_no="UNIQUE"
)
response = telebirr.send_request()
You might also like...
Python program for installing many tools automatically
Python program for installing many tools automatically

Tool Installer is a script made with python which help user in installing tools automatically

PyPacker: a dumb little script for turning Python apps into standalone executable packages on Windows

PyPacker: a dumb little script for turning Python apps into standalone executable packages on Windows PyPacker is my attempt at creating a way to make

A Star Trek Online build tool in Python

SETS - STO Equipment and Trait Selector A Star Trek Online build tool in Python Description Pre-alpha version of build tool for STO Getting Started De

Clang-based cross platform build system written in Python
Clang-based cross platform build system written in Python

Clang-build Find the full documentation at https://clang-build.readthedocs.io First steps Customisations Multiple targets Multiple projects Defaults M

🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.
🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.

Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus. Highli

payu payment gateway integration for django projects

Django-PayU This package provides integration between Django and PayU Payment Gateway. Quick start Install 'django-payu' using the following command:

Fully functional ecommerce website with user and guest checkout capabilities and Paypal payment integration.

ecommerce_website Fully functional ecommerce website with user and guest checkout capabilities and Paypal payment integration. pip install django pyth

Qt-creator-boost-debugging-helper - Qt Creator Debugging Helper for Boost Library
Qt-creator-boost-debugging-helper - Qt Creator Debugging Helper for Boost Library

Go to Tools Options Debugger Locals & Expressions. Paste the script path t

Aioresponses is a helper for mock/fake web requests in python aiohttp package.

aioresponses Aioresponses is a helper to mock/fake web requests in python aiohttp package. For requests module there are a lot of packages that help u

Python Wrapper for handling payment requests through the Daraja MPESA API

Python Daraja Description Python Wrapper for handling payment requests through the Daraja MPESA API Contribution Refer to the CONTRIBUTING GUIDE. Usag

Launched in 2018 Actively developed and supported. Supports tkinter, Qt, WxPython, Remi (in browser). Create custom layout GUI's simply.  Python 2.7 & 3 Support. 200+ Demo programs & Cookbook for rapid start. Extensive documentation.  Examples using Machine Learning(GUI, OpenCV Integration,  Chatterbot), Floating Desktop Widgets, Matplotlib + Pyplot integration, add GUI to command line scripts, PDF & Image Viewer. For both beginning and advanced programmers .
A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant Django-Merchant is a django application that enables you to use multiple payment processors from a single API. Gateways Following gate

A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant Django-Merchant is a django application that enables you to use multiple payment processors from a single API. Gateways Following gate

Machine Learning Model to predict the payment date of an invoice when it gets created in the system.

Payment-Date-Prediction Machine Learning Model to predict the payment date of an invoice when it gets created in the system.

An App to get Ko-Fi payment updates on Telegram.
An App to get Ko-Fi payment updates on Telegram.

Deployments. Heroku.com 🚀 Replit.com 🌀 Make sure your app runs 24*7 Zeet.co 💪 Use this :~ Get Bot token from @botfather 🤖 Get ID where you want to

A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant Django-Merchant is a django application that enables you to use multiple payment processors from a single API. Gateways Following gate

Django library to simplify payment processing with pin

Maintainer Wanted I no longer have any side projects that use django-pinpayments and I don't have the time or headspace to maintain an important proje

 Uses discords api to see if a token has a valid payment method.
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug · Request Feature Features Checks tokens Checks all

PVE with tcaledger app for payments and simulation of payment requests

tcaledger PVE with tcaledger app for payments and simulation of payment requests. The purpose of this API is to empower users to accept cryptocurrenci

Comments
  • Fix README.md, telebirr.py and image

    Fix README.md, telebirr.py and image

    README.md

    • fix logical specification image
    • clear up file to make it easily readable
    • fix duplicate headers, change to 'Request Interface Description' & 'Response Interface Description'

    telebirr.py

    • sort imports to make it easily readable

    image

    • rename image in img/ to logical_design.png
    • remove img.png from the root directory
    opened by NegassaB 0
  • 400 Operation failed

    400 Operation failed

    Hi, i was trying to integrate with telebirr with your package but i keep getting short code inconsistent error so i figured this package was using the production telebirr api link, so i forked your code and tried it with the test api link that we get from tele birr but still

    400 Operation failed

    is the only thing that i am getting .

    this is the link i switched api value to http://196.188.120.3:11443/ammapi/service-openup/toTradeWebPay

    any help or tips would be appreciated, what should i do,

    also it would be great if you your package could accept isTestEnv value so that it can work with test environment

    opened by abeyshiferaw0 2
  • Question out of the scope.

    Question out of the scope.

    Hello, I admire your work. its just perfect.

    I need to create a telegram bot that automates a payment system (telebirr) in PHP. is there any telebirr documentation i can refer to? Can you please help me?

    opened by eliasgetachewc1988 1
Releases(v0.0.4)
Owner
null
Python package used on Hardfight projects to make building, testing and deploying easy.

Hardfight Devtools Build, test and deploy Hardfight projects easly ?? What is it Devtools is a Python tool to make building, testing and deploying int

Hardfight 1 Dec 5, 2021
the blessed package to manage your versions by scm tags

setuptools_scm setuptools_scm handles managing your Python package versions in SCM metadata instead of declaring them as the version argument or in a

Python Packaging Authority 671 Jan 8, 2023
Package, distribute, and update any app for Linux and IoT.

Snapcraft Package, distribute, and update any app for Linux and IoT. Snaps are containerised software packages that are simple to create and install.

null 1.1k Jan 2, 2023
Software build automation tool for Python.

PyBuilder — an easy-to-use build automation tool for Python PyBuilder is a software build tool written in 100% pure Python, mainly targeting Python ap

PyBuilder 1.5k Jan 4, 2023
The official binary distribution format for Python

wheel This library is the reference implementation of the Python wheel packaging standard, as defined in PEP 427. It has two different roles: A setupt

Python Packaging Authority 368 Dec 23, 2022
Simplified packaging of Python modules

Flit is a simple way to put Python packages and modules on PyPI. It tries to require less thought about packaging and help you avoid common mistakes.

Thomas Kluyver 1.9k Jan 5, 2023
Python-based project scripting.

Paver - Easy Scripting for Software Projects Web: https://pythonhosted.org/Paver/ Download: https://pypi.python.org/pypi/Paver/ Source: https://github

Paver community 452 Dec 9, 2022
Buildout is a deployment automation tool written in and extended with Python

Buildout Buildout is a project designed to solve 2 problems: Application-centric assembly and deployment Assembly runs the gamut from stitching togeth

buildout 552 Nov 26, 2022
A pynt of Python build.

A pynt of Python build. Raghunandan Rao Features Easy to learn. Build tasks are just python funtions. Manages dependencies between tasks. Automaticall

Raghunandan Rao 154 Jan 4, 2023
🔨🐍Make-like build automation tool for Python projects with extensive DSL features.

Pyke (WIP, Beta Release) Make-like build automation tool for Python projects with extensive DSL features. Features: Users can specify tasks, subtasks,

Ire 17 Jul 5, 2022